Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD Unpackerr #616

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ If you have a spare domain name you can configure applications to be accessible
* [Traefik](https://traefik.io/) - Web proxy and SSL certificate manager
* [Transmission](https://transmissionbt.com/) - BitTorrent client (with OpenVPN if you have a supported VPN provider)
* [Ubooquity](http://vaemendis.net/ubooquity/) - Book and comic server
* [Unpackerr](https://github.com/davidnewhall/unpackerr/) - Extracts compressed archive files.
* [uTorrent](https://www.utorrent.com/) - The best torrent downloading app for beginners
* [Virtual Desktop](https://github.com/RattyDAVE/docker-ubuntu-xrdp-mate-custom) - A virtual desktop running on your NAS.
* [Wallabag](https://wallabag.org/) - Save and classify articles. Read them later.
Expand Down
5 changes: 5 additions & 0 deletions nas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@
- ubooquity
when: (ubooquity_enabled | default(False))

- role: unpackerr
tags:
- unpackerr
when: (unpackerr_enabled | default(False))

- role: utorrent
tags:
- utorrent
Expand Down
19 changes: 19 additions & 0 deletions roles/unpackerr/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
unpackerr_enabled: false
unpackerr_available_externally: false

# directories
unpackerr_movies_directory: "{{ movies_root }}"
unpackerr_download_directory: "{{ downloads_root }}"
unpackerr_data_directory: "{{ docker_home }}/unpackerr"
unpackerr_tv_directory: "{{ tv_root }}"

# uid / gid
unpackerr_user_id: "0"
unpackerr_group_id: "0"

# network
unpackerr_hostname: "unpackerr"

# specs
unpackerr_memory: 1g
37 changes: 37 additions & 0 deletions roles/unpackerr/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
- name: Create Unpackerr Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ unpackerr_data_directory }}"

- name: "Check if unpackerr config exists"
stat:
path: "{{ unpackerr_data_directory }}/unpackerr.conf"
register: unpackerr_config_path

- name: Download Unpackerr default config
get_url:
url: https://raw.githubusercontent.com/davidnewhall/unpackerr/master/examples/unpackerr.conf.example
dest: "{{ unpackerr_data_directory }}/unpackerr.conf"
force: no
backup: yes
when: not unpackerr_config_path.stat.exists

- name: Unpackerr
docker_container:
name: unpackerr
image: golift/unpackerr
pull: true
volumes:
- "{{ unpackerr_movies_directory }}:/movies:rw"
- "{{ unpackerr_download_directory }}:/downloads:rw"
- "{{ unpackerr_tv_directory }}:/tv:rw"
- "{{ unpackerr_data_directory }}:/config:rw"
env:
TZ: "{{ ansible_nas_timezone }}"
PUID: "{{ unpackerr_user_id }}"
PGID: "{{ unpackerr_group_id }}"
restart_policy: unless-stopped
memory: "{{ unpackerr_memory }}"
13 changes: 13 additions & 0 deletions website/docs/applications/download-tools/unpackerr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "Unpackerr"
---

Homepage: <https://github.com/davidnewhall/unpackerr>

Unpackerr runs as a daemon on your download host. It checks for completed downloads and extracts them so Lidarr, Radarr, Readarr, and Sonarr may import them. There are a handful of options out there for extracting and deleting files after your client downloads them. I just didn't care for any of them, so I wrote my own. I wanted a small single-binary with reasonable logging that can extract downloaded archives and clean up the mess after they've been imported.

## Usage

Set `unpackerr_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.

Then edit `unpackerr.conf` to fit your requirements, and restart the docker instance to apply.