Help with DS video to Plex folder and files

Support for macOS users
Post Reply
Stewart
Posts: 3
Joined: 08 May 2024, 06:44

Help with DS video to Plex folder and files

Post by Stewart »

Hi

Note! ".vsmeta is Synology metadata files which needs to be in same folder with same filename"

Trying to achieve the following renaming files, folder creation and then move renamed files to new folders.
Capitalising first letter on each word on folders and files.
Adding resolution to filename

Example

Before Rename - volume1\video\movies\B\back to the future (1985).mp4
Before Rename - volume1\video\movies\B\back to the future (1985).mp4.vsmeta

After Rename - volume1\video\movies\B\Back To The Future (1985) {imdb No}\Back To The Future (1985) 1080p.mp4
After Rename - volume1\video\movies\B\Back To The Future (1985) {imdb No}\Back To The Future (1985) 1080p.mp4.vsmeta

Your help would be appreciated?

Stewart.
User avatar
rednoah
The Source
Posts: 23142
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with DS video to Plex folder and files

Post by rednoah »

This custom format should get you started:

Format: Select all

/volume1/video/movies
/{ az }
/{ ~plex.id % { " [$vf]" } }
{ fn.match(/\.mp4$/) }


e.g.

Console Output: Select all

$ filebot -rename -r /input --db TheMovieDB --output '/volume1/video/movies' --format '{ az }/{ ~plex.id % { " [$vf]" } }{ fn.match(/\.mp4$/) }' --action TEST --log INFO
[TEST] from [back to the future (1985).mp4] to [/volume1/video/movies/B/Back to the Future (1985) {tmdb-105}/Back to the Future (1985) [2160p].mp4]
[TEST] from [back to the future (1985).mp4.vsmeta] to [/volume1/video/movies/B/Back to the Future (1985) {tmdb-105}/Back to the Future (1985) [2160p].mp4.vsmeta]
:idea: Please read the FAQ and How to Request Help.
Stewart
Posts: 3
Joined: 08 May 2024, 06:44

Re: Help with DS video to Plex folder and files

Post by Stewart »

Hi rednoah,

Thanks for quick response but cannot get capitalisation to work on folders and filenames, could you help please?

Stewart
User avatar
rednoah
The Source
Posts: 23142
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with DS video to Plex folder and files

Post by rednoah »

Maybe like this?

Format: Select all

{ az }/{ (~plex.id % { " [$vf]" }).path.upperInitial() }{ fn.match(/\.mp4$/) }

Code: Select all

B/Back To The Future (1985) {Tmdb-105}/Back To The Future (1985) [2160p]
:idea: Please read the FAQ and How to Request Help.
Stewart
Posts: 3
Joined: 08 May 2024, 06:44

Re: Help with DS video to Plex folder and files

Post by Stewart »

Hi rednoah,

Thanks for latest info but its capitalising {imdb-tt*******} letters start of code to {Imdb-Tt*******} any ideas to not capitalise imdb code letters?

Note the imdb code is not recognised when capitalised.

Regards

Stewart
User avatar
rednoah
The Source
Posts: 23142
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with DS video to Plex folder and files

Post by rednoah »

I'd just ditch the "capitalising first letter on each word" requirement for the sake of simplicity. You could certainly write code that capitalizes some words but not others, but things do get complicated...


I guess you could do the above to capitalize everything and the explicitly replace the bits and pieces you don't like again in an additional step:

Format: Select all

{ az }/{ (~plex.id % { " [$vf]" }).path.upperInitial().replace('Tmdb':'tmdb') }{ fn.match(/\.mp4$/) }
:idea: Please read the FAQ and How to Request Help.
Post Reply