Page 1 of 1

Help with DS video to Plex folder and files

Posted: 08 May 2024, 18:52
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.

Re: Help with DS video to Plex folder and files

Posted: 08 May 2024, 19:18
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]

Re: Help with DS video to Plex folder and files

Posted: 10 May 2024, 18:37
by Stewart
Hi rednoah,

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

Stewart

Re: Help with DS video to Plex folder and files

Posted: 10 May 2024, 18:58
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]

Re: Help with DS video to Plex folder and files

Posted: 12 May 2024, 21:12
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

Re: Help with DS video to Plex folder and files

Posted: 12 May 2024, 22:05
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$/) }