Command line result different from GUI result
Posted: 18 Feb 2015, 22:55
Hi there,
So I'm using the exact same code on the same version of filebot in both the GUI and command line, except when I run the command line I get a different result, I think it probably stems back to trying to run n.replaceFirst on it, and moving the "The" to the back of the filename, the script I run by command line is:
filebot -script fn:amc --log-file amc.log --action duplicate --conflict override -non-strict "../media" --def "seriesFormat=..media/tv-shows/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)}/{'Season '+s.pad(2)}/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} - {s00e00} - {t} ({vf})" "movieFormat=../movies/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} ({y})/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} ({y}) ({vf})" excludeList=../amc.txt music=n artwork=n plex=host
and in the GUI I have the series script set to:
../tv-shows/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)}/{'Season '+s.pad(2)}/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} - {s00e00} - {t} ({vf})
I've included the logs from the GUI and the command line below, any help to uncover what the problem is would be much appreciated, everything else works fine apart from when I try to rename series that begin with "The".
I'm running filebot v4.5.6 on Lubuntu if that helps.
----------------------------
<sequence date="2015-02-18T22:43:27.355Z">
<rename dir="../media/The.ExampleShow.2014.S03E12.720p.HDTV.X264-DIMENSION[rarbg]" from="The.ExampleShow.2014.S03E12.720p.HDTV.X264-DIMENSION.mkv" to="../media/tv-shows/Example Show, The/Season 01/Example Show, The - S03E12- Show Title(720p).mkv"/>
</sequence>
----------------------------
Input: ../media/The.ExampleShow.2014.S03E12.720p.HDTV.X264-DIMENSION[rarbg]/The.ExampleShow.2014.S03E12.720p.HDTV.X264-DIMENSION.mkv
Group: [tvs:the example show] => [The.ExampleShow.2014.S03E12.720p.HDTV.X264-DIMENSION.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [The Example Show]
Fetching episode data for [The Example Show]
[DUPLICATE] Rename [../media/The.ExampleShow.2014.S01E14.720p.HDTV.X264-DIMENSION[rarbg]/The.ExampleShow.2014.S03E124.720p.HDTV.X264-DIMENSION.mkv] to [../media/tv-shows/The.ExampleShow.2014.S03E124.720p.HDTV.X264-DIMENSION[rarbg], 0a8d123c6e9945df724d3cd557e61d1e2f/Season 01/The.ExampleShow.2014.S03E124.720p.HDTV.X264-DIMENSION[rarbg], 0a8d123c6e9945df724d3cd557e61d1e2f - S03E12- Show Title(720p).mkv]
-------------------------------------------
Thanks,
Marink
So I'm using the exact same code on the same version of filebot in both the GUI and command line, except when I run the command line I get a different result, I think it probably stems back to trying to run n.replaceFirst on it, and moving the "The" to the back of the filename, the script I run by command line is:
filebot -script fn:amc --log-file amc.log --action duplicate --conflict override -non-strict "../media" --def "seriesFormat=..media/tv-shows/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)}/{'Season '+s.pad(2)}/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} - {s00e00} - {t} ({vf})" "movieFormat=../movies/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} ({y})/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} ({y}) ({vf})" excludeList=../amc.txt music=n artwork=n plex=host
and in the GUI I have the series script set to:
../tv-shows/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)}/{'Season '+s.pad(2)}/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} - {s00e00} - {t} ({vf})
I've included the logs from the GUI and the command line below, any help to uncover what the problem is would be much appreciated, everything else works fine apart from when I try to rename series that begin with "The".
I'm running filebot v4.5.6 on Lubuntu if that helps.
----------------------------
<sequence date="2015-02-18T22:43:27.355Z">
<rename dir="../media/The.ExampleShow.2014.S03E12.720p.HDTV.X264-DIMENSION[rarbg]" from="The.ExampleShow.2014.S03E12.720p.HDTV.X264-DIMENSION.mkv" to="../media/tv-shows/Example Show, The/Season 01/Example Show, The - S03E12- Show Title(720p).mkv"/>
</sequence>
----------------------------
Input: ../media/The.ExampleShow.2014.S03E12.720p.HDTV.X264-DIMENSION[rarbg]/The.ExampleShow.2014.S03E12.720p.HDTV.X264-DIMENSION.mkv
Group: [tvs:the example show] => [The.ExampleShow.2014.S03E12.720p.HDTV.X264-DIMENSION.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [The Example Show]
Fetching episode data for [The Example Show]
[DUPLICATE] Rename [../media/The.ExampleShow.2014.S01E14.720p.HDTV.X264-DIMENSION[rarbg]/The.ExampleShow.2014.S03E124.720p.HDTV.X264-DIMENSION.mkv] to [../media/tv-shows/The.ExampleShow.2014.S03E124.720p.HDTV.X264-DIMENSION[rarbg], 0a8d123c6e9945df724d3cd557e61d1e2f/Season 01/The.ExampleShow.2014.S03E124.720p.HDTV.X264-DIMENSION[rarbg], 0a8d123c6e9945df724d3cd557e61d1e2f - S03E12- Show Title(720p).mkv]
-------------------------------------------
Thanks,
Marink