Page 1 of 1

Plex series directory name including {tvdb-id#}

Posted: 07 Sep 2022, 05:31
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.

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

Posted: 07 Sep 2022, 05:43
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.

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

Posted: 07 Sep 2022, 16:19
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

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

Posted: 07 Sep 2022, 16:23
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]"} }

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

Posted: 07 Sep 2022, 16:36
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}"