DobyTang / LazyLibrarian

This project isn't finished yet. Goal is to create a SickBeard, CouchPotato, Headphones-like application for ebooks. Headphones is used as a base, so there are still a lot of references to it.
732 stars 70 forks source link

Deluge: Adding torrent file failed #1500

Closed robflate closed 6 years ago

robflate commented 6 years ago

LazyLibrarian version number: 6917a0c455f331c3ea3f985337a282152de1a3f2 Operating system used: Docker container running on MacOS 10.13.4 Interface in use: bookstrap Which api: Goodreads Source of your LazyLibrarian installation: https://hub.docker.com/r/linuxserver/lazylibrarian/ Relevant debug log with api keys and any passwords redacted: debug.zip

I keep getting failures when LL uses Jackett to send a torrent to Deluge. LL says Deluge: Adding torrent file failed. Here's some info that might be useful;

Thanks

philborman commented 6 years ago

At first glance it looks like jackett is giving us an invalid torrent file? Sending Deluge torrent with name kbps and content [ZDg6YW5ub3VuY2UyMzpodHRwOi8vYnQ0LnQtcnUu...]

but I think it might have given us a b64encoded version, jackett does some odd things...

I will add a test to try decoding the jackett result in the next version, if you could try it and report back?

robflate commented 6 years ago

Thanks. I'll keep a look out for the next version and test.

Further info. In LL > History if I click the Failed button it shows;

Title: Margaret Atwood The Handmaids Tale / kbps
Type: torznab AudioBook
Date: 2018-07-11 15:48:19
Size: 132.63 Mb
Provider: http://jackett:9117/api/v2.0/indexers/rutracker/results/torznab
Downloader: None
DownloadID: None
URL: http://jackett:9117/dl/rutracker/?jackett_apikey=<REDACTED>&path=dThmbnp1NHFGMzB1WjRvbXNqZ3JuTXVhcUhhdmV0Wmkva0JoRjJrd3ZXclNKQWZBS0NEUDNpdXNNZFB1dGVLeFRVUDdnS3BZWWZYM0VreC9BUXlNa0VqaVpNQXpyY1hPc1hIRHdnSDNySzg2UXVlRU4zbEJjYjRMcTRBaVErSlNsZTIyQnNESnlqS28wT2o4SGt0Wk1PTHFqU0lpS0NLYzFleG8waG9kQWNYOGdrRDFrb3NJM2FxM1RoMUtYdHpUVFJyK2QzbHBocTlCLytKVXBwS212MHMweG1OS0lVRks0SzZmUE5pTFpuNktXZDRzRC9qMUtxcGtUbjc3Vzh5OGFjbURxSzRQTW1MbHhwb1duaTBDT0tFaFAva21FMzNDZlpyVFhuZVZVbVFRYXpjRnkzSTgwWnp3VC80WDBGdVNob3FKOWxkU2RTVUhjdzdmd0M5eEl3PT01&file=Margaret+Atwood+-+The+Handmaid's+Tale+%2F+++-+++[2004%2C+128+kbps]
Error: Failed to send torrent to DELUGEWEBUI

If I copy and paste the URL into a browser, the torrent downloads (Margaret Atwood - The Handmaid's Tale _ - [2004, 128 kbps].torrent) and I can manually add it to Deluge and it downloads.

philborman commented 6 years ago

I tried b64decoding the data and that looks like a valid torrent file, we're just not expecting it to be encoded. I have added a check to the code so if it doesn't look like a bare torrent we try decoding it and see if that looks like a torrent.

robflate commented 6 years ago

Here's the latest debug log showing a Deluge UnicodeDecodeError: debug.zip

As before, the torrent is valid and can be downloaded from the URL at LL > History > Failed

philborman commented 6 years ago

Well, different error. Got past the first bit and hit another problem later on. Not enough info in the debug log to track it down though. Could you try again with debug level 16, should give us more info. Thanks.

robflate commented 6 years ago

Here you go: debug.zip

philborman commented 6 years ago

Great thanks, think I see the problem now. There's a fairly big update to lazylibrarian due today, will try to incorporate this fix too.

robflate commented 6 years ago

Brilliant. Thanks for all your help.

robflate commented 6 years ago

I'm using version d5728f1c49c1151c7aacda65416d2460be528088. I just searched the same audiobook and it still won't send to Deluge;

Debug log: debug.zip

Also, how do I know I'm on the latest version? Is it just by going to the Config page and comparing Current to Latest. I assume Current is the version I'm on and Latest is the latest version on GitHub? Do those number correlate with releases on GitHub...is there a page on GitHib where I can see those numbers? Sorry if this is a dumb question.

philborman commented 6 years ago

You are not on latest version, latest is c09de92 (first few digits are enough to identify it) Your version is 9 days old.

Also, how do I know I'm on the latest version? Is it just by going to the Config page and comparing Current to Latest. I assume Current is the version I'm on and Latest is the latest version on GitHub?

That's correct as long as we can talk to github

Do those number correlate with releases on GitHub...is there a page on GitHib where I can see those numbers?

If you go to https://github.com/DobyTang/LazyLibrarian latest is the most recent commit near top right of page. The "check version" button on lazylibrarian config page will tell you if you are up to date, show what's changed, and may let you upgrade depending on installation method. Some dockers may disable internal upgrade. "Releases" are different to "versions", and have a different numbering system. Releases are done much less frequently and usually indicate major changes. The releases page on lazylibrarian github doesn't get updated very often.

robflate commented 6 years ago

Thanks for the info.

I've updated to the latest version and this is now fixed. Thanks very much.