sperea.es
Published on

My Secret to a Perfect Plex Server

Authors

In recent years, we have witnessed an exponential growth in the number of streaming services available. At first glance, it seems like a dream come true: unlimited content at your fingertips. However, this abundance has brought an unexpected problem. Between the numerous subscriptions required to access everything we want to watch, the time wasted browsing through endless catalogs, and the amount of irrelevant content that ends up cluttering our options, streaming has long since ceased to be the ideal solution for me.

A representative image of the blog topic

Tired of this chaos and wanting to simplify my entertainment experience, I decided to create my own Plex server. A place where all the content is designed exclusively to satisfy my tastes and needs, without distractions, without unnecessary content, and most importantly, under my absolute control. Plex has not only allowed me to regain time and focus, but it has also transformed the way I enjoy my favorite movies, series, music, and documentaries.

Before starting, I need to clarify: the purpose of these tools is to manage content you legally own. At no time do I encourage the use of pirated content or practices that violate copyright laws. Plex and its add-ons are designed to help organize personal collections, such as movies, series, music, and other legitimately acquired files.

A representative image of the blog topic

Organizing Plex Content Without Going Crazy

Organizing an extensive multimedia collection in Plex can be a challenge, especially when managing various types of content. Below are some of my strategies to optimize the management of complex Plex libraries:

1. Classifying Documentaries, Series, and Movies

Documentaries: Distinguishing between individual documentaries and documentary series is essential. Individual documentaries should be placed in a movie library, while documentary series belong in a TV series library. Some content, such as National Geographic documentaries, may belong to broader series; therefore, it is advisable to consult databases like TheTVDB or TMDB to determine their proper classification.

Series and Movies: Following recommended naming conventions helps Plex recognize and obtain the correct metadata. Tools like Sonarr, Filebot, or TV Rename can automate this process. In cases where Plex fails to correctly identify a title, you can force a match using the corresponding ID from TheTVDB or TMDB.

2. Music and Concerts

Although Plex supports music, it has limitations in fields like composer or director, which can affect classical music collections. For more detailed management, you can consider dedicated music servers that offer advanced functionalities.

3. Sports Events

Managing sports events in Plex depends on the availability of metadata in public databases. For example, UFC fights can be recognized if configured in a movie library. For other sports, it is advisable to explore communities like Reddit to find specific solutions.

4. Anime, Music Videos, and Other Specialized Content

For content like anime, you can use the HAMA agent, which provides better recognition and organization. Long concerts can be managed in a movie library, while short music videos may require specific solutions or custom agents.

5. Tutorials and Video Courses

Video tutorials can be challenging due to the lack of metadata in public databases. One strategy is to tag MP4 files with embedded metadata using tools like mp3tag, and organize them following TV series conventions. Another option is to use custom agents that utilize auxiliary metadata files for more precise organization.

6. Audiobooks

Managing audiobooks in Plex can be complex, and in my case, I have preferred to use Audiobookshelf for this purpose. This tool not only offers advanced features to organize and play audiobooks but is also capable of managing the podcasts I follow.

An illustrative graphic related to the article's content

7. Comment Tracks and Collections

Comment Tracks: You can add comment tracks to movies using Python scripts that allow managing multiple audio tracks.

Smart Collections: Plex allows you to create dynamic collections based on search filters, making it easier to categorize content according to specific criteria.

An additional WebP graphic related to the blog content

8. Maintenance and Backups

It is crucial to perform regular backups of Plex libraries and metadata to prevent data loss. Recommended tools include:

  • Duplicati: Ideal for scheduling automatic backups of Plex data to local storage, the cloud, or even NAS.
  • Rclone: An advanced and flexible option for synchronizing and backing up files across multiple locations, including cloud services like Google Drive or Dropbox.
  • Restic: A lightweight tool that ensures the integrity of backups with encryption, perfect for those seeking additional security.
  • rsync: Excellent for technical users, this tool allows for fast and efficient backups on Linux systems or local servers.

It is also recommended to use monitoring tools to analyze server performance and health, such as:

  • Glances: Provides an overview of system load, including CPU, memory, network, and disks, to identify potential performance issues.
An illustrative graphic related to the article's content
  • Netdata: Offers real-time monitoring with interactive graphs and alerts for any irregularities in the server.
A representative image of the blog topic
  • Tautulli: Perfect for Plex, as it analyzes server usage and lets you see who is watching what, optimizing the user experience. I use it because I share content with family and friends and need to monitor how they use my server.
An illustrative graphic related to the article's content

By implementing these strategies and tools, you can maintain a well-organized and optimized Plex library, ensuring a smooth and enhanced experience when interacting with various types of content. Additionally, it provides peace of mind knowing your data is protected against failures or unexpected losses.

And Here Comes Plex Meta Manager, or Its Simplified Version: Kometa

A representative image of the blog topic

Managing an extensive and diverse multimedia library can be a monumental task, but this is where Plex Meta Manager becomes an invaluable ally. This tool bridges the gap between advanced personalization and intelligent automation, enabling Plex users to take their libraries to a whole new level of organization and functionality.

  • Plex Meta Manager: If you’re looking for total control over your library's organization and have the time to configure advanced rules, this is the ideal tool.
  • Kometa: If you prefer simplicity, visually appealing design, and quick solutions without delving too deeply, Kometa is an excellent option.

In either case, the configuration is very similar: through .yml files.

But... What Is Plex Meta Manager?

Plex Meta Manager is an automation tool that interacts with your Plex server to dynamically manage collections, tags, and metadata. When configured correctly, it allows you to optimize every corner of your library without having to perform tedious manual adjustments. From personalized collections to periodic metadata updates, this tool is ideal for those seeking maximum control over their multimedia content.

Main Uses of Plex Meta Manager

  1. Dynamic and Automated Collections

One of the greatest benefits of Plex Meta Manager is the ability to create dynamic collections based on specific rules. For example:

  • A collection of "Cinema Classics" featuring films released before 1980.
  • Grouping movies from a specific director like Stanley Kubrick or Alfred Hitchcock.
  • Thematic collections like "Time Travel Movies" or "Post-Apocalyptic Stories."
  • These collections not only update automatically when you add new content that meets the criteria but can also integrate with external services like Trakt.tv to sync personalized playlists.
An illustrative graphic related to the article's content
  1. Advanced Metadata Management

Plex Meta Manager allows you to:

  • Correct errors in movie and series metadata.
  • Add additional information such as custom tags, posters, and specific backgrounds.
  • Prioritize external information sources to ensure data is accurate and up-to-date.
  1. Automating Repetitive Tasks With this tool, you can schedule periodic updates of collections and metadata. This ensures your library always reflects the latest changes without constant supervision.

  2. Integration with External Databases Plex Meta Manager facilitates integration with databases like TMDb, IMDb, or TheTVDB. This is especially useful for complex categories such as:

  • Anime, where metadata often requires custom configurations.
  • Documentaries, which are sometimes scattered across movie and series libraries.
  • Simplifying Complex Libraries
  • Suppose you have a movie library divided by genres, decades, and directors, in addition to specific collections like "Superheroes" or "European Cinema." Manually configuring this would be a nightmare. With Plex Meta Manager, you can define rules based on metadata filters, and the tool takes care of the rest. For example, if you add a new superhero movie, it will automatically appear in the corresponding collection.

Additionally, in music libraries, Plex Meta Manager can help manage music videos, concerts, or even entire albums, adjusting tags and organizing the content for easier access.

Is It Complex to Configure?

Although it requires a certain level of technical knowledge to set it up initially (e.g., editing YAML files with the rules you want to apply), once configured, maintenance is almost non-existent. Plex Meta Manager becomes an "invisible administrator" that works in the background to keep your Plex server perfectly organized.

Diving Into Configuration

Integrating Kometa/Plex Meta Manager into your Plex server can significantly improve the management of your multimedia library. Below are some recommendations I consider necessary for successful configuration:

  1. Avoid Using FlixPatrol

Previously, Kometa allowed the creation of dynamic collections based on trends from platforms like Disney+ via FlixPatrol. However, FlixPatrol has moved many of its APIs to a paid model, requiring a premium subscription. As a result, Kometa features dependent on FlixPatrol are no longer operational. I recommend not including these functions in your config.yml file to avoid errors.

  1. Understand the YAML File Structure

It is essential to familiarize yourself with the config.yml file structure in Kometa to avoid common errors. This file is divided into three main sections, which I will explain in the next point:

  • metadata_path: Defines the collections.
  • overlay_path: Specifies overlays.
  • operations: Includes additional operations and can be integrated into the previous sections or kept separate.

It’s important to note that entries with the prefix - default: can appear in multiple sections but are not always interchangeable. For example, - default: actor is used in metadata_path for collections, while - default: ribbon belongs to overlay_path for overlays. Some entries, such as - default: studio, can be applied in both sections. To avoid confusion, consult Kometa's official documentation to determine the correct placement of each entry.

  1. Learn to Customize Your config.yml File

When adapting the config.yml file to your environment, keep the following in mind:

  • Library Names: Ensure the library names in the file exactly match those on your Plex server. If you don’t have a specific library mentioned in the file, delete or rename it accordingly.
  • Paths and API Keys: Starting at line 338 of the file, you need to configure the paths and API keys specific to your environment. For example, instead of using a generic IP address for the Plex server, provide the complete and accurate path according to your setup. To obtain API keys for services like TMDb, Trakt, OMDb, and Mdblist, follow the detailed instructions in the Kometa Wiki.

Simplified Example

    metadata_path:
      Collections:
        Action Movies:
          sort_title: Ascending
          collection_order: Release
          metadata_path: /path/to/action
        Drama Movies:
          <<: *defaults
          metadata_path: /path/to/drama

    overlay_path:
      Overlays:
        IMDb Top 100:
          image: /path/to/imdb_top_100.png
          metadata_path: /path/to/overlays/imdb

    operations:
      Refresh:
        frequency: weekly

In this case:

  • Two movie collections are defined with customized criteria.
  • A graphical overlay based on the IMDb ranking is implemented.
  • A weekly metadata update is scheduled.

Practical Example: Sharing My Configuration

I’m pleased to share with you my configuration repository for Kometa, previously known as Plex Meta Manager. It took me some time to fine-tune it to my liking. This set of configurations has been developed and refined to automate the creation of collections and overlays in Plex, optimizing multimedia library management. It's worth noting that I explored other users' repositories, documentation, and image banks to achieve this.

Key Features

  • Automated Collections: Configurations that allow automatic generation of collections based on specific criteria, keeping your library organized without manual intervention.
  • Customized Overlays: Implementation of overlays that provide additional information and enhanced aesthetics to your library items.
  • Continuous Updates: The repository is regularly updated to incorporate new features and improvements, ensuring an optimal experience.

Prerequisites

To make the most of these configurations, you’ll need the following API keys and tokens (all are free services):

  • Trakt: A platform for tracking what you watch, syncing your viewing activity with multiple services, and discovering new content.
  • TMDb: The Movie Database, a community-driven database offering detailed information on movies, series, and actors, widely used to enrich metadata in Plex.
  • MdbList: A service that combines information from various databases like IMDb and TMDb, providing a comprehensive view of rankings and content details.
  • OMDb: The Open Movie Database, a free API providing data on movies and series, ideal for custom projects and content management systems.
  • AniDB: A database specializing in anime, offering detailed information on series, movies, and OVAs (Original Video Animations) in this genre.
  • MyAnimeList: A popular platform for anime and manga fans, allowing personalized lists and updated information on series and movies.
  • Tautulli: An analytics tool for Plex that lets you monitor server usage, generate advanced statistics, and receive notifications about activity in your library. It’s very easy to install with Docker.

These credentials allow integration with external services, enriching the metadata and functionality of your Plex library.

Installation Guide

Steps to install and configure Kometa using Docker Compose (in my case, I use a Debian server hosting containers for all applications in my personal multimedia server ecosystem):

  1. Download the Repository: Clone or download the repository to your local system.
  2. Configure config.yml: Edit the config.yml file with your Plex server's IP address and token, and adjust library names to match your configuration.
  3. Obtain API Keys: Generate the necessary API keys and tokens for the services mentioned above.
  4. Install Docker: Ensure that Docker and Docker Compose are installed on your system.
  5. Run Docker Compose: Navigate to the repository directory and execute the command docker compose up -d to start the containers.

For detailed instructions and updates, visit the repository on GitHub:

GitHub | My Kometa Configuration Repository

Kometa | Official Wiki for the Open Source Kometa Project