Page 1 of 1

Issue with sorting a file...

Posted: 19 Aug 2021, 03:26
by ChefGregS
Here is my file format for movies:

Code: Select all

{n =~ 'P90X' ? 'M:/Workouts' : n =~ 'X-Rated' ? 'M:/Movies P' : fn =~ '3D' ? 'M:/Movies HD 3D' :  vf == /2160p/ ? 'N:/Movies 4K' : vf =~ /1080p|720p/ ? 'S:/Movies HD 2' : 'M:/Movies'}/{n.upperInitial().colon(' - ').replace('?', '!')} {' (' + fn.matchAll(/swesub|korsubs|deleted.scenes|extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition|redux|UHD|theatrical/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} {any{' Part '+pi}{null}|uncut|director} ({y}) {fn.match(/3D/)}/{n.upperInitial().colon(' - ').replace('?', '!')} {' (' + fn.matchAll(/swesub|korsubs|deleted.scenes|extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition|redux|UHD|theatrical/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} {any{' Part '+pi}{null}} [{y}, {any{csv('M:/replacecert1.csv').get(certification)}{certification}{"NR"} }, {runtime} Min] {[actors.take(3).join(', ')]} {[genres.take(3).join(', ')]} [{fn.match(/3D/)+', '}{"$vf, $ac@$af"}]{subt}
This works for pretty much anything I need. I change the S:/Movies HD 2 to M:/Movies HD or N:/Movies HD 3 depending on which drive I want to dump movies onto. (looking at using the drive size flag for doing this automatically soon)

However, while this will put files into the right places based on 3D format, HD format, 4K format, etc.. for some odd reason it will not sort X-Rated into the X-Rated drive/folder. I have an old 1978 movie that was rated X for the time. So I named the file: movie (1978) X-Rated.mp4 It's not sorting this. My question is this..... Does it only sort AFTER it grabs the info from the movie database? In other words, does it not sort the X-Rated unless it gets X-Rated from the database and not caring if it's in the raw file name? I THOUGHT it was based on the name as other files I have use the file name to add things like 'extended' or 'unrated' or 'uncut' etc..

Any help in this would be great. It's not the end of the world if I have to manually name this one movie and drop it in the right folder but since it SHOULD sort itself I am wondering why it isn't working.

Thanks!!!

Greg

Re: Issue with sorting a file...

Posted: 19 Aug 2021, 08:34
by rednoah
n ... movie name (in Movie Mode)
fn ... current file name


:idea: If you have a file named "Avatar (2009) Remastered.mkv" then n ... Avatar and fn ... Avatar (2009) Remastered so if you wanted to check for Remastered then you'll want to do fn =~ /Remastered/.

Re: Issue with sorting a file...

Posted: 20 Aug 2021, 00:31
by ChefGregS
I so totally missed that!!!! Makes so much sense as I read your post then look at what I have. Some stuff worked, some stuff didn't work. I looked and looked and looked and thus my post, because I simply couldn't see the issue. Another reason I always have another chef check my recipes I create to make sure I am not missing something. Second set of eyes is always the way to go!!!!

Once again...Thank you Rednoah!!!!!!

Greg