Page 1 of 1
Renaming and moving TV/Movies from a folder
Posted: 19 Jan 2017, 04:02
by Diehard
First off I love the amc.groovy script by rednoah, I use it for finished torrents and it makes life easy, thank you rednoah!
output of
filebot -script fn:sysinfo
Code: Select all
C:\Users\HTPC>filebot -script fn:sysinfo
FileBot 4.7.7 (r4678)
JNA Native: 4.0.1
MediaInfo: 0.7.88
7-Zip-JBinding: 9.20
Chromaprint: 1.1.0
Extended Attributes: OK
Script Bundle: 2017-01-05 (r470)
Groovy: 2.4.7
JRE: Java(TM) SE Runtime Environment 1.8.0_121
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 46 MB Used Memory
OS: Windows 10 (amd64)
Package: MSI
Data: C:\Users\HTPC\AppData\Roaming\FileBot
Done ?(?????)?
I would like to use filebot to rename TV Shows and Movies from "D:/To be Added" and move then to separate folders "D:/Plex/Movies" and "D:/Plex/TV Shows" via command line.I prefer the amc script but I cant figure out how to configure it for this application.
The GUI of filebot will do this correctly when I set the episode and movie format expressions within the program but I was looking for a more unattended command line script.
This is what I came up with from reading through all the documentation on the forum
Code: Select all
filebot -rename "D:/To be Added" --output D:/Plex --def "seriesFormat=D:/Plex/TV Shows/{n}/{Season '+s}/{n}" --def "movieFormat=D:/Plex/Movies/{n} ({y})"
I did try the plex bind documented here >>
viewtopic.php?f=5&t=4116 but with no luck.
Is this possible to have a different outputs for "TV" and one for "movies" will the -rename function do that?
Rename video file
-if TV Show
---then rename and move to TV Shows
-if Movie
---then rename and move to Movies
Re: Renaming and moving TV/Movies from a folder
Posted: 19 Jan 2017, 07:41
by rednoah
Why don't you use the amc script?
Re: Renaming and moving TV/Movies from a folder
Posted: 20 Jan 2017, 00:33
by Diehard
I have tried the amc script for this and I get "Illegal usage: no input"
Code: Select all
C:\Windows\system32>filebot -script fn:amc --def excludeList=amc.txt --output "D:/Cache" --action copy --conflict skip -non-strict --log-file amc.log --def unsorted=y music=n artwork=n "seriesFormat=D:/Plex/TV Shows/{n}/{Season '+s}/{n} {sxe} - {t}" "movieFormat=D:/Plex/Movies/{n} ({y})"
Locking C:\Users\HTPC\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Thu Jan 19 16:29:01 PST 2017]
Parameter: excludeList = amc.txt
Parameter: unsorted = y
Parameter: music = n
Parameter: artwork = n
Parameter: seriesFormat = D:/Plex/TV Shows/{n}/{Season '+s}/{n} {sxe} - {t}
Parameter: movieFormat = D:/Plex/Movies/{n} ({y})
Illegal usage: no input
Failure (┬░_┬░)
When I define an input at the beginning of the command I get this.
Code: Select all
C:\Windows\system32>filebot -script fn:amc "D:/To be Added" --def excludeList=amc.txt --output "D:/Cache" --action copy --conflict skip -non-strict --log-file amc.log --def unsorted=y music=n artwork=n "seriesFormat=D:/Plex/TV Shows/{n}/{Season '+s}/{n} {sxe} - {t}" "movieFormat=D:/Plex/Movies/{n} ({y})"
Locking C:\Users\HTPC\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Thu Jan 19 16:35:25 PST 2017]
Parameter: excludeList = amc.txt
Parameter: unsorted = y
Parameter: music = n
Parameter: artwork = n
Parameter: seriesFormat = D:/Plex/TV Shows/{n}/{Season '+s}/{n} {sxe} - {t}
Parameter: movieFormat = D:/Plex/Movies/{n} ({y})
Argument[0]: D:\To be Added
Use excludes: D:\Cache\amc.txt
Input: D:\To be Added\breaking.bad.s02e01.1080p.bluray.x265 D3FiL3R.mkv
Group: [tvs:breaking bad] => [breaking.bad.s02e01.1080p.bluray.x265 D3FiL3R.mkv]
SyntaxError: expecting ''', found '<EOF>'
Processing 1 unsorted files
Illegal parameter: map
java.lang.IllegalArgumentException: Illegal parameter: map
at net.filebot.cli.ScriptShellBaseClass.lambda$getArgumentBean$1(ScriptShellBaseClass.java:470)
at net.filebot.cli.ScriptShellBaseClass.getArgumentBean(ScriptShellBaseClass.java:464)
at net.filebot.cli.ScriptShellBaseClass.rename(ScriptShellBaseClass.java:346)
at Script1.run(Script1.groovy:491)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:64)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:113)
at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:30)
at net.filebot.Main.main(Main.java:120)
Caused by: java.lang.NoSuchFieldException: map
at net.filebot.cli.ScriptShellBaseClass.lambda$getArgumentBean$1(ScriptShellBaseClass.java:466)
... 8 more
Failure (┬░_┬░)
I just tried the beta
FileBot_4.7.8_B1 with a bit more success but still getting
SyntaxError: expecting ''', found '<EOF>'
Code: Select all
C:\Windows\system32>filebot -script fn:amc "D:/To be Added" --def excludeList=amc.txt --output "D:/Cache" --action copy --conflict skip -non-strict --log-file amc.log --def unsorted=y music=n artwork=n "seriesFormat=D:/Plex/TV Shows/{n}/{Season '+s}/{n} {sxe} - {t}" "movieFormat=D:/Plex/Movies/{n} ({y})"
Locking C:\Users\HTPC\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Thu Jan 19 17:22:03 PST 2017]
Parameter: excludeList = amc.txt
Parameter: unsorted = y
Parameter: music = n
Parameter: artwork = n
Parameter: seriesFormat = D:/Plex/TV Shows/{n}/{Season '+s}/{n} {sxe} - {t}
Parameter: movieFormat = D:/Plex/Movies/{n} ({y})
Argument[0]: D:\To be Added
Use excludes: D:\Cache\amc.txt
Input: D:\To be Added\breaking.bad.s02e01.1080p.bluray.x265 D3FiL3R.mkv
Group: [tvs:breaking bad] => [breaking.bad.s02e01.1080p.bluray.x265 D3FiL3R.mkv]
SyntaxError: expecting ''', found '<EOF>'
Processing 1 unsorted files
[COPY] Rename [D:\To be Added\breaking.bad.s02e01.1080p.bluray.x265 D3FiL3R.mkv] to [D:\Cache\Unsorted\To be Added\breaking.bad.s02e01.1080p.bluray.x265 D3FiL3R.mkv]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
Trying to fix the syntax error by changing
{Season '+s} to
Season {s.pad(2)}
It works and copies and renames the video with one error
Failed to set xattr: D:\Plex\TV Shows\Breaking Bad\Season 02\Breaking Bad 2x01 - Seven Thirty-Seven.mkv:net.filebot.metadata
Code: Select all
C:\Windows\system32>filebot -script fn:amc "D:/To be Added" --def excludeList=amc.txt --output "D:/Cache" --action copy --conflict skip -non-strict --log-file amc.log --def unsorted=y music=n artwork=n "seriesFormat=D:/Plex/TV Shows/{n}/Season {s.pad(2)}/{n} {sxe} - {t}" "movieFormat=D:/Plex/Movies/{n} ({y})"
Locking C:\Users\HTPC\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Thu Jan 19 18:03:27 PST 2017]
Parameter: excludeList = amc.txt
Parameter: unsorted = y
Parameter: music = n
Parameter: artwork = n
Parameter: seriesFormat = D:/Plex/TV Shows/{n}/Season {s.pad(2)}/{n} {sxe} - {t}
Parameter: movieFormat = D:/Plex/Movies/{n} ({y})
Argument[0]: D:\To be Added
Use excludes: D:\Cache\amc.txt
Input: D:\To be Added\breaking.bad.s02e01.1080p.bluray.x265 D3FiL3R.mkv
Group: [tvs:breaking bad] => [breaking.bad.s02e01.1080p.bluray.x265 D3FiL3R.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Breaking Bad]
Fetching episode data for [Breaking Bad]
Fetching episode data for [Metastasis]
Fetching episode data for [Breaking In]
Fetching episode data for [Breaking Magic]
Fetching episode data for [Talking Bad]
[COPY] Rename [D:\To be Added\breaking.bad.s02e01.1080p.bluray.x265 D3FiL3R.mkv] to [D:\Plex\TV Shows\Breaking Bad\Season 02\Breaking Bad 2x01 - Seven Thirty-Seven.mkv]
Processed 1 files
Failed to set xattr: D:\Plex\TV Shows\Breaking Bad\Season 02\Breaking Bad 2x01 - Seven Thirty-Seven.mkv:net.filebot.metadata
Done ヾ(@⌒ー⌒@)ノ
Re: Renaming and moving TV/Movies from a folder
Posted: 20 Jan 2017, 02:19
by Diehard
I have fixed this issue with the command -no-xattr
What exactly will that command not be doing?
Re: Renaming and moving TV/Movies from a folder
Posted: 20 Jan 2017, 05:18
by rednoah
Your format is broken:
Code: Select all
SyntaxError: expecting ''', found '<EOF>'
There's a random ' in there:
Code: Select all
D:/Plex/TV Shows/{n}/{Season '+s}/{n} {sxe} - {t}
The
-no-xattr flag has absolute no effect on format expressions. It's used for disabling xattr metadata on systems that don't support xattr.
Re: Renaming and moving TV/Movies from a folder
Posted: 21 Jan 2017, 00:41
by Diehard
Thanks for the clarification