Unpackerr / unpackerr

Extracts downloads for Radarr, Sonarr, Lidarr, Readarr, and/or a Watch folder - Deletes extracted files after import
https://unpackerr.zip
MIT License
990 stars 36 forks source link

Paths query #104

Closed moorsey closed 3 years ago

moorsey commented 3 years ago

Evening

Not been able to find the answer to this for sure.

The "paths" variable in the config, should this be the path inside the Sonarr / Radarr docker? Rather than full actual system path? I am just getting "Configured paths do not exist" in logs, but have tried both ways and not had any joy as yet. I currently have it matched to Sonarr/Radarr configured "Local Path"

Tried leaving blank also to see if it picked up itself, but it fails on that also

Top of logs:

2021/03/03 19:44:03.321337 start.go:235: Unpackerr v0.7.2-275 Starting! (PID: 1) 2021-03-03 19:44:03.31945678 +0000 UTC m=+0.029422215,
2021/03/03 19:44:03.321370 logs.go:177: ==> GoLift Discord: https://golift.io/discord <==,
2021/03/03 19:44:03.321381 logs.go:178: ==> Startup Settings <==,
2021/03/03 19:44:03.321425 sonarr.go:41:  => Sonarr Config: 1 server: https://sonarr.blah.org/, apikey:true, timeout:10s, verify ssl:false, protos:torrent, paths:["/downloads/complete"],
2021/03/03 19:44:03.321444 radarr.go:41:  => Radarr Config: 1 server: https://radarr.blah.org/, apikey:true, timeout:10s, verify ssl:false, protos:torrent, paths:["/downloads/complete"],
2021/03/03 19:44:03.321455 lidarr.go:45:  => Lidarr Config: 0 servers,
2021/03/03 19:44:03.321473 readarr.go:45:  => Readarr Config: 0 servers,
2021/03/03 19:44:03.321489 folder.go:57:  => Folder Config: 0 paths, event buffer: 20000,
2021/03/03 19:44:03.321503 logs.go:184:  => Parallel: 1,
2021/03/03 19:44:03.321529 logs.go:185:  => Interval: 5m0s,
2021/03/03 19:44:03.321544 logs.go:186:  => Delete Delay: 1s,
2021/03/03 19:44:03.321565 logs.go:187:  => Start Delay: 1m0s,
2021/03/03 19:44:03.321581 logs.go:188:  => Retry Delay: 5m0s,
2021/03/03 19:44:03.321598 logs.go:189:  => Debug / Quiet: true / false,
2021/03/03 19:44:03.321612 logs.go:190:  => Directory & File Modes: 0755 & 0644,
2021/03/03 19:44:03.321626 webhook.go:200:  => Webhook Configs: 0 URLs,
2021/03/03 19:44:03.699641 sonarr.go:72: [Sonarr] Updated (https://sonarr.blah.org/): 0 Items Queued,
2021/03/03 19:44:03.754520 radarr.go:72: [Radarr] Updated (https://radarr.blah.org/): 229 Items Queued,
2021/03/03 19:44:03.754588 handlers.go:182: [DEBUG] Radarr: Configured paths do not exist; could not find alternative path in error message for.............

The 229 items isn't correct, one is pending unpacking, after this it lists everything from Transmission. Presume after it gets the right paths, it will sort itself out on the numbers

Config:

##      Unpackerr Example Configuration File      ##
## The following values are application defaults. ##
####################################################

# [true/false] Turn on debug messages in the output. Do not wrap this in quotes.
# Recommend trying this so you know what it looks like. I personally leave it on.
debug = true

# Disable writing messages to stdout. This silences the app. You should set a log
# file below if you set this to true.
quiet = false

# Write messages to a log file. This is the same data that is normally output to stdout.
# This setting is great for Docker users that want to export their logs to a file.
# The alternative is to use syslog to log the output of the application to a file.
# Default is no log file; this is unset. log_files=0 turns off auto-rotation.
# Default files is 10 and size(mb) is 10 Megabytes; both doubled if debug is true.
# Windows paths must use two backslashes: "C:\\Some\\Path\\Unpacker.log" (true everywhere).
#log_file = "/downloads/unpackerr.log"
log_files = 10
log_file_mb = 10

# How often to poll sonarr and radarr.
# Recommend 1m-5m. Uses Go Duration.
interval = "5m"

# How long an item must be queued (download complete) before extraction will start.
# One minute is the historic default and works well. Set higher if your downloads
# take longer to finalize (or transfer locally). Uses Go Duration.
start_delay = "1m"

# How long to wait before removing the history for a failed extraction.
# Once the history is deleted the item will be recognized as new and
# extraction will start again. Uses Go Duration.
retry_delay = "5m"

# How many files may be extracted in parallel. 1 works fine.
# Do not wrap the number in quotes. Raise this only if you have fast disks and CPU.
parallel = 1

# Use these configurations to control the file modes used for newly extracted
# files and folders. Recommend 0644/0755 or 0666/0777.
file_mode = "0644"
dir_mode = "0755"

##-Notes-######################################################################
## The following sections can be repeated if you have more than one Sonarr,   #
## Radarr or Lidarr, Readarr, Folder or Webhook.                              #
## You must uncomment the [[header]] and api_key at a minimum for Starr apps. #
###############################################################################

################
### Webhooks ###
################
# Sends a webhook when an extraction starts and again when it finishes.
# Created to integrate with discordnotifier.com.
# Can possibly be used with other services. Don't forget to uncomment [[webhook]].
#[[webhook]]
#  url        = "https://discordnotifier.com/notifier.php?api=abcdef-ghijklmn-op"
#  name       = ""    # Set this to hide the URL in logs.
#  silent     = false # do not log success (less log spam)
#  events     = [0]   # list of event ids to include, 0 == all.
#  exclude    = []    # list of apps to exclude, ie. ["radarr", "lidarr"]

################
### Episodes ###
################
[[sonarr]]
url = "https://sonarr.blah.org/"
api_key = "blah"
## File system path where downloaded Sonarr items are located.
  paths = ["/downloads/complete"]
## Default protocols is torrent. Alternative: "torrent,usenet"
#  protocols = "torrent"
## How long to wait for a reply from the backend.
#  timeout = "10s"
## How long ago a file must have been imported before deletion. The file must
## also not be part of an active queue item. Set this to "1m" to make sure files
## are deleted quickly after being imported. Recommend "5m". Uses Go Duration.
## Setting this to any negative number `-1` disables deleting extracted files.
#  delete_delay = "5m"
## If you use this app with NZB you may wish to delete archives after extraction.
## General recommendation is: do not enable this for torrent use.
## This setting is not affected by `delete_delay`.
#  delete_orig = false

################
#### Movies ####
################
[[radarr]]
url = "https://radarr.blah.org/"
api_key = "blah"
## File system path where downloaded Radarr items are located.
  paths = ["/downloads/complete"]
## Default protocols is torrents. Alternative: "torrent,usenet"
#  protocols = "torrent"
## How long to wait for a reply from the backend.
#  timeout = "10s"
## How long ago a file must have been imported before deletion. The file must
## also not be part of an active queue item. Set this to "1m" to make sure files
## are deleted quickly after being imported. Recommend "5m". Uses Go Duration.
## Setting this to any negative number `-1` disables deleting extracted files.
#  delete_delay = "5m"
## If you use this app with NZB you may wish to delete archives after extraction.
## General recommendation is: do not enable this for torrent use.
## This setting is not affected by `delete_delay`.
#  delete_orig = false

################
#### Albums ####
################
#[[lidarr]]
#  url = "http://127.0.0.1:8686"
#  api_key = "0123456789abcdef0123456789abcdef"
## File system path where downloaded Lidarr items are located.
#  paths = ["/downloads"]
## Default protocols is torrent. Alternative: "torrent,usenet"
#  protocols = "torrent"
## How long to wait for a reply from the backend.
#  timeout = "10s"
## How long ago a file must have been imported before deletion. The file must
## also not be part of an active queue item. Set this to "1m" to make sure files
## are deleted quickly after being imported. Recommend "5m". Uses Go Duration.
## Setting this to any negative number `-1` disables deleting extracted files.
#  delete_delay = "5m"
## If you use this app with NZB you may wish to delete archives after extraction.
## General recommendation is: do not enable this for torrent use.
## This setting is not affected by `delete_delay`.
#  delete_orig = false

################
# Publications #
################
#[[readarr]]
#  url = "http://127.0.0.1:8787"
#  api_key = "0123456789abcdef0123456789abc"
## File system path where downloaded Readarr items are located.
#  paths = ["/downloads"]
## Default protocols is torrent. Alternative: "torrent,usenet"
#  protocols = "torrent"
## How long to wait for a reply from the backend.
#  timeout = "10s"
## How long ago a file must have been imported before deletion. The file must
## also not be part of an active queue item. Set this to "1m" to make sure files
## are deleted quickly after being imported. Recommend "5m". Uses Go Duration.
## Setting this to any negative number `-1` disables deleting extracted files.
#  delete_delay = "5m"
## If you use this app with NZB you may wish to delete archives after extraction.
## General recommendation is: do not enable this for torrent use.
## This setting is not affected by `delete_delay`.
#  delete_orig = false

##-Folders-####################################################################
## This application can also watch folders for things to extract. If you copy a
## subfolder into a watched folder (defined below) any extractable items in the
## folder will be decompressed. This has nothing to do with Starr applications.
###############################################################################
#[[folder]]
## Windows paths must use two backslashes: "C:\\Some\\Folder\\To\\Watch"
#  path = "/some/folder/to/watch"
## Delete extracted or original files this long after extraction. Set to 0 to disable all deletes. Uses Go Duration.
#  delete_after = "10m"
## Delete extracted files after successful extraction? true/false, no quotes. Honors delete_after.
#  delete_files = false
## Delete original items after successful extraction? true/false, no quotes. Honors delete_after.
#  delete_original = false
## Move extracted files into original folder? If false, files go into an _unpackerred folder.
#  move_back = false

Many thanks indeed

davidnewhall commented 3 years ago

The error message you "blurred out" should list the path it's looking in, probably /downloads/complete/Thing.You.Downloaded. The question is, where is Thing.You.Downloaded if not in /downloads/complete? Perhaps it's in /downloads/complete/tv-sonarr or perhaps you forgot to mount your download location to /downloads using -v in your docker run command? Sharing the docker run command will help me visualize the rest of your configuration.

The 229 items isn't correct,

Yes, it is. Go into Sonarr, click Activity, then click Options in the top right and check the box to show all your items. Do this in Radarr too..

EDIT: Thank you for including logs and configuration data. You can share your Sonarr docker run command too for more bonus points and faster resolution.

moorsey commented 3 years ago

@davidnewhall Really appreciate the reply, thanks

Sorry for cutting the logs early, bit more before it starts repeating for each file:

2021/03/04 08:57:23.584970 handlers.go:182: [DEBUG] Radarr: Configured paths do not exist; could not find alternative path in error message for TV_show_name_here,
2021/03/04 08:57:23.585051 handlers.go:184: [DEBUG] Radarr: Errors encountered looking for TV_show_name_here path: ["stat /downloads/complete/TV_show_name_here: no such file or directory"],
2021/03/04 08:57:23.585092 handlers.go:83: [Radarr] Waiting for Start Delay: TV_show_name_here (1m0s remains),
2021/03/04 08:57:23.585110 radarr.go:89: [DEBUG] Radarr: (https://radarr.blah.org/): Completed (torrent:100%): TV_show_name_here,

Sonarr docker command:

docker run -d \
--name=sonarr \
-e PUID=1000 \
-e PGID=100 \
-e TZ=Europe/London \
--net=proxy \
-v /sharedfolders/dockerdata2/sonarr:/config \
-v /sharedfolders/media/Videos/Series:/tv \
-v /sharedfolders/downloaded/transmission/downloads:/downloads \
--restart unless-stopped \
linuxserver/sonarr:preview
davidnewhall commented 3 years ago

Is this the same folder mount on Sonarr?

-v /sharedfolders/downloaded/transmission/downloads:/downloads

This seems correct. Does /sharedfolders/downloaded/transmission/downloads contain TV_show_name_here ?

EDIT: oh that was Sonarr. Add the same path mapping [pasted above] to Unpackerr and it should work.

moorsey commented 3 years ago

Yes, Sonarr and Radarr both setup identically, apart from their destination folders

Yes, Transmission downloads to that folder, well actually to /sharedfolders/downloaded/transmission/downloads/complete, but did since change that in what has been copied above. Triple checked the path and yes, the files/folders mentioned exist there.

So in the conf, paths= should be /sharedfolders/downloaded/transmission/downloads/complete ? Just tried and restarted, but same messages in the logs

I did read one report somewhere saying they were having a permissions issue, but didn't see any env options for the unpackerr docker to run with certain GUID / UUID. Just thinking of a possible cause

Latest logs:

2021/03/04 09:20:04.369206 start.go:235: Unpackerr v0.7.2-275 Starting! (PID: 1) 2021-03-04 09:20:04.367762723 +0000 UTC m=+0.000939687,
2021/03/04 09:20:04.369235 logs.go:177: ==> GoLift Discord: https://golift.io/discord <==,
2021/03/04 09:20:04.369251 logs.go:178: ==> Startup Settings <==,
2021/03/04 09:20:04.369277 sonarr.go:41:  => Sonarr Config: 1 server: https://sonarr.blah.org/, apikey:true, timeout:10s, verify ssl:false, protos:torrent, paths:["/sharedfolders/downloaded/transmission//downloads/complete"],
2021/03/04 09:20:04.369307 radarr.go:41:  => Radarr Config: 1 server: https://radarr.blah.org/, apikey:true, timeout:10s, verify ssl:false, protos:torrent, paths:["/sharedfolders/downloaded/transmission/downloads/complete"],
2021/03/04 09:20:04.369317 lidarr.go:45:  => Lidarr Config: 0 servers,
2021/03/04 09:20:04.369328 readarr.go:45:  => Readarr Config: 0 servers,
2021/03/04 09:20:04.369340 folder.go:57:  => Folder Config: 0 paths, event buffer: 20000,
2021/03/04 09:20:04.369350 logs.go:184:  => Parallel: 1,
2021/03/04 09:20:04.369368 logs.go:185:  => Interval: 5m0s,
2021/03/04 09:20:04.369381 logs.go:186:  => Delete Delay: 1s,
2021/03/04 09:20:04.369389 logs.go:187:  => Start Delay: 1m0s,
2021/03/04 09:20:04.369397 logs.go:188:  => Retry Delay: 5m0s,
2021/03/04 09:20:04.369406 logs.go:189:  => Debug / Quiet: true / false,
2021/03/04 09:20:04.369414 logs.go:190:  => Directory & File Modes: 0755 & 0644,
2021/03/04 09:20:04.369424 webhook.go:200:  => Webhook Configs: 0 URLs,
2021/03/04 09:20:04.530301 radarr.go:72: [Radarr] Updated (https://radarr.blah.org/): 230 Items Queued,
2021/03/04 09:20:04.552403 sonarr.go:72: [Sonarr] Updated (https://sonarr.blah.org/): 0 Items Queued,
2021/03/04 09:20:04.552463 handlers.go:182: [DEBUG] Radarr: Configured paths do not exist; could not find alternative path in error message for tv_show_here,
2021/03/04 09:20:04.552525 handlers.go:184: [DEBUG] Radarr: Errors encountered looking for tv_show_here path: ["stat /sharedfolders/downloaded/transmission/downloads/complete/tv_show_here: no such file or directory"],
2021/03/04 09:20:04.552549 handlers.go:83: [Radarr] Waiting for Start Delay: tv_show_here (1m0s remains),
davidnewhall commented 3 years ago

Yes, Sonarr and Radarr both setup identically, apart from their destination folders

Setup identically (same /downloads mount) as Unpackerr?

So in the conf, paths= should be /sharedfolders/downloaded/transmission/downloads/complete ?

No, I believe it should be ["/downloads"]. Just make sure you also add this to your docker run for unpackerr:

-v /sharedfolders/downloaded/transmission/downloads:/downloads 

You can also try ["/downloads", "/downloads/complete"] just for good measure. One of them should work.

I did read one report somewhere saying they were having a permissions issue, but didn't see any env options for the unpackerr docker to run with certain GUID / UUID. Just thinking of a possible cause

If you run golift/unpackerr then it runs as root and should not have permissions issues. If you run the hotio docker container then I believe it has GUID / UUID you can set with env variables.

If none of this gets it working, try changing to this:

-v /sharedfolders/downloaded/transmission/downloads/complete:/downloads 

with paths = ["/downloads"]. I don't suspect this should work any different, but changing things may reveal the problem. Just not seeing it here.

moorsey commented 3 years ago

oh what a fool I have been

Thank you so much for your detailed help on this, I was being an idiot all along, but your last reply gave me the prod in the right direction I needed

Although paths were correct on the conf file, I had neglected to actually mount anything in my unpackerr docker run command, hence why it couldn't see anything, doh.

Now working, thanks so much for your time and sorry for wasting it! Didn't see on the readme page, but do let me know if I can contribute in anyway, buy you a coffee etc. Been a big help!

davidnewhall commented 3 years ago

I know it doesn't help now, but it was totally one of the first things I mentioned. :D

perhaps you forgot to mount your download location to /downloads using -v in your docker run command?

Very happy you got it working!

moorsey commented 3 years ago

oh dear, that makes the shame worse. I work in IT and would be calling my users all sorts of names if they did this to me

Way to confident in my own abilities it seems, humbled by being on the other end for a change.