Skip to content

Commit

Permalink
Adds FileBot and utf8
Browse files Browse the repository at this point in the history
  • Loading branch information
Esya committed Sep 22, 2015
1 parent 586e432 commit 0f4dccd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ ENV VER_RTORRENT 0.9.4

WORKDIR /usr/local/src

# Filebot
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
RUN echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y oracle-java8-installer wget
RUN wget -O filebot.deb 'https://app.filebot.net/download.php?type=deb&arch=amd64'
RUN dpkg -i filebot.deb
RUN dpkg-reconfigure locales
RUN rm filebot.deb

# In case your movies/series have accents in their titles, utf-8 needed
RUN locale-gen --purge en_US.UTF-8
RUN echo -e 'LANG="en_US.UTF-8"\nLANGUAGE="en_US:en"\n' > /etc/default/locale

# This long disgusting instruction saves your image ~130 MB
RUN build_deps="automake build-essential ca-certificates libc-ares-dev libcppunit-dev libtool"; \
build_deps="${build_deps} libssl-dev libxml2-dev libncurses5-dev pkg-config subversion wget"; \
Expand Down
4 changes: 4 additions & 0 deletions rootfs/usr/local/bin/docktorrent
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,9 @@ chown -R www-data:www-data /rtorrent
sed -i '/allow 127.0.0.1/a allow '${AUTH_OFF}';' /etc/nginx/sites-enabled/default
}

# Symlink TV/Anime/Movies
grep "rtorrent-postprocess" /root/.rtorrent.rc \
|| echo 'system.method.set_key=event.download.finished,filebot_amc,"execute={/usr/local/bin/rtorrent-postprocess,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"' >> /root/.rtorrent.rc

# Use s6 to supervise all services
exec /usr/bin/s6-svscan -t0 /service
7 changes: 7 additions & 0 deletions rootfs/usr/local/bin/rtorrent-postprocess
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
TORRENT_PATH=$1
TORRENT_NAME=$2
TORRENT_LABEL=$3

mkdir -p /rtorrent/sorted && cd /rtorrent/sorted || exit 1
filebot -script fn:amc --output . --log-file amc.log --action symlink --conflict override -non-strict --def music=y artwork=y "ut_dir=$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &

0 comments on commit 0f4dccd

Please sign in to comment.