Sorry, I should have been more clear.
If there is a collection, then it should look like this.
C:\Movies\Anchorman Collection\Anchorman The Legend of Ron Burgundy (2004) [1080p] [x265]\Anchorman The Legend of Ron Burgundy (2004).mkv
If there is no collection, then it should look like this.
C:\Movies\Anchorman The Legend of Ron Burgundy (2004) [1080p] [x265]\Anchorman The Legend of Ron Burgundy (2004).mkv
Code: Select all
['O:', 'P:'].collect{ it / any{'Movies' / collection}{'Movies'} }
When I tried this code, it created a new "IMovies" folder and 2 other folders. One for the movie and 1 for a subtitle.
H:\IMovies\Greyhound (2020)\Greyhound (2020).srt
H:\IMovies\Greyhound (2020) [480p] [x264]
There were a lot of subtitles in this one so I deleted most of the subtitles from the log.
Run script [fn:amc] at [Wed Jul 22 18:03:02 EDT 2020]
Parameter: seriesFormat = {['D:', 'E:', 'F:', 'G:', 'H:', 'I:', 'J:', 'K:', 'L:', 'M:', 'N:', 'O:', 'P:'].collect{ drive -> def a=n; return new File(drive+"/TV/", a)}.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{episode.special ? 'Specials' : 'Season '+s}/{s00e00} {t}
Parameter: movieFormat = {['D:', 'E:', 'F:', 'G:', 'H:', 'I:', 'J:', 'K:', 'L:', 'M:', 'N:', 'O:', 'P:'].collect{ it / any{'Movies' / collection}{'Movies'} }.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} ({y}) {"[$vf]"} {"[$vc]"}/{n} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} ({y})
Parameter: musicFormat = Music/{n}/{\$album/}{\${pi.pad(2)}. } {t}
Parameter: deleteAfterExtract = y
Parameter: clean = y
Parameter: plex = *****
Parameter: pushbullet = *****
Parameter: ut_label =
Parameter: ut_state = 5
Parameter: ut_title = Greyhound.2020.PROPER.WEBRip.x264-ION10
Parameter: ut_kind = multi
Parameter: ut_file = Greyhound.2020.PROPER.WEBRip.x264-ION10.mp4
Parameter: ut_dir = C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10
Input: C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Greyhound.2020.PROPER.WEBRip.x264-ION10.mp4
Input: C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\10_Finnish.srt
Input: C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\7_Danish.srt
Input: C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\8_Dutch.srt
Input: C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\9_Estonian.srt
Group: {Movie=Greyhound (2020)} => [Greyhound.2020.PROPER.WEBRip.x264-ION10.mp4, 10_Finnish.srt, 11_French.srt, 12_French.srt, 13_German.srt, 15_Hebrew.srt, 16_hin.srt, 17_Hungarian.srt, 19_Italian.srt, 20_Japanese.srt, 21_Lithuanian.srt, 22_Latvian.srt, 23_may.srt, 25_Chinese.srt, 26_nor.srt, 27_Polish.srt, 28_Portuguese.srt, 29_Portuguese.srt, 2_English.srt, 30_Russian.srt, 31_Chinese.srt, 32_slo.srt, 33_Slovenian.srt, 34_Spanish.srt, 35_Spanish.srt, 36_Swedish.srt, 37_tam.srt, 38_tel.srt, 39_Thai.srt, 3_English.srt, 40_ukr.srt, 41_Vietnamese.srt, 4_Arabic.srt, 5_Bulgarian.srt, 6_Czech.srt, 7_Danish.srt, 8_Dutch.srt, 9_Estonian.srt]
Group: {Movie=Greyhound (2020), Series=null} => [14_Greek.srt, 18_Indonesian.srt, 24_Chinese.srt]
Rename movies using [TheMovieDB]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Greyhound.2020.PROPER.WEBRip.x264-ION10.mp4]
Stripping invalid characters from new path: I:Movies/Greyhound (2020) [480p] [x264]/Greyhound (2020)
[MOVE] from [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Greyhound.2020.PROPER.WEBRip.x264-ION10.mp4] to [H:\IMovies\Greyhound (2020) [480p] [x264]\Greyhound (2020).mp4]
Processed 2 files
Rename movies using [TheMovieDB]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\14_Greek.srt]
Stripping invalid characters from new path: I:Movies/Greyhound (2020)/Greyhound (2020)
[MOVE] from [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\14_Greek.srt] to [H:\IMovies\Greyhound (2020)\Greyhound (2020).srt]
Skipped [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\18_Indonesian.srt] because [H:\IMovies\Greyhound (2020)\Greyhound (2020).srt] already exists
Skipped [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\24_Chinese.srt] because [H:\IMovies\Greyhound (2020)\Greyhound (2020).srt] already exists
Processed 1 files
Notify Plex: [host:192.168.******, token:**********************
GET: http://192.168.***.***:32400/library/sections/all/refresh?X-Plex-Token=******************************
HttpNetworkError: Connect timed out: Unable to connect to 192.168.****** at this time. Please try again later.
Sending PushBullet report
Clean clutter files and empty folders
Delete C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\2_English.srt
Done ヾ(@⌒ー⌒@)ノ
I also tried the examples that Kim gave.
Each selection of code created 2 folders. One for the movie and 1 for a subtitle.
Code: Select all
new File(it+'/Movies/'+any{collection+'/'}{'/'})
This one created a folder called Downloads (2013) for the subtitle. The movie folder looked fine.
I:\Movies\Downloaded (2013)\Downloaded (2013).srt
I:\Movies\Palm Springs (2020) [480p] [x264]\Palm Springs (2020).mp4
The log for this code.
Run script [fn:amc] at [Wed Jul 22 17:35:32 EDT 2020]
Parameter: seriesFormat = {['D:', 'E:', 'F:', 'G:', 'H:', 'I:', 'J:', 'K:', 'L:', 'M:', 'N:', 'O:', 'P:'].collect{ drive -> def a=n; return new File(drive+"/TV/", a)}.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{episode.special ? 'Specials' : 'Season '+s}/{s00e00} {t}
Parameter: movieFormat = {['D:', 'E:', 'F:', 'G:', 'H:', 'I:', 'J:', 'K:', 'L:', 'M:', 'N:', 'O:', 'P:'].collect{ new File(it+'/Movies/'+any{collection+'/'}{'/'}) }.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} ({y}) {"[$vf]"} {"[$vc]"}/{n} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} ({y})
Parameter: musicFormat = Music/{n}/{\$album/}{\${pi.pad(2)}. } {t}
Parameter: deleteAfterExtract = y
Parameter: clean = y
Parameter: plex = *****
Parameter: pushbullet = *****
Parameter: ut_label =
Parameter: ut_state = 5
Parameter: ut_title = Palm.Springs.2020.WEBRip.x264-ION10
Parameter: ut_kind = multi
Parameter: ut_file = Palm.Springs.2020.WEBRip.x264-ION10.mp4
Parameter: ut_dir = C:\_Downloaded uTorrent Files\Palm.Springs.2020.WEBRip.x264-ION10
Input: C:\_Downloaded uTorrent Files\Palm.Springs.2020.WEBRip.x264-ION10\Palm.Springs.2020.WEBRip.x264-ION10.mp4
Input: C:\_Downloaded uTorrent Files\Palm.Springs.2020.WEBRip.x264-ION10\Subs\2_English.srt
Input: C:\_Downloaded uTorrent Files\Palm.Springs.2020.WEBRip.x264-ION10\Subs\3_Spanish.srt
Group: {Movie=Palm Springs (2020), Series=null} => [Palm.Springs.2020.WEBRip.x264-ION10.mp4]
Group: {Movie=Downloaded (2013), Series=null} => [2_English.srt, 3_Spanish.srt]
Rename movies using [TheMovieDB]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Palm.Springs.2020.WEBRip.x264-ION10\Palm.Springs.2020.WEBRip.x264-ION10.mp4]
[MOVE] from [C:\_Downloaded uTorrent Files\Palm.Springs.2020.WEBRip.x264-ION10\Palm.Springs.2020.WEBRip.x264-ION10.mp4] to [I:\Movies\Palm Springs (2020) [480p] [x264]\Palm Springs (2020).mp4]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Palm.Springs.2020.WEBRip.x264-ION10\Subs\2_English.srt]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Palm.Springs.2020.WEBRip.x264-ION10\Subs\3_Spanish.srt]
[MOVE] from [C:\_Downloaded uTorrent Files\Palm.Springs.2020.WEBRip.x264-ION10\Subs\2_English.srt] to [I:\Movies\Downloaded (2013)\Downloaded (2013).srt]
[AUTO] Delete [I:\Movies\Downloaded (2013)\Downloaded (2013).srt]
[MOVE] from [C:\_Downloaded uTorrent Files\Palm.Springs.2020.WEBRip.x264-ION10\Subs\3_Spanish.srt] to [I:\Movies\Downloaded (2013)\Downloaded (2013).srt]
Processed 2 files
Notify Plex: [host:192.168.*******, token:**********************
GET: http://192.168.******:32400/library/sections/all/refresh?X-Plex-Token=*************************
HttpNetworkError: Connect timed out: Unable to connect to 192.168.******* at this time. Please try again later.
Sending PushBullet report
Clean clutter files and empty folders
Done ヾ(@⌒ー⌒@)ノ
Code: Select all
new File(it + any{'/Movies/' + collection}{'/Movies'})
This code created the following folders.
I:\Movies\Greyhound (2020)\Greyhound (2020).srt
I:\Movies\Greyhound (2020) [480p] [x264]\Greyhound (2020).mp4
Here is the log. I removed a lot of the subtitle information from the log.
Run script [fn:amc] at [Wed Jul 22 17:49:55 EDT 2020]
Parameter: seriesFormat = {['D:', 'E:', 'F:', 'G:', 'H:', 'I:', 'J:', 'K:', 'L:', 'M:', 'N:', 'O:', 'P:'].collect{ drive -> def a=n; return new File(drive+"/TV/", a)}.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{episode.special ? 'Specials' : 'Season '+s}/{s00e00} {t}
Parameter: movieFormat = {['D:', 'E:', 'F:', 'G:', 'H:', 'I:', 'J:', 'K:', 'L:', 'M:', 'N:', 'O:', 'P:'].collect{ new File(it + any{'/Movies/' + collection}{'/Movies'}) }.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} ({y}) {"[$vf]"} {"[$vc]"}/{n} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} ({y})
Parameter: musicFormat = Music/{n}/{\$album/}{\${pi.pad(2)}. } {t}
Parameter: deleteAfterExtract = y
Parameter: clean = y
Parameter: plex = *****
Parameter: pushbullet = *****
Parameter: ut_label =
Parameter: ut_state = 5
Parameter: ut_title = Greyhound.2020.PROPER.WEBRip.x264-ION10
Parameter: ut_kind = multi
Parameter: ut_file = Greyhound.2020.PROPER.WEBRip.x264-ION10.mp4
Parameter: ut_dir = C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10
Input: C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Greyhound.2020.PROPER.WEBRip.x264-ION10.mp4
Group: {Movie=Greyhound (2020)} => [Greyhound.2020.PROPER.WEBRip.x264-ION10.mp4, 10_Finnish.srt, 11_French.srt, 12_French.srt, 13_German.srt, 15_Hebrew.srt, 16_hin.srt, 17_Hungarian.srt, 19_Italian.srt, 20_Japanese.srt, 21_Lithuanian.srt, 22_Latvian.srt, 23_may.srt, 25_Chinese.srt, 26_nor.srt, 27_Polish.srt, 28_Portuguese.srt, 29_Portuguese.srt, 2_English.srt, 30_Russian.srt, 31_Chinese.srt, 32_slo.srt, 33_Slovenian.srt, 34_Spanish.srt, 35_Spanish.srt, 36_Swedish.srt, 37_tam.srt, 38_tel.srt, 39_Thai.srt, 3_English.srt, 40_ukr.srt, 41_Vietnamese.srt, 4_Arabic.srt, 5_Bulgarian.srt, 6_Czech.srt, 7_Danish.srt, 8_Dutch.srt, 9_Estonian.srt]
Group: {Movie=Greyhound (2020), Series=null} => [14_Greek.srt, 18_Indonesian.srt, 24_Chinese.srt]
Rename movies using [TheMovieDB]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Greyhound.2020.PROPER.WEBRip.x264-ION10.mp4]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\10_Finnish.srt]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\11_French.srt]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\12_French.srt]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\13_German.srt]
[MOVE] from [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Greyhound.2020.PROPER.WEBRip.x264-ION10.mp4] to [I:\Movies\Greyhound (2020) [480p] [x264]\Greyhound (2020).mp4]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\14_Greek.srt]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\18_Indonesian.srt]
Auto-detect movie from context [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\24_Chinese.srt]
[MOVE] from [C:\_Downloaded uTorrent Files\Greyhound.2020.PROPER.WEBRip.x264-ION10\Subs\14_Greek.srt] to [I:\Movies\Greyhound (2020)\Greyhound (2020).srt]
Processed 1 files
Notify Plex: [host:192.168.******, token:*********************
GET: http://192.168.******:32400/library/sections/all/refresh?X-Plex-Token=*****************
HttpNetworkError: Connect timed out: Unable to connect to 192.168.****** at this time. Please try again later.
Sending PushBullet report
Clean clutter files and empty folders
Done ヾ(@⌒ー⌒@)ノ