Tag Archives: Transmission

Install Transmission on CentOS 7

Nowadays it’s really simple to install Transmission on CentOS 7 or EL distro. First you need to install EPEL packages:

$ yum install epel-release
$ yum -y update

…or use the following command if you’re running Red Hat Enterprise Linux:

$ yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E '%{rhel}').noarch.rpm

Install Transmission:

$ yum install transmission-cli transmission-common transmission-daemon

Create storage directory:

$ mkdir /ebs-data/transmission/
$ chown -R transmission.transmission /ebs-data/transmission/

Start and stop the Transmission to auto generate configs:

$ systemctl start transmission-daemon.service
$ systemctl stop transmission-daemon.service

To edit the config, you MUST first stop the daemon, otherwise the config will be overwritten after you restart the daemon:

$ systemctl stop transmission-daemon.service
$ var /var/lib/transmission/.config/transmission-daemon/settings.json

Edit config:

"download-dir": "/ebs-data/transmission",
"incomplete-dir": "/ebs-data/transmission",
"rpc-authentication-required": true,
"rpc-enabled": true,
"rpc-password": "my_password",
"rpc-username": "my_user",
"rpc-whitelist": "0.0.0.0",
"rpc-whitelist-enabled": false,

Save and start daemon:

$ systemctl start transmission-daemon.service

Access via your browser:

$ open http://localhost:9091/transmission/web/

FlexGet + Transmission + Plex AniDB Agent on OS X

目標

  • 自動下載新番種子
  • 種子自動加入 Transmission 下載隊列
  • 新番文件自動重命名到 Plex 兼容格式
  • 通過 Plex AniDB agent 自動獲取新番相關信息

實現方法

  • 通過 FlexGet 讀取 RSS,自動下載種子文件
  • 通過 FlexGet 的 transmissionrpc 插件自動將種子傳送到 Transmission
  • Transmission 下載完成後觸發腳本,自動將種子重命名為 Plex 可識別格式
  • 通過 Plex 的第三方 agent:AniDB 自動獲取新番相關訊息

配料表

  • 裝有 OS X 的電腦一部
  • Plex 一只
  • Transmission 一只
  • FlexGet 一只

配置 FlexGet

FlexGet 的安裝方法和自動運行請參考參考 官方文檔,寫的很詳細

配置文件如下,要點在於 presets.global.transmission.path,為了能讓 Plex 識別和方便管理,每一個動畫 要分別放在相應命名的目錄。其中 {{task}} 對應的就是 tasks 下的新番標題:

presets:
global:
accept_all: true
transmission:
host: localhost
port: 9091
addpaused: No
ratio: 0.01
removewhendone: Yes
path: "/Volumes/Backups HD/Anime/{{task}}/"
tasks:
WHITE ALBUM2:
rss: http://bt.ktxp.com/rss-search-%E6%BE%84%E7%A9%BA%E5%AD%A6%E5%9B%AD+%E7%99%BD%E8%89%B2%E7%9B%B8%E7%B0%BF+2+MP4+720p.xml
アウトブレイク・カンパニー:
rss: http://bt.ktxp.com/rss-search-%E6%BE%84%E7%A9%BA%E5%AD%A6%E5%9B%AD+%E8%90%8C%E8%90%8C%E4%BE%B5%E7%95%A5%E8%80%85+MP4+720p.xml
ガリレイドンナ:
rss: http://bt.ktxp.com/rss-search-%E6%BE%84%E7%A9%BA%E5%AD%A6%E5%9B%AD+%E4%BC%BD%E5%88%A9%E7%95%A5%E5%B0%91%E5%A5%B3+%E7%AE%80%E4%BD%93+MP4+720p.xml
キルラキル:
rss: http://bt.ktxp.com/rss-search-%E6%A5%B5%E5%BD%B1%E5%AD%97%E5%B9%95%E7%A4%BE+Kill+La+Kill+BIG5+MP4+720p.xml
京騒戯画:
rss: http://bt.ktxp.com/rss-search-WOLF+%E4%BA%AC%E9%AA%9A%E6%88%8F%E7%94%BB+GB+720P+MP4.xml
凪のあすから:
rss: http://bt.ktxp.com/rss-search-%E5%8B%95%E6%BC%AB%E5%9C%8B+%E4%BE%86%E8%87%AA%E9%A2%A8%E5%B9%B3%E6%B5%AA%E9%9D%9C%E7%9A%84%E6%98%8E%E5%A4%A9+720P+%E7%B9%81%E9%AB%94+MP4.xml
境界の彼方:
rss: http://bt.ktxp.com/rss-search-%E6%BE%84%E7%A9%BA%E5%AD%A6%E5%9B%AD+%E5%A2%83%E7%95%8C%E7%9A%84%E5%BD%BC%E6%96%B9+%E7%AE%80%E4%BD%93+MP4+720p.xml
夜桜四重奏 ~ハナノウタ~:
rss: http://bt.ktxp.com/rss-search-%E6%A5%B5%E5%BD%B1%E5%AD%97%E5%B9%95%E7%A4%BE+%E5%A4%9C%E6%AB%BB%E5%9B%9B%E9%87%8D%E5%A5%

view raw
config.yml
hosted with ❤ by GitHub

配置 Transmission

Transmission 本身不需要進行過多配置,為了避免下載隊列越來越多,記得勾選下載完成後從隊列刪除這個選項。下面是其對應的 post-process 腳本:

#!/bin/sh
# Search all subdirectories
# Use rename -n for dry-run
cd /Volumes/Backups\ HD/Anime
find . -name '*.mp4' -print0 | xargs -0 /usr/local/bin/rename -f 's/\[(.*)\]\[(.*)\]\[(\d{2})\].*$/$2 – $3\.mp4/'

上述腳本會通過正則將 [Fansub][Title][Episode]*.mp4 這樣的格式替換為 Plex 可識別的 Title - Episode.mp4 格式,例如 [WOLF&HYSUB][Kyousougiga][00][GB][720P][MP4].mp4 就會被替換為 Kyousougiga - 00.mp4

配置 Plex w/ Hama Agent

注意!,已棄用 AniDB agent,改為 Hama Agent。詳情請訪問最新文章:Hama (HTTP Anidb Metadata Agent) and Plex Media Server – 2014-04-09

訪問 Plex 論壇 下載 AniDB agent 并安裝,通過 Plex 的 web 界面進行管理即可,以下是效果圖: