Closed nathang21 closed 2 years ago
Hi, thanks for the detailed info. Indeed the current setup doesn't allow to change the folders from /share/downloads_packed. Alas it uses golift and does not include bash so I'm not sure how to implement modifications. Only solution I see is that I completely remove the env variable and everyone just uses the config file. Seems the only solution to me unless you know golift
Thanks for the quick reply!
That makes sense to me, however I just tried again after this change 5e75a4f, but now it can't seem to find the folder.
Is what what you meant by bash not being included, it's not possible to change folders within the config, only the other general options?
2022/10/04 15:05:36.651160 start.go:128: Unpackerr v0.10.0 Starting! (PID: 7) 2022-10-04 15:05:36.648845218 -0400 EDT m=+0.033085554
2022/10/04 15:05:36.653315 logs.go:210: ==> GoLift Discord: https://golift.io/discord <==
2022/10/04 15:05:36.653330 logs.go:211: ==> Startup Settings <==
2022/10/04 15:05:36.653355 sonarr.go:87: => Sonarr Config: 0 servers
2022/10/04 15:05:36.653363 radarr.go:88: => Radarr Config: 0 servers
2022/10/04 15:05:36.653370 lidarr.go:87: => Lidarr Config: 0 servers
2022/10/04 15:05:36.653376 readarr.go:87: => Readarr Config: 0 servers
2022/10/04 15:05:36.653396 folder.go:69: => Folder Config: 1 path: (delete after:0s, delete orig:false, log file: true, move back:false, event buffer:20000)
2022/10/04 15:05:36.653410 logs.go:217: => Using Config File: /config/unpackerr.conf
2022/10/04 15:05:36.653417 logs.go:218: => Parallel: 1
2022/10/04 15:05:36.653423 logs.go:219: => RAR Passwords: 0
2022/10/04 15:05:36.653430 logs.go:220: => Interval: 2m
2022/10/04 15:05:36.653436 logs.go:221: => Start Delay: 1m
2022/10/04 15:05:36.653442 logs.go:222: => Retry Delay: 5m, max: 3
2022/10/04 15:05:36.653447 logs.go:223: => Debug / Quiet: true / false
2022/10/04 15:05:36.653453 logs.go:226: => Directory & File Modes: 0755 & 0644
2022/10/04 15:05:36.653460 webhook.go:229: => Webhook Configs: 0 URLs
2022/10/04 15:05:36.653468 cmdhook.go:124: => Command Hook Configs: 0 cmds
2022/10/04 15:05:36.653761 folder.go:199: [ERROR] Folder (cannot watch): stat : no such file or directory
Only solution I see is that I completely remove the env variable and everyone just uses the config file.
This makes sense to me, perhaps even including the example or a default config file in the repo would be helpful, but the instructions were clear to make a copy from the source so that is minor.
Update: I just saw version 0.10.1-3
and gave it another try, it's now detecting the folder for me with the following config.
Config:
[[folder]]
## Windows paths must use two backslashes: "C:\\Some\\Folder\\To\\Watch"
path = "/media"
Logs:
...
2022/10/04 15:50:15.394343 folder.go:112: [Folder] Watching (fsnotify): /media/
2022/10/04 15:50:15.395043 folder.go:123: [Folder] Polling @ 1s: /media/
2022/10/04 15:51:15.392176 logs.go:143: [Unpackerr] Queue: [0 waiting] [0 queued] [0 extracting] [0 extracted] [0 imported] [0 failed] [0 deleted]
2022/10/04 15:51:15.392263 logs.go:145: [Unpackerr] Totals: [0 retries] [0 finished] [0|0 webhooks] [0|0 cmdhooks] [stacks; event:0, hook:0, del:0]
Will follow up later to confirm extractions are working as expected, I may need to see if subfolders can be included or re-arrange my structure.
I, thanks indeed you were right the # had to be removed before the "folder"! Looks it working too on my system. Thanks
Glad to hear! Progress, however still not getting it to actually detect or extract anything despite having multiple rar files in the watched folders.
It seems like I could be running into this docker issue https://github.com/davidnewhall/unpackerr/issues/85 but that was already fixed upstream so i'm at a loss, may need to open a bug upstream, but i'm really curious how your's is working.
2022/10/04 16:59:06.243740 folder.go:112: [Folder] Watching (fsnotify): /media/Movies, /media/TV Shows
2022/10/04 16:59:06.243827 folder.go:123: [Folder] Polling @ 1s: /media/Movies, /media/TV Shows
2022/10/04 17:00:06.242975 logs.go:143: [Unpackerr] Queue: [0 waiting] [0 queued] [0 extracting] [0 extracted] [0 imported] [0 failed] [0 deleted]
2022/10/04 17:00:06.243031 logs.go:145: [Unpackerr] Totals: [0 retries] [0 finished] [0|0 webhooks] [0|0 cmdhooks] [stacks; event:0, hook:0, del:0]
Hi, I've never used this addon, so I'm not sure... I've just tested it starts without error. Have you tried broadening permissions for the folder or checking the upstream container documentation (like putting temporarily 777 recursively to check)?
@hacshacdgacs hi, are you still using unpackerr? Is it working as expected? Thanks!
Hi, no sorry, I've moved on from using unpackerr as I couldn't find a way of working it into my system properly
On Wed, 5 Oct 2022, 16:45 Alexandre, @.***> wrote:
@hacshacdgacs https://github.com/hacshacdgacs hi, are you still using unpackerr? Is it working as expected? Thanks!
— Reply to this email directly, view it on GitHub https://github.com/alexbelgium/hassio-addons/issues/502#issuecomment-1267895758, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUMWJOD35AMDQLS5KH4EM73WBT2UHANCNFSM6AAAAAAQ4TP4HE . You are receiving this because you were mentioned.Message ID: @.***>
Thanks!
Perhaps I'll switch the upstream image to https://hub.docker.com/layers/hotio/unpackerr to allow it to use bash and change user...
Have you tried broadening permissions for the folder or checking the upstream container documentation (like putting temporarily 777 recursively to check)?
Just gave that a try, no change. Image starts, config file read, folder watching starts, but no rar files are detected.
Perhaps I'll switch the upstream image to hub.docker.com/layers/hotio/unpackerr to allow it to use bash and change user...
I just took a look at that upstream image, seems worth a shot but otherwise looks almost the same so i'm not sure if that with help.
I've changed the upstream image. Key thing I think is that the zip files must have the correct ownership per puid/pgid described in the log
Progress again, I was able to change some permissions which seemed to do the trick. Although, in some cases the permissions didn't ACTUALLY change, I just re-applied them, which I suspect caused fsnotify to pick it up and Unpacker then begin processing the files.
chmod 755 ./* # for all folders
chmod 644 ./* # for all files
Previously I didn't even see any logs of detected files, no permission denied or anything, just empty logs. Which makes me still suspicious about https://github.com/davidnewhall/unpackerr/issues/85.
I'm also using your qBitorrent and Plex NAS addons, and I am hoping to get a fully automated pipeline from qBitorrent download to media folder --> Unpacker extract any archived files, which are then scanned by Plex.
I'll keep testing, but i'm not sure how to make qBittorrent set the proper file permissions / cause Unpacker to detect the files. Perhaps I could use the Autorun program feature of qBittorrent once a download finishes, but I can't find any documentation on this.
I am trying it with the following, will see if this works when I download something again. Auto Run Enabled --> Autorun Program
chmod 644 %F/*
In this case %F = "Content path (same as root path for torrents with multiple files)"
Assuming the file permissions are correct to begin with, I wonder if a simple touch
would cause fsnotify + Unpacker to detect them.
Hi, in theory I've enabled automatic ownership and definition of the downloads and extraction folders through the addon options. Hope it will smoothen the installation. Regarding your issue... Not sure how to help. Cron job with periodic touch ?
Hi Alex, thank you so much that did the trick. I think even though the permissions were correct, the group was set to root instead of hassio. Your new startup script auto-fixed all of the owners and it's now working end-to-end more or less.
As for the fsnotify issue, i'll play around with solutions via an autorun or cron and update here if/when a get that working. Feel free to close this issue in the meantime if you prefer.
Thanks for the feedback. Given the title of the issue is with folders definition, let's close it and we could re-open a new one if indeed there is a new function to solve the fsnotify issue. Have a nice day!
Which addon?
Describe the bug
I am unable to change the default watch folders according to the official unpackerr instructions. My config file is in
/config/unpackerr.conf
and I took the example file from the parent repo, and only changed thefolder.path
andfolder.extract_path
options, which are both set to/media
.My theory is that the addon environmental variables of
UN_FOLDER_0_PATH
andUN_FOLDER_0_EXTRACT_PATH
are overriding the config file, since the log shows the config file is read. The way the addon is currently setup, there is no way to change the default values without a fork.To Reproduce
Expected: Logs to show config file read, and folder /media to be scanned. Actual: Logs show config file read, but folder still remains set to default Env values of /share/...
Full addon log
Full addon config
N/A this addon has no HA config, but here is my
/config/unpackerr.conf
file.System
Home Assistant 2022.9.7 Supervisor 2022.09.1 Operating System 9.0 Frontend 20220907.2 - latest