Customizing Plex Libraries - dibrz/ARMBand GitHub Wiki
- Intro
- Scenario 1 (recommended)
- Scenario 2
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).
-
Adding folders (i.e. libraries) directly under
Media/Movies/
(orMedia/TV/
) (i.e. the standard paths) → Scenario 1. This is the recommended option. -
Adding folders (i.e. libraries) directly under
Media/
→ Scenario 2.
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.
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.
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
.
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
.
Note: For Mediabox / Feederbox setup, this will be done on the Mediabox.
-
On the server's shell, run the following command:
nano /opt/plex_autoscan/config/config.json
-
Scroll down to the
PLEX_SECTION_PATH_MAPPINGS
section.-
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"
). -
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/" ] },
-
-
Ctrl + X Y Enter to save.
-
Restart Plex Autoscan:
sudo systemctl restart plex_autoscan
Note: Do not modify SERVER_PATH_MAPPINGS
as this does not require any changes.
Note: For Mediabox / Feederbox setup, this will be done on the Feederbox.
-
On the server's shell, run the following command:
nano /opt/cloudplow/config.json
-
Set the following for
remove_empty_dir_depth
:"remove_empty_dir_depth": 2,
-
Ctrl + X Y Enter to save.
-
Restart Cloudplow:
sudo systemctl restart cloudplow
.
Set your Movie Paths in Radarr to reflect the new sub-dirs (e.g. /movies/3D
).
Set the default "Root save directory for movies" on the Radarr setup page of Plex Requests (e.g. /movies/3D
).
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.
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
.
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
.
Note: For Mediabox / Feederbox, this will be done on the Mediabox.
-
On the server's shell, run the following command:
nano /opt/plex_autoscan/config/config.json
-
Scroll down to the
PLEX_SECTION_PATH_MAPPINGS
section.-
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"
). -
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/" ] },
-
-
Scroll down to the
SERVER_PATH_MAPPINGS
section.-
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). -
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/" ] },
-
-
Ctrl + X Y Enter to save.
-
Restart Plex Autoscan:
sudo systemctl restart plex_autoscan
Note: For Mediabox / Feederbox, this will be done on the Feederbox.
-
On the server's shell, run the following command:
nano /opt/cloudplow/config.json
-
Set the following for
remove_empty_dir_depth
:"remove_empty_dir_depth": 1,
-
Ctrl + X Y Enter to save.
-
Restart Cloudplow:
sudo systemctl restart cloudplow
.
Set your Movie Paths in Radarr to reflect the new sub-dirs (e.g. /mnt/unionfs/Media/Movies-3D
).
Set the default "Root save directory for movies" on the Radarr setup page of Plex Requests (e.g. /mnt/unionfs/Media/Movies-3D
).