-
Notifications
You must be signed in to change notification settings - Fork 278
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
How do I get the download handler to post-process files? #10822
Comments
That's just a partial log. Also on the history page. Does it change the status for downloads? That should give more info. |
It says |
Yes, I had "stop seed at ratio" and ratio 0 enabled. Which will pause the torrent. I will try to disable that and see what happens. |
Yeah, you want Medusa handle that |
No, that didn't work. The stop at seed ratio is disabled in deluge. And in medusa I have set it to pause the torrent at ratio 0. What happens is that it will NOT pause the torrent. And it will keep seeding forever and nothing gets post-processed.. Even if in history it says the same as before, "paused,seeded,completed" but in fact the torrent is NOT paused, it is seeding. Nothing new in the log either, same as before. |
Actually after a second look, it looks like medusa paused the torrent BUT it doesn't get updated in deluge. In deluge it says it seeding, but when I look at "seeding time" in deluge it says 3min 40 sec, which probably is when the download handler checked the status. And it stays at that time, it still says seeding but I can see there is actually no uploading going on. And there are plenty of peers as this is new torrent. |
Bah, scratch that. I had a another torrent in radarr seeding and when I paused that the medusa torrent started seeding. So I guess it was in queue. |
I rolled back to 1.0.3 to get the Scheduled Post-Processor to work again. Some observation tho, I have always had the "stop at ratio" and a ratio of 0 enabled in deluge. As my previous issue here: #10529 that suddenly stopped working with medusa. So I enabled the download handler and set action pause and ratio 0. Then torrents would pause as intended again. So my observation is when download handled is enabled AND "stop at ratio" is enabled in deluge it will pause the torrent. But the download handler will not post-process anything. Post-processing will first happen when the Scheduled Post-Processor kicks in. If Scheduled Post-Processor is disabled nothing gets processed even if the download handler is enabled. And medusa will think the torrent is paused when it's actually not (if "stop at ratio 0" is disabled in deluge). When download handler is disabled torrents will not pause at set ratio even if deluge is configured to do so. And after 1.0.5 Scheduled Post-Processor doesn't work anymore. |
Afaik we haven't touched the scheduled pp in a while. But I'll need to double check that. What version of deluge do you use. I'll have to try reproduce your issue |
I use deluge server 2.0.5 and client 2.1.0 dev 90 |
so your saying scheduled postprocessing isn't working anymore in the latest version. If this is true, i'll need to look at that first. Can we focus on this. As you kinda claim something broke here. While I can't remember making any changes to the PP in the last 5 releases. Can you help me reproducing this? |
I updated again to test this for you, but now the scheduled postprocessing is actually working. Weird.. I updated two times earlier and on first start everything looked ok on the status page. Post process said "true" on both alive and enabled, but when it should actually start the alive changed to false. I then played with setting the download handler to disabled and disabling and re-enabling the scheduled postprocessing but I couldn't get it to say true on alive anymore. I even restarted the docker container several times. But now it's actually working. I will leave it for tomorrow and just check that it keeps working. |
I know that there is a known issue with a wrong reporting in the status page on the postprocessing process. |
It wasn't wrong reporting, that's for sure. Because nothing was processed in a hole day. I didn't check the log that time, but nothing was processed. It says in the description in the settings not to use the scheduled postprocessing when download handler is enabled, but that is the only way I can get things processed. But i would really like for the download handing to work, do you have any idea why it's not working? To me it looks like medusa is unable to read/update the status in deluge. That is confirmed by disabling the stop at ratio in deluge, then it would keep seeding but medusa think it's paused. Medusa should pause it,but it doesn't. |
The reason why we don't recommend to use download handler with scheduled, is cause you can get unexpected results.
So you set up schedule pp, and files where moved to your pp dir, but nothing got postprocessed? That's not right. |
what I think is the issue. Is that somehow medusa thinks the torrent got paused by Deluge. And therefor skips it. It's very timeconsuming for me to setup a Deluge docker container, configure with medusa. Download torrents, and try to reproduce. So first i'd like to know what all your deviations from the default config in deluge are. As when I tested it with deluge. And pretty much used the default config. Like only changing maybe the destination download folder.
Okay I think I was able to reproduce the issue. Will see if I can fix it. |
Yes, when I first updated to 1.0.5 schedule pp was enabled, but I then realized nothing was getting processed. Then as I mentioned when I saw on the status page schedule pp was not alive, and I could not get it to start. Files where moved by deluge to the completed dir which obviously is my pp dir in medusa, but nothing was processed because it was unable to start. But as I also mentioned it's working now tho, so not really sure what happened. |
Oooh, that sounds promising :) |
Do you know how to checkout a specific branch in git? |
That was fast! No, I don't really know how to check out a specific branch in docker. I was doing it years ago before I used docker tho. But I think I can figure it out. I see I can't choose the dev branch in the webui, so i probably have to do it in cli. If not the container author has a tag for the develop branch, I'll check that first. Will report back if I need some assistance. :) |
Nah, in docker it's difficult. |
Yeah, I couldn't really figure out how to change my current container to the develop branch. But I see you have an official image on dockerhub with the develop tag so I'll set up that maybe tomorrow to test it out. |
@strike84 just use the |
Tested, and it's not working. But I can see in the log that the download handler is updating the status now. It doesn't do that in the master branch. 2022-07-16 20:57:00 INFO DOWNLOADHANDLER :: [135a704] Updating status to [Downloading, Seeded] for Watergate.Blueprint.For.A.Scandal.2012.S01 And under history in now says this: But the torrent is not paused (which medusa should have done according to the settings) and just keeps seeding and nothing is getting processed. |
So you started with a new snatch? |
Yup. I spun up your official container (normally I use the liunxserver container) with the develop branch just for testing. Snatched a new show and waited to see what happened. The history page show what i posted in my last comment for all ep, here it is again: Yeah I haven't used any other clients before so I don't know what's normal. But yeah, it does seem kinda weird registering as downloading,seeded. In the master branch it won't even register that it's downloading tho IIRC. It just updates with paused,completed,seeded when it's finished, even if the torrent is not paused. |
Oooh, nice. Will test again tomorrow. |
You should run the pymedusa/medusa docker image. And then use the develop tag. ooh and enable debug logs and restart. |
It should work now? You sure? I just tested when I posted my last comment. Did you do any changes now? It was not working when I tested as i posted earlier. |
yeah, and debug is enabled |
I even waited for the download handler to run several times. In case it just updated the status first then processed with next run. But nothing is happening and the torrent just keeps seeding. |
I'll look into it some more tomorrow |
Cool. Thank you so much for your help so far. Btw I just tried to pause the torrent manually and wait for the download handler to see if it would process then, but it did not. So I resumed it again. It updates the status correct now tho. 2022-07-16 22:29:00 DEBUG DOWNLOADHANDLER :: [135a704] Checking DelugeD torrent b0bc69039dc85ebccba63c3fa3583ca005639dee status. I also tried to set it to hardlink instead of move, since medusa doesn't pause the torrent and just keeps seeding. Figured it would throw an error in the log if it wasn't able to move because of seeding but can't see anything at all, just the above. But with hardlink it should be able to process is even when seeding I think. |
I've changed my snatched download to the status Paused + Seeded + Completed. And it directly tried to postprocess the files. But because i'm on docker it couldn't locate the files from within the container. But that's expected. Can you send (maybe PM) me your application.log? |
I'm having trouble logging into my discord. But here is the log. I just deleted the show and snatched it again. This time stop at ratio was enabled in deluge. So the status in now Paused + Seeded + Completed. That's the only way I can get the paused status, either that or pause it manually. Is it possible to change the status manually in history in medusa |
So it seems that your still on the master image. I've checked the commit cb13ff9. |
When I fist started the container yesterday I was on master yes. But I changed it. The log is from when i first started the container yesterday and all the way up today. So if you scroll down you'll see that I'm on develop. 2022-07-17 09:54:11 INFO MAIN :: [135a704] Starting Medusa [develop] using '/config/config.ini' You should scroll all the way down to the bottom to get the most recent log. |
The thing is, that I'm pretty confident I fixed it with that commit. So if your really running the right code, it should now pp for you. I tested it myself, with the same status. And it pp now fine. |
I think recreate the container is worth the effort. |
Ok, I'll try to do that. |
Yeah, you where right. It was worth the effort recreating the container. I can confirm it's working now :) So closing this. Thanks a lot for coming with a quick fix :) Don't know why it was not working before, maybe medusa did report the wrong info being on the correct commit, idk. But that's what I love about docker, it so quick to recreate the container with all your settings intact or even roll back to an earlier version. It literately takes 15 seconds. |
I made some more small adjustments to how the ratio is communicated. Do you might want to test that more extensive |
Ok, I did in fact set the ratio at 0.1 in medusa before I tested this last time. Just to make sure 0 wasn't causing any problems. But I had stop at ratio 0 enabled in deluge anyway so the torrent paused when it was completed. I haven't tested if medusa will pause the torrent since it was working the way I wanted to anyway. I'll test that out some more when I have the time. But I'm fairly confident that it's working as intended according to this in the log: 2022-07-17 21:08:42 DEBUG DOWNLOADHANDLER :: [135a704] Checking DelugeD torrent b0bc69039dc85ebccba63c3fa3583ca005639dee status. Just say the word if you want me to test something specific!. |
Describe the bug
I've never been able to get the download handler to post-process my finished downloads. I've always used the scheduled Post-Processor. But after updating to 1.0.5 that will not work either if the download handler is enabled. And in order to get the torrents to pause right after they are finished downloading I have to have the download handler enabled or else it will seed forever. See: #10529
I use the deluge connecting to the daemon.
There is always nothing in the Post-process Queue, even if there are finished downloads in the client. And when the download handler check every 10 min all that get logged is what i pasted in the logs below. Nothing more happens. Same thing if I force it in manage-searches. Nothing gets post-processed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The download handler should move my finished downloads into my tv directory
Screenshots
Medusa (please complete the following information):
Debug logs (at least 50 lines):
General > Advanced Settings > Enable debug
Additional context
Before 1.0.5 I had the scheduled Post-Processor and the download handler enabled and the scheduled Post-Processor would work. Now It doesn't anymore. My goal is to get the download handler to post-process my files but no dice so far.
The text was updated successfully, but these errors were encountered: