scripting help, understanding commands

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
kennymac
Posts: 3
Joined: 01 Jun 2020, 00:16

scripting help, understanding commands

Post by kennymac »

I ran the following script:

Code: Select all

filebot -script fn:amc --output "/mnt/samba/" --action duplicate -non-strict "/var/lib/transmission/Downloads" --log-file ~/amc.log --def excludeList=amc.txt artwork=y extras=y unsorted=y /var/lib/transmission/unsorted
First thing I noticed is that the unsorted command not only duplicated everything processed it placed it into the /mnt/samba not in the target specified "/var/lib/transmission/unsorted". Is this the intended method placing it in the output location? The placing is not a big deal but it concerns me that everything is being duplicated. What did I do wrong? Is it the --action duplicate?

Second thing I noticed when downloading artwork is that there was a failure. Please see below. It just appears that it is a failure on webservice.fanart.tv side. If they are no longer working maybe this can be removed in a future release? I am just trying to confirm that this is the only problem here.

Code: Select all

Banner not found: /mnt/samba/TV Shows/Rick and Morty/Season 04/banner.jpg / seasonwide:seasonwide
Fetch failed: Try again in 2 seconds (2 more) => java.net.UnknownHostException: webservice.fanart.tv
Fetch failed: Try again in 8 seconds (1 more) => java.net.UnknownHostException: webservice.fanart.tv
Lastly, I believe I will want to remove the --action duplicate switch and replace it with --conflict switch, but how does the script know which is better with the auto versus skip options?

Any suggestions on improving my script as this will eventually be set to run automatically upon download completion?

Thank you for your time!
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: scripting help, understanding commands

Post by rednoah »

What does the console output say when you run the command?
:idea: Please read the FAQ and How to Request Help.
kennymac
Posts: 3
Joined: 01 Jun 2020, 00:16

Re: scripting help, understanding commands

Post by kennymac »

Code: Select all

filebot -script fn:amc --output "/mnt/samba/" --action duplicate -non-strict "/var/lib/transmission/Downloads" --log-file ~/amc.log --def excludeList=amc.txt artwork=y extras=y unsorted=y /var/lib/transmission/unsorted
Run script [fn:amc] at [Wed Jun 03 11:27:15 EDT 2020]
Parameter: excludeList = amc.txt
Parameter: artwork = y
Parameter: extras = y
Parameter: unsorted = y
Argument[0]: /var/lib/transmission/Downloads
Argument[1]: /var/lib/transmission/unsorted
Use excludes: /mnt/samba/amc.txt
Input: /var/lib/transmission/Downloads/Rick.and.Morty.S04E01.1080p.WEBRip.x264-TBS[TGx]/rick.and.morty.s04e01.1080p.webrip.x264-tbs.mkv
Input: /var/lib/transmission/Downloads/Rick.and.Morty.S04E02.1080p.WEBRip.x264-TBS[TGx]/rick.and.morty.s04e02.1080p.webrip.x264-tbs.mkv
Input: /var/lib/transmission/Downloads/Rick.and.Morty.S04E03.1080p.WEBRip.x264-TBS[TGx]/rick.and.morty.s04e03.1080p.webrip.x264-tbs.mkv
Input: /var/lib/transmission/Downloads/Rick.and.Morty.S04E04.Claw.and.Hoarder.Special.Ricktims.Morty.HDTV.x264-CRiMSON[TGx]/Rick.and.Morty.S04E04.Claw.and.Hoarder.Special.Ricktims.Morty.HDTV.x264-CRiMSON.mkv
Input: /var/lib/transmission/Downloads/Rick.and.Morty.S04E05.1080p.WEBRip.x264-TBS[TGx]/rick.and.morty.s04e05.1080p.webrip.x264-tbs.mkv
Input: /var/lib/transmission/Downloads/Rick.and.Morty.S04E06.1080p.WEBRip.x264-CAFFEiNE[TGx]/Rick.and.Morty.S04E06.1080p.WEBRip.x264-CAFFEiNE.mkv
Input: /var/lib/transmission/Downloads/Rick.and.Morty.S04E07.1080p.WEBRip.x264-BTX[TGx]/rick.and.morty.s04e07.1080p.webrip.x264-btx.mkv
Input: /var/lib/transmission/Downloads/Rick.and.Morty.S04E08.1080p.WEBRip.x264-BTX[TGx]/rick.and.morty.s04e08.1080p.webrip.x264-btx.mkv
Input: /var/lib/transmission/Downloads/Rick.and.Morty.S04E09.1080p.WEBRip.x264-BTX[TGx]/rick.and.morty.s04e09.1080p.webrip.x264-btx.mkv
Group: {Series=rick and morty} => [rick.and.morty.s04e01.1080p.webrip.x264-tbs.mkv, rick.and.morty.s04e02.1080p.webrip.x264-tbs.mkv, rick.and.morty.s04e03.1080p.webrip.x264-tbs.mkv, Rick.and.Morty.S04E04.Claw.and.Hoarder.Special.Ricktims.Morty.HDTV.x264-CRiMSON.mkv, rick.and.morty.s04e05.1080p.webrip.x264-tbs.mkv, Rick.and.Morty.S04E06.1080p.WEBRip.x264-CAFFEiNE.mkv, rick.and.morty.s04e07.1080p.webrip.x264-btx.mkv, rick.and.morty.s04e08.1080p.webrip.x264-btx.mkv, rick.and.morty.s04e09.1080p.webrip.x264-btx.mkv]
Rename episodes using [TheTVDB] with [Airdate Order]
Auto-detected query: [Rick and Morty]
Fetching episode data for [Rick and Morty]
[DUPLICATE] from [/var/lib/transmission/Downloads/Rick.and.Morty.S04E01.1080p.WEBRip.x264-TBS[TGx]/rick.and.morty.s04e01.1080p.webrip.x264-tbs.mkv] to [/mnt/samba/TV Shows/Rick and Morty/Season 04/Rick and Morty - S04E01 - Edge of Tomorty - Rick Die Rickpeat.mkv]
[DUPLICATE] from [/var/lib/transmission/Downloads/Rick.and.Morty.S04E02.1080p.WEBRip.x264-TBS[TGx]/rick.and.morty.s04e02.1080p.webrip.x264-tbs.mkv] to [/mnt/samba/TV Shows/Rick and Morty/Season 04/Rick and Morty - S04E02 - The Old Man and the Seat.mkv]
[DUPLICATE] from [/var/lib/transmission/Downloads/Rick.and.Morty.S04E03.1080p.WEBRip.x264-TBS[TGx]/rick.and.morty.s04e03.1080p.webrip.x264-tbs.mkv] to [/mnt/samba/TV Shows/Rick and Morty/Season 04/Rick and Morty - S04E03 - One Crew Over the Crewcoo's Morty.mkv]
[DUPLICATE] from [/var/lib/transmission/Downloads/Rick.and.Morty.S04E04.Claw.and.Hoarder.Special.Ricktims.Morty.HDTV.x264-CRiMSON[TGx]/Rick.and.Morty.S04E04.Claw.and.Hoarder.Special.Ricktims.Morty.HDTV.x264-CRiMSON.mkv] to [/mnt/samba/TV Shows/Rick and Morty/Season 04/Rick and Morty - S04E04 - Claw and Hoarder - Special Ricktim's Morty.mkv]
[DUPLICATE] from [/var/lib/transmission/Downloads/Rick.and.Morty.S04E05.1080p.WEBRip.x264-TBS[TGx]/rick.and.morty.s04e05.1080p.webrip.x264-tbs.mkv] to [/mnt/samba/TV Shows/Rick and Morty/Season 04/Rick and Morty - S04E05 - Rattlestar Ricklactica.mkv]
[DUPLICATE] from [/var/lib/transmission/Downloads/Rick.and.Morty.S04E06.1080p.WEBRip.x264-CAFFEiNE[TGx]/Rick.and.Morty.S04E06.1080p.WEBRip.x264-CAFFEiNE.mkv] to [/mnt/samba/TV Shows/Rick and Morty/Season 04/Rick and Morty - S04E06 - Never Ricking Morty.mkv]
[DUPLICATE] from [/var/lib/transmission/Downloads/Rick.and.Morty.S04E07.1080p.WEBRip.x264-BTX[TGx]/rick.and.morty.s04e07.1080p.webrip.x264-btx.mkv] to [/mnt/samba/TV Shows/Rick and Morty/Season 04/Rick and Morty - S04E07 - Promortyus.mkv]
[DUPLICATE] from [/var/lib/transmission/Downloads/Rick.and.Morty.S04E08.1080p.WEBRip.x264-BTX[TGx]/rick.and.morty.s04e08.1080p.webrip.x264-btx.mkv] to [/mnt/samba/TV Shows/Rick and Morty/Season 04/Rick and Morty - S04E08 - The Vat of Acid Episode.mkv]
[DUPLICATE] from [/var/lib/transmission/Downloads/Rick.and.Morty.S04E09.1080p.WEBRip.x264-BTX[TGx]/rick.and.morty.s04e09.1080p.webrip.x264-btx.mkv] to [/mnt/samba/TV Shows/Rick and Morty/Season 04/Rick and Morty - S04E09 - Childrick of Mort.mkv]
Processed 9 files
Fetching series artwork for [Rick and Morty / Season 4] to [/mnt/samba/TV Shows/Rick and Morty/Season 04]
Generate Series NFO: Rick and Morty [275274]
Fetching /mnt/samba/TV Shows/Rick and Morty/poster.jpg => [poster/graphical/680x1000, en, 21.0, https://artworks.thetvdb.com/banners/posters/275274-2.jpg]
Fetching /mnt/samba/TV Shows/Rick and Morty/banner.jpg => [series/graphical/758x140, en, 6.0, https://artworks.thetvdb.com/banners/graphical/275274-g6.jpg]
Fetching /mnt/samba/TV Shows/Rick and Morty/fanart.jpg => [fanart/graphical/1920x1080, en, 16.0, https://artworks.thetvdb.com/banners/fanart/original/275274-9.jpg]
Fetching /mnt/samba/TV Shows/Rick and Morty/Season 04/poster.jpg => [season/4/680x1000, en, 1.0, https://artworks.thetvdb.com/banners/seasons/5dc9d7c82d545.jpg]
Banner not found: /mnt/samba/TV Shows/Rick and Morty/Season 04/banner.jpg / seasonwide:seasonwide
Fetch failed: Try again in 2 seconds (2 more) => java.net.UnknownHostException: webservice.fanart.tv
Fetch failed: Try again in 8 seconds (1 more) => java.net.UnknownHostException: webservice.fanart.tv
Fetching /mnt/samba/TV Shows/Rick and Morty/clearart.png => [hdclearart, en, 4.0, https://assets.fanart.tv/fanart/tv/275274/hdclearart/rick-and-morty-591de5513a686.png]
Fetching /mnt/samba/TV Shows/Rick and Morty/logo.png => [hdtvlogo, en, 7.0, https://assets.fanart.tv/fanart/tv/275274/hdtvlogo/rick-and-morty-57487d936bc9e.png]
Fetching /mnt/samba/TV Shows/Rick and Morty/landscape.jpg => [tvthumb, en, 5.0, https://assets.fanart.tv/fanart/tv/275274/tvthumb/rick-and-morty-5a18b278e02da.jpg]
Fanart not found: /mnt/samba/TV Shows/Rick and Morty/Season 04/landscape.jpg / seasonthumb
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: scripting help, understanding commands

Post by rednoah »

1.
You have 2 input arguments:

Code: Select all

Argument[0]: /var/lib/transmission/Downloads
Argument[1]: /var/lib/transmission/unsorted

And all files in those 2 input folders will be processed with default formats, using --output as absolute output folder:

Code: Select all

--output "/mnt/samba/"

2.
If you want to override the destination path for unsorted files, then you need to pass in your own absolute --def unsortedFormat instead of relying on the default.
https://github.com/filebot/scripts/blob ... groovy#L64

e.g.

Code: Select all

--def unsortedFormat="/var/lib/transmission/unsorted/{fn}"
:!: Make sure to remove /var/lib/transmission/unsorted from the input arguments as well so you don't create an accidental infinite loop.


3.
webservice.fanart.tv resolves just fine for me:

Code: Select all

curl -I https://webservice.fanart.tv/
HTTP/1.1 200 OK
Server: nginx/1.15.9
Date: Thu, 04 Jun 2020 04:59:55 GMT
...
:arrow: If you're using the DNS service provided by your ISP by default, contact your ISP and report the problem, and then switch to using CloudFlare DNS instead:
https://www.cloudflare.com/learning/dns ... s-1.1.1.1/
:idea: Please read the FAQ and How to Request Help.
Post Reply