Transform existing/working amc script to docker command amc script

Support for Ubuntu and other Desktop Linux distributions
Post Reply
IcyCat
Posts: 7
Joined: 20 Mar 2017, 13:29

Transform existing/working amc script to docker command amc script

Post by IcyCat »

Hey All,

I've been moving my automated mediacenter to docker containers, and previously I had a AMC script that would determine from a list of drives which one had storage available and then places the movie or tv show into that drive. Im unable to get that to work with docker filebot-watcher. The error I get when trying to read movies.txt and or tvshows.txt is

Code: Select all

Invalid format expression: /home/xxx/plex/movies.txt
Below you will see my original script and then below that is my docker-compose.yml

Original Cygwin64 script

Code: Select all

sudo filebot/filebot -script fn:amc 'G:/lftps/' --output '/' --action move --conflict auto --def seriesFormat=@"C:/cygwin64/home/xxx/tvshows.txt" --def movieFormat=@"C:/cygwin64/home/xxx/movies.txt" -non-strict --log-file "C:\scripts\filebot\amc.log" --def "pushbullet=xxx" "plex=xxx" --def "clean=n" "deleteAfterExtract=n"
Movies.txt

Code: Select all

{["D:", "E:", "I:", "L:"].collect{ (it+"/" + "Movies" + "/" +n) as File }.sort{a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace}.last()}/{ny}/{ny}
TVShows.txt

Code: Select all

{["H:", "E:", "I:", "L:"].collect{ (it+"/" + "Tv Shows" + "/" +n) as File }.sort{a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace}.last()}/Season {s}/{n} - {s00e00} - {t}
Docker Compose YML

Code: Select all

 filebot:
    container_name: filebot-watcher
    image: rednoah/filebot:watcher
    restart: unless-stopped
    environment:
      - SETTLE_DOWN_TIME=5
      - PUID=1000
      - PGID=1000
    volumes:
      - ./config/FileBot:/data
      - /mnt/data:/mnt/data
      - /mnt/data/downloads:/downloads
      - /mnt/data/downloads/output:/output
      - /home/xxx/plex:/home/xxx/plex
      - /mnt/d/movies:/media/movies/MoviesD
      - /mnt/e/movies:/media/movies/MoviesE
      - /mnt/h/movies:/media/movies/MoviesH
      - /mnt/i/movies:/media/movies/MoviesI
      - /mnt/l/2160p:/media/movies/2160pL
      - /mnt/d/2160p:/media/movies/2160pD
      - /mnt/e/2160p:/media/movies/2160pE
      - /mnt/i/2160:/media/movies/2160pI
      - /mnt/e/Tv Shows:/media/tv/TvShowsE
      - /mnt/h/Tv Shows:/media/tv/TvShowsH
      - /mnt/i/Tv Shows:/media/tv/TvShowsI
    command: /downloads --output /output --action move --conflict auto --encoding utf8 --def seriesFormat="/home/xxx/plex/tvshows.txt" --def movieFormat="/home/xxx/plex/movies.txt" -non-strict --def "clean=n" "deleteAfterExtract=n"
Movies.txt

Code: Select all

{["/media/movies/MoviesD", "/media/movies/MoviesE", "/media/movies/MoviesH", "/media/movies/MoviesI"].collect{ (it+"/" + "Movies" + "/" +n) as File }.sort{a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace}.last()}/{ny}/{ny}
TVShows.txt

Code: Select all

{['/media/tv/TvShowsH', '/media/tv/TvShowsE', '/media/tv/TvShowsI'].collect{ (it+'/' + 'Tv Shows' + '/' +n) as File }.sort{a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace}.last()}/Season {s}/{n} - {s00e00} - {t}y
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Transform existing/working amc script to docker command amc script

Post by rednoah »

Why did you remove the @ in the command that is executed inside your docker container?


e.g. absolute @file on Windows

Code: Select all

--def seriesFormat="@C:/path/to/SeriesFormat.txt"
e.g. absolute @file on Linux

Code: Select all

--def seriesFormat="@/path/to/SeriesFormat.txt"
:idea: Please read the FAQ and How to Request Help.
IcyCat
Posts: 7
Joined: 20 Mar 2017, 13:29

Re: Transform existing/working amc script to docker command amc script

Post by IcyCat »

rednoah, you're right. Thank you so much.

Sidenote: You helped me back in 2017 with that original script. Big thank you!
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Transform existing/working amc script to docker command amc script

Post by rednoah »

IcyCat wrote: 11 Oct 2021, 16:53 Sidenote: You helped me back in 2017 with that original script. Big thank you!
Nice to know that most formats, even some of the more complex ones, don't break with one update or another. :D
:idea: Please read the FAQ and How to Request Help.
Post Reply