This is a command-line tool for assisting with the import of One Pace episodes into Plex and setting up its metadata so that it's displayed nicely.
Using the setup-media
command, the application will:
After this first stage, you should tell Plex to scan your media files and create the show. Remember that the generated file structure should be placed within your Plex folders under the One Piece folder.
Then using the setup-plex
command, the application will:
Installer:
Manual:
C:\tools\one-pace-plex-assistant
.oppa -h
as a test.Via Source Code:
git clone
this repopip install -r requirements.txt
python main.py <command> <your args>
The command-line is split into 2 main functions:
setup-media
This should be the first command you run.
--source-dir
The path to the directory that contains your .mkv files downloaded via onepace.net. These files can be within sub-directories of the directory provided, too. The following folder structures will work:
/source_dir
- /sub_dir
- downloaded-video01.mkv
- /sub_dir
- downloaded-video02.mkv
OR
/source_dir
- downloaded-video.mkv
- downloaded-video02.mkv
--target-dir
Note: This can be a path to either a local storage directory or, if applicable, to the Plex folders themselves e.g.
[..]/plex/media/anime/One Piece
This is the path to the directory where your downloaded files will be copied to, renamed, and put into folders so that it matches a format that Plex is expecting.
setup-plex
This should be done only after Plex has scanned your media files and created the show/episode in Plex. You'll notice that the show's metadata (titles, descriptions, show name) will not be correct. This command will update all the metadata to the titles & descriptions from onepace.net.
Note: You can run this command every time you add new episodes. It won't make any changes to episodes which already have correct titles and descriptions.
--plex-token
Your plex token. This is easy to get. Instructions are here: Finding an authentication token
--plex-host
Your Plex server's host URL. If your server is hosted locally, it will likely be a localhost
address. If it's hosted on the web, then just the url to your plex instance should be fine e.g. https://plex.mycoolwebsite.net
--plex-library
The name of the Plex library that contains the One Pace episodes e.g. Anime
, TV
--one-piece-show-name
Optional: The name of the show in Plex. If you've changed it from One Piece to One Pace already, then you should set this as "One Pace"
--change-show-name
Optional: If this flag is included, then the show name will be changed to One Pace
via metadata (the folder will remain /One Piece
).
oppa -h
oppa setup-media -h
oppa setup-plex -h
oppa setup-media \
--source-dir "C:\downloads" \
--target-dir "C:\plex-staging"
oppa setup-plex \
--plex-token "myplextoken" \
--plex-host "http://localhost:32400" \
--plex-library "Anime" \
--one-piece-show-name "One Pace" \
--change-show-name
--target-dir
to the appropriate folder.