https://github.com/markjay4k/autoshift
Automatically transfer media files from Transmission to Jellyfin
https://github.com/markjay4k/autoshift
Last synced: 4 months ago
JSON representation
Automatically transfer media files from Transmission to Jellyfin
- Host: GitHub
- URL: https://github.com/markjay4k/autoshift
- Owner: markjay4k
- License: unlicense
- Created: 2024-01-01T00:33:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-09T17:04:04.000Z (over 2 years ago)
- Last Synced: 2024-12-30T23:33:54.055Z (over 1 year ago)
- Language: Python
- Size: 51.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AUTOSHIFT
Automatically transfers torrent media files from _Transmission_ to _Jellyfin_
library once seed threshold achieved.
## WHAT IT DOES
Autoshift routinely scans the _Transmission_ library to identify torrents ready
to transfer. A torrent is ready when
- Download is complete
- Seed threshold is achieved
Once identified as _ready_, the media-type is determined by parsing with
[`PTN`](https://github.com/divijbindlish/parse-torrent-name) to
determine the appropriate _Jellyfin_ directory. Finally, the torrent is removed
from _Transmission_ following the transfer.
## LIMITATIONS
- Autoshift uses `transmission_rpc` and only works with [_Transmission Bittorrent
Client_](https://github.com/transmission/transmission).
- It's highly recommended to put both _Transmission_ and _Jellyfin_ libraries on the
same filesystem, which makes torrent transfer super fast. For example, with ZFS, having
both libraries on the same dataset means the move is simply updating metadata,
rather than moving large audio/video files. If they are separate
filesystems, the entire files need to be copied and deleted which consumes
much more time, electrical power, and ware on your storage drives.
## ASSUMPTIONS
1. You have [Docker Engine and Compose](https://docs.docker.com/engine/install/) already
installed.
2. You have [_Transmission_](https://github.com/transmission/transmission) and
[_Jellyfin_](https://github.com/jellyfin/jellyfin) installed (preferrably as Docker
containers).
## INSTALL
1. Clone autoshift
```bash
git clone git@github.com:markjay4k/autoshift.git
cd autoshift
```
2. create a docker network called `torrents`
```bash
docker network create torrents
```
3. create a `.env` file with the following environment variables
```yaml
BASE_MEDIA=/path/to/ZFS_dataset # both libraries stored here
TR_PATH=/path/to/transmission/downloads/directory
JF_MOVIES=/path/to/jellyfin/movies/directory
JF_SHOWS=/path/to/jellyfin/shows/directory
TR_HOST_IP=transmission.torrents
TR_HOST_PORT=9091
TR_USER=username #transmission username (optional)
TR_PASS=password #transmission password (optional)
LOG_LEVEL=DEBUG
CRON_SCHEDULE=0 */4 * * *
```
4. Choose an appropriate scan interval with the `CRON_SCHEDULE` variable. You
can refer to [Cron GURU](https://crontab.guru/examples.html) for simple
copy/paste options to use. The example provided is once every 4 hours.
5. Start the container with Docker Compose
```bash
docker compose up -d --build
```