Customizing Plex Libraries - dibrz/ARMBand GitHub Wiki


Intro

Basics

In the default Cloudbox install, there only two main Plex libraries: one for Movies and one for TV Shows. With the idea that all movies are to be placed within the /Media/Movies folder in Google Drive.

Default Paths:

Media
├── Movies
└── TV

If you would like to have custom libraries in Plex, you may do so with this guide. But regardless of what scenario you choose below, the media folders will always be located within the Media/ folder (/Media/ on Google Drive and /mnt/unionfs/Media/ on the server).

Scenarios

  • Adding folders (i.e. libraries) directly under Media/Movies/ (or Media/TV/) (i.e. the standard paths) → Scenario 1. This is the recommended option.

  • Adding folders (i.e. libraries) directly under Media/Scenario 2.

Example

Here is a simplified version of my library setup, which is based on Scenario 1.

Media
├── Movies
│   ├── Movies
│   ├── Movies-4K
│   ├── Movies-Anime
│   └── Movies-Kids
├── Music
└── TV
    ├── TV
    └── TV-4K
  • Movies/Movies/ is my main movies folder (mostly Hollywood films and a few misc foreign ones).
  • Movies/Movies-Kids/ folder is for family rated, animated films.
  • Movies/Movies-Anime/ folder is for Japanese, animated films.
  • Both Kids and Anime libraries are generated dynamically via the Python-PlexLibrary script.

Scenario 1

Movie libraries under /Media/Movies.

This setup is recommended over Scenario 2 as it is somewhat user-friendly and requires a lot less setup.

Example:

Media
├── Movies
│   ├── 3D
│   ├── 4K
│   ├── Foreign
│   ├── Hollywood
│   └── Kids
└── TV

Note: You could do the same to TV shows (i.e. have multiple sub-dirs within TV), but this guide will not go over that. However, the steps are similar to the ones below.

1. Create Folders in Google Drive

Let's say you wanted to have separate movie libraries for: 3D, 4K, Foreign, Hollywood, and Kids. You would first have to create these folders within the /Media/Movies path in Google Drive. /Media/Movies folder will contain nothing but these folders.

Note: Remember, folders are case sensitive in Google Drive and in Linux (e.g. 4K and 4k are 2 different folders).

In our example, we will create the following folders: /Media/Movies/3D, /Media/Movies/4K, /Media/Movies/Foreign, /Media/Movies/Hollywood, and /Media/Movies/Kids.

2. Add Libraries to Plex

You will add each of these folders as separate libraries within Plex (see example). You may name these libraries as whatever you want. The folders will be located in the /data/Movies folder.

In our example, this will be: /data/Movies/3D, /data/Movies/4K, /data/Movies/Foreign, /data/Movies/Hollywood, and /data/Movies/Kids.

3. Retrieve Plex Library Section IDs

4. Modify Plex Autoscan Config

Note: For Mediabox / Feederbox setup, this will be done on the Mediabox.

  1. On the server's shell, run the following command:

    nano /opt/plex_autoscan/config/config.json
    
  2. Scroll down to the PLEX_SECTION_PATH_MAPPINGS section.

    1. Under this section, you will need to add your section IDs and the library paths (as located within the /Media folder in Google Drive).

      The format will look like:

      "SECTION_NUMBER": [
          "/Movies/<folderpath>/"
      ],

      Note 1: Make sure the folder paths are within quotes (e.g. "/Movies/3D") and there is a comma (,) after the close bracket (]) - all except the last one (see example below).

      Note 2: Since folders are case sensitive, make sure the folder path matches the same case as the folders you created in Google Drive (e.g. "/Movies/4K" is not the same as "/Movies/4k").

    2. After the changes, the section will now look similar to this:

      "PLEX_SECTION_PATH_MAPPINGS": {
         "1": [
             "/Movies/3D/"
         ],
         "2": [
             "/Movies/4K/"
         ],
         "3": [
             "/Movies/Foreign/"
         ],
         "4": [
             "/Movies/Hollywood/"
         ],
         "5": [
             "/Movies/Kids/"
         ],
         "6": [
             "/TV/"
         ]
      },
  3. Ctrl + X Y Enter to save.

  4. Restart Plex Autoscan: sudo systemctl restart plex_autoscan

Note: Do not modify SERVER_PATH_MAPPINGS as this does not require any changes.

5. Modify Cloudplow Config

Note: For Mediabox / Feederbox setup, this will be done on the Feederbox.

  1. On the server's shell, run the following command:

    nano /opt/cloudplow/config.json
    
  2. Set the following for remove_empty_dir_depth:

    "remove_empty_dir_depth": 2,
  3. Ctrl + X Y Enter to save.

  4. Restart Cloudplow: sudo systemctl restart cloudplow.

6. Change Root Paths in Radarr

Set your Movie Paths in Radarr to reflect the new sub-dirs (e.g. /movies/3D).

7. Change Root Paths in Plex Requests

Set the default "Root save directory for movies" on the Radarr setup page of Plex Requests (e.g. /movies/3D).


Scenario 2

Movie libraries under /Media.

This setup is not recommended as there are more chances of making mistakes and it not working as desired. It also requires a lot more customizing and changing of Sonarr/Radarr root paths.

Example:

Media
├── Movies-3D
├── Movies-4K
├── Movies-Foreign
├── Movies-Hollywood
├── Movies-Kids
└── TV

Note: You could do the same to TV shows, but this guide will not go over that. However, the steps are similar to the ones below.

1. Create Folders in Google Drive

Let's say you wanted to have separate movies libraries for: general movies folder, 3D, 4K, Foreign, Hollywood, and Kids. You would first have to create these folders within the /Media path in Google Drive. /Media/ folder will contain nothing but these folders (and the TV folder).

Note: Remember, folders are case sensitive in Google Drive and in Linux (e.g. 4K and 4k are 2 different folders).

In our example, we will create the following folders: /Media/Movies-3D, /Media/Movies-4K, /Media/Movies-Foreign, /Media/Movies-Hollywood, and /Media/Movies-Kids.

2. Add Libraries to Plex

You will add each of these folders as separate libraries within Plex (see example). You may name these libraries as whatever you want. The folders will be located in the /data folder.

In our example, this will be: /data/Movies-3D, /data/Movies-4K, /data/Movies-Foreign, /data/Movies-Hollywood, and /data/Movies-Kids.

3. Retrieve Plex Library Section IDs

4. Modify Plex Autoscan Config

Note: For Mediabox / Feederbox, this will be done on the Mediabox.

  1. On the server's shell, run the following command:

    nano /opt/plex_autoscan/config/config.json
    
  2. Scroll down to the PLEX_SECTION_PATH_MAPPINGS section.

    1. Under this section, you will need to add your section IDs and the library paths (as located within the /Media folder in Google Drive).

      The format will look like:

      "SECTION_NUMBER": [
          "/<folder>/"
      ],

      Note 1: Make sure the folder paths are within quotes (e.g. "/Movies-3D") and there is a comma (,) after the close bracket (]) - all except the last one (see example below).

      Note 2: Since folders are case sensitive, make sure the folder path matches the same case as the folders you created in Google Drive (e.g. "/Movies-4K" is not the same as "/Movies-4k").

    2. After the changes, the section will now look similar to this:

      "PLEX_SECTION_PATH_MAPPINGS": {
         "1": [
             "/Movies-3D/"
         ],
         "2": [
             "/Movies-4K/"
         ],
         "3": [
             "/Movies-Foreign/"
         ],
         "4": [
             "/Movies-Hollywood/"
         ],
         "5": [
             "/Movies-Kids/"
         ],
         "6": [
             "/TV/"
         ]
      },
  3. Scroll down to the SERVER_PATH_MAPPINGS section.

    1. Under this section, you will need to add library paths (as seen from within Plex) with the corresponding /mnt/unionfs/Media/ path.

      The format will look like:

      "/data/<folder>": [
        "/mnt/unionfs/Media/<folder>"
      ],

      Note: Make sure the folder paths are within quotes (e.g. "/data/Movies-3D/") and there is a comma (,) after the close bracket (]) - all except the last one (see example below).

    2. After the changes, the section will now look similar to this:

      "SERVER_PATH_MAPPINGS": {
        "/data/Movies-3D/": [
          "/mnt/unionfs/Media/Movies-3D/"
        ],
        "/data/Movies-4K/": [
          "/mnt/unionfs/Media/Movies-4K/"
        ],
        "/data/Movies-Foreign/": [
          "/mnt/unionfs/Media/Movies-Foreign/"
        ],
        "/data/Movies-Hollywood/": [
          "/mnt/unionfs/Media/Movies-Hollywood/"
        ],
        "/data/Movies-Kids/": [
          "/mnt/unionfs/Media/Movies-Kids/"
        ],
        "/data/TV/": [
          "/tv/",
          "/mnt/unionfs/Media/TV/"
        ]
      },
  4. Ctrl + X Y Enter to save.

  5. Restart Plex Autoscan: sudo systemctl restart plex_autoscan

5. Modify Cloudplow Config

Note: For Mediabox / Feederbox, this will be done on the Feederbox.

  1. On the server's shell, run the following command:

    nano /opt/cloudplow/config.json
    
  2. Set the following for remove_empty_dir_depth:

    "remove_empty_dir_depth": 1,
  3. Ctrl + X Y Enter to save.

  4. Restart Cloudplow: sudo systemctl restart cloudplow.

6. Change Root Paths in Radarr

Set your Movie Paths in Radarr to reflect the new sub-dirs (e.g. /mnt/unionfs/Media/Movies-3D).

7. Change Root Paths in Plex Requests

Set the default "Root save directory for movies" on the Radarr setup page of Plex Requests (e.g. /mnt/unionfs/Media/Movies-3D).

⚠️ **GitHub.com Fallback** ⚠️