Plex series directory name including {tvdb-id#}

Support for macOS users
Post Reply
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Plex series directory name including {tvdb-id#}

Post by cheaters »

I was naming the series video files with {tvdb-id} but according to plex series naming standards that is incorrect. The series directory is supposed to have the TVDB ID after the series name like so:

Star Trek {tvdb-77526}
_Season 1
__s01e01.mov
_Season 2
__s02e01.mov

:?: How do we accomplish this with a renaming script?

Right now I am using this format for manual renaming in the GUI:

Code: Select all

/Volumes/PlexMedia/PlexServer_1/{plex.derive{' {tvdb-'}{id}{'}'}{' - ['+allOf{tags}{vf}{vs}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}
and this code in a script:

Code: Select all

--def seriesFormat="/Volumes/PlexMedia/PlexServer_1/{plex.derive{' {tvdb-'}{id}{'}'}{' - ['+allOf{tags}{vf}{vs}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}"
:!: Both of which put the tvdb-id into the file name and not the directory name.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex series directory name including {tvdb-id#}

Post by rednoah »

The {plex.id} binding is generally recommended. That'll insert the {tvdb-id#} markers in the appropriate places. Please watch the How do I organize files for Plex? video tutorial to see the file and folder names it creates in action.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: Plex series directory name including {tvdb-id#}

Post by cheaters »

Thank you I will use {plex.id} for Series

:?: How can I add additional info as I had been doing with {plex.derive}? (see above format)

I attempted to just replace {plex.derive} with {plex.id} but received and error and no fiddling with format syntax seemed to help me.

I am looking for a format like this:

Code: Select all

/Volumes/PlexMedia/PlexServer_1/TV Shows/NOVA {tvdb-76119}/Season 46/NOVA - S46E18 - Why Bridges Collapse [1080p WEB-DL A1F4005F].mkv
But, as expected, with just {plex.id} I am getting:

Code: Select all

/Volumes/PlexMedia/PlexServer_1/TV Shows/NOVA {tvdb-76119}/Season 46/NOVA - S46E18 - Why Bridges Collapse.mkv
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex series directory name including {tvdb-id#}

Post by rednoah »

e.g. get .id variant and then .derive() from there as before:

Code: Select all

{ plex.id.derive{" by $director"}{" [$vf, $vc, $ac]"} }
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: Plex series directory name including {tvdb-id#}

Post by cheaters »

This works perfectly for me :D Thank you Red!

If anyone is interested...
My Preset for Series:

Code: Select all

/Volumes/PlexMedia/PlexServer_1/{plex.id.derive{' ['+allOf{tags}{vf}{vs}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}
Script format is essentially the same:

Code: Select all

--def seriesFormat="/Volumes/PlexMedia/PlexServer_1/{plex.id.derive{' ['+allOf{tags}{vf}{vs}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}"
Post Reply