Code: Select all
{t.replacePart(' [Part $1]')
Code: Select all
{t.replacePart(' [Part $1]')
Code: Select all
{'Test (1)'.replacePart(' [Part $1]')}
Time to tell us what TV Show / Episodes you're renaming.Crankrune wrote:{t} isn't returning the (1) (2)
Code: Select all
{episode.toString().match(/([0-9])/); ' [Part 1]'}
Code: Select all
{' [Part '+episode.toString().match(/\([0-9]+\)$/)[1]+']'}
Code: Select all
{' ('+episode.toString().match(/\([0-9]+\)$/)[1]+')'}
Code: Select all
{" Part $pi"}
Code: Select all
{t}
Code: Select all
{pi}
Code: Select all
{' ('+episode.toString().match(/\([0-9]+\)$/)[1]+')'}
Code: Select all
{t.replacePart(' [$1]')}
Code: Select all
Star Trek - The Next Generation [s01e01-e02] Encounter At Farpoint, Part 1 & Encounter At Farpoint, Part 2 Encounter at Farpoint, Part 1 & Encounter at Farpoint [2] - [90 Min] [1987-09-28] [240p MP3 2ch]
Code: Select all
{n} - {s00e00} - {t}
Code: Select all
Star Trek: The Next Generation - S01E01-E02 - Encounter at Farpoint
I'm using a modified version of DrevXen's show format viewtopic.php?f=5&t=2#p12156rednoah wrote:What is your format?
Code: Select all
{norm = {it.upperInitial().lowerTrail().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper()}).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, {it.lower()})}; norm(n).replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/).replaceTrailingBrackets()} {' '+n.match(/\([A-Z]+\)$/)} {if (norm(n) != norm (primaryTitle)) ' ('+norm(primaryTitle)+')'} {fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} {if (y) {' ['+y +']'}} {' '+any{"[$certification]"}{"["+$imdb.certification+"]" }.replaceAll('N A','').replaceAll(/^ \d+$/, 'PG-$0')} {" [$rating" + "★]"} [{csv('C:/FileBot/Settings/Shows/TVNetwork.csv').get(info.network) ?: info.network }]/ {[episodelist.findAll{ it.season == s }.airdate.year.min()]} {episode.special ? ' Season '+s.pad(2)+'/[Specials]' : ' Season '+s.pad(2)}/ {csv('C:/FileBot/Settings/Shows/TVFileShowNames.csv').get(n) ?: norm(n).replaceTrailingBrackets()} {' '+n.match(/\([A-Z]+\)$/)} {' '+n.match(/\([0-9]+\)$/)} {[episode.special ? 's00e'+special.pad(2)+'' : ''+s00e00.lower()+'']} {norm(t.replaceAll("\\s*[(]([^)]*)[)]\$", { group, match -> ' (Part '+match.pad(2)+')' }))} {fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition|unsold.pilot|unaired.pilot| unaired.episode/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/ [._]/, " ") + ')'} {t.replacePart(' [$1]')} - {" [$minutes Min]"} {' '+[airdate.format("yyyy-MM-dd")]} {" [$source]"} {" [$vf $ac $af]"}
Thanks for replying in this thread! You refreshed this issue in my mind, and I worked on it again today... finally solving my problem!Steve wrote:Hi, going back to the original problem on this thread I'm not sure it has been fixed. Or indeed if it has just come up again.
Code: Select all
{n}/{episode.special ? 'Specials' : 'Season '+s.pad(2)}/{n} {s00e00} {t.replaceAll(/[´''?]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part $1')}
Code: Select all
.../X-Men: The Animated Series S0E01 Out of the Past, Part 1
.../X-Men: The Animated Series S0E02 Out of the Past, Part 2
Code: Select all
{n.replaceTrailingBrackets()} - {s+'x'}{e.pad(2)} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").replacePart(' (Part $1)')}
Code: Select all
.../X-Men: The Animated Series - 3x01 - Out of the Past (Part 1)
.../X-Men: The Animated Series - 3x02 - Out of the Past (Part 2)
Code: Select all
{norm = {it.replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper()}).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, {it.lower()})}; csv('C:/FileBot/Settings/Shows/ShowFolderNames.csv').get(n) ?: norm(n).replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)}
{' '+n.match(/\([A-Z]+\)$/)}
{if ((n) != (primaryTitle)) ' ('+norm(primaryTitle)+')'}
{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}
{if (y) {' ['+y +']'}}
{"[$rating"+"★]"}
{any{"[$certification]"}{"["+$omdb.certification+"]" }.replaceAll('N A','NR').replaceAll(/^ \d+$/, 'PG-$0')}
{"/"}
{[episodelist.findAll{it.season == s}.airdate.year.min()]}
{episode.special ? ' Season '+s.pad(2)+'/[Specials]' : ' Season '+s.pad(2)}
{"/"}
{csv('C:/FileBot/Settings/Shows/ShowFileNames.csv').get(n) ?: norm(n)}
{' '+n.match(/\([A-Z]+\)$/)}
{' '+n.match(/\([0-9]+\)$/)}
{" "}
{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D ':""}
{[episode.special ? 's00e'+special.pad(2)+'' : ''+s00e00.lower()+'']}
{" "}
{norm(t.replacePart(' (Part $1)'))}
{" - "}
{' [' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition|unsold.pilot|unaired.pilot|unaired.episode/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/ [._]/, " ") + ']'}
{"[$minutes-min]"}
{"[$vf-$vc]"}
{"[$af-$ac]"}
{any{".$cf"}{".$ext"}}
Code: Select all
...\Last Man on Earth, The [2015][7.4★][TV-14]\The Last Man on Earth [s01e01-e02] Alive in Tucson & The Elephant in the Room - [43-min][480p-x264][2ch-AAC].mp4
...\X-Men - The Animated Series [1992][9.0★][TV-Y7]\X-Men- TAS [s03e01] Out of the Past (Part 1) - [20-min][240p-DivX][2ch-MP3].avi
...\X-Men - The Animated Series [1992][9.0★][TV-Y7]\X-Men- TAS [s03e02] Out of the Past (Part 2) - [20-min][240p-DivX][2ch-MP3].avi
...\X-Men - The Animated Series [1992][9.0★][TV-Y7]\X-Men- TAS [s03e03] Phoenix Saga (Part 1) - Sacrifice - [20-min][240p-DivX][2ch-MP3].avi
...\X-Men - The Animated Series [1992][9.0★][TV-Y7]\X-Men- TAS [s03e04] Phoenix Saga (Part 2) - The Dark Shroud - [20-min][240p-DivX][2ch-MP3].avi
Code: Select all
echo "Hello $1"
Code: Select all
echo 'Hello $1'
Code: Select all
echo "Hello \$1"
Code: Select all
--def "seriesFormat=/share/Media/TV Shows/{n}/{episode.special ? 'Specials' : 'Season '+s.pad(2)}/{n} {s00e00} {t.replaceAll(/[´''?]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part \$1')}"
Code: Select all
[MOVE] Rename [/share/torename/X-Men The Animated Series S03E01 Out of the Past (Part 1).m4v] to [/share/Media/TV Shows/X-Men The Animated Series/Season 03/X-Men The Animated Series S03E01 Out of the Past, Part 1.m4v]
[MOVE] Rename [/share/torename/X-Men The Animated Series S03E02 Out of the Past (Part 2).m4v] to [/share/Media/TV Shows/X-Men The Animated Series/Season 03/X-Men The Animated Series S03E02 Out of the Past, Part 2.m4v]
Code: Select all
[MOVE] Rename [/share/torename/X-Men The Animated Series S03E01 Out of the Past (Part 1).m4v] to [/share/Media/TV Shows/X-Men - The Animated Series/Season 03/X-Men - The Animated Series - S03E01 - Out of the Past.m4v]
[MOVE] Rename [/share/torename/X-Men The Animated Series S03E02 Out of the Past (Part 2).m4v] to [/share/Media/TV Shows/X-Men - The Animated Series/Season 03/X-Men - The Animated Series - S03E02 - Out of the Past.m4v]
Code: Select all
filebot -list --q "X-Men The Animated Series" --filter "s == 3 && e <= 2"
Code: Select all
X-Men: The Animated Series - 3x01 - Out of the Past (Part 1)
X-Men: The Animated Series - 3x02 - Out of the Past (Part 2)
Operations Security (OPSEC)
Code: Select all
{t.replacePart(/(Part.$1)/)}
why do FB think "(OPSEC)" is a "Part" thing ?Operations Security(Part.OPSEC)
Code: Select all
[(]([\d])[)]$|[(](\w+\s?[\d])[)]$|[(](part+\s\w+)[)]$
Code: Select all
[(]([\d])[)]$|[(](\w+\s?[\d])[)]$|[(](part+\s\w+)[)]$
Operations Security (sdfljhdsflhfdsljhfljsdhvsdlfhesboihsdflishflshfsdlfjhvslifsehbf)
Code: Select all
[(](\d{1,3})[)]$|[(](\D{1,3}\s?\d{1,3})[)]$|[(](part+\s\w+)[)]$