Skip to content

Fix set margent url on convert_magnet#2906

Merged
gazpachoking merged 2 commits intodevelopfrom
unknown repository
Oct 24, 2021
Merged

Fix set margent url on convert_magnet#2906
gazpachoking merged 2 commits intodevelopfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Apr 16, 2021

Motivation for changes:

Fixes error 'dict' object has no attribute 'url' that have been happening a few versions ago

Detailed changes:

  • change the way to set magnet url property

Addressed issues:

Implemented feature requests:

  • N/A

Config usage if relevant (new plugin or updated schema):

paste_config_here

Log and/or tests output (preferably both):

AttributeError: 'dict' object has no attribute 'url'
Traceback (most recent call last):
  File "/opt/flexget/lib/python3.7/site-packages/flexget/task.py", line 547, in __run_plugin
    result = method(*args, **kwargs)
  File "/opt/flexget/lib/python3.7/site-packages/flexget/event.py", line 20, in __call__
    return self.func(*args, **kwargs)
  File "/opt/flexget/lib/python3.7/site-packages/flexget/components/bittorrent/convert_magnet.py", line 99, in on_ta$
    torrent_file = self.magnet_to_torrent(entry['url'], converted_path, timeout)
  File "/opt/flexget/lib/python3.7/site-packages/flexget/components/bittorrent/convert_magnet.py", line 41, in magne$
    params.url = magnet_uri
AttributeError: 'dict' object has no attribute 'url'

To Do:

  • Stuff..

@gazpachoking
Copy link
Copy Markdown
Member

Hmm. Wondering if this is to do with different libtorrent versions. You can see how this bit got introduced in this ticket #2424, where it was mentioned that they tried the method in this pull request, but it didn't work. Ideally we can find out what versions require what, and either make it compatible with both, or document that a certain version is required.

@ghost
Copy link
Copy Markdown
Author

ghost commented Apr 19, 2021

I'll try with different libtorrent version to check if is related with that

@ghost
Copy link
Copy Markdown
Author

ghost commented Apr 19, 2021

@gazpachoking Looks like the issue is between 1.1 and 1.2 versions, raspbian have 1.1 so I don't know if add a try/catch to support both, or support just one of those versions

@viliuspankauskas
Copy link
Copy Markdown
Contributor

can confirm, that this solves magnet link problems on the latest build.

@Jeremiad
Copy link
Copy Markdown
Contributor

Any change this could be merged? Currently having this issue on ubuntu:latest and
flexget/bin/flexget -V
3.1.134.dev
Latest release: 3.1.133

@ghost
Copy link
Copy Markdown
Author

ghost commented Oct 24, 2021

@gazpachoking I changed the validation and I tested with version 1.2.9 (bullseye) and 1.1.11 (debian buster) and the issue happens with version < 1.2, let me know if the check make sense to you, I think worth add the fallback because some systems/NAS still have debian buster

@gazpachoking
Copy link
Copy Markdown
Member

I suspect there are other spots where we might need that similar version check, but if this is the main one, I'm good with merging this now and fixing anything else later. Thanks!

@gazpachoking gazpachoking merged commit 5136bfb into Flexget:develop Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Unhandled error in plugin convert_magnet: 'dict' object has no attribute 'url'

3 participants