Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage-1
Commits
2b364c6f
Unverified
Commit
2b364c6f
authored
Jan 19, 2017
by
miigotu
Browse files
Options
Downloads
Patches
Plain Diff
Fix magnets in rtorrent, Fixes #2880
Signed-off-by:
miigotu
<
miigotu@gmail.com
>
parent
87e5ce80
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/rtorrent/__init__.py
+4
-1
4 additions, 1 deletion
lib/rtorrent/__init__.py
lib/rtorrent/common.py
+3
-2
3 additions, 2 deletions
lib/rtorrent/common.py
with
7 additions
and
3 deletions
lib/rtorrent/__init__.py
+
4
−
1
View file @
2b364c6f
...
@@ -245,11 +245,14 @@ class RTorrent:
...
@@ -245,11 +245,14 @@ class RTorrent:
if
verify_load
:
if
verify_load
:
for
i
in
range
(
MAX_RETRIES
):
for
i
in
range
(
MAX_RETRIES
):
time
.
sleep
(
1
)
time
.
sleep
(
1
)
if
self
.
find_torrent
(
info_hash
):
torrent
=
self
.
find_torrent
(
info_hash
)
if
torrent
:
torrent
.
start
()
break
break
assert
find_torrent
(
info_hash
,
self
.
torrents
),
"
Adding torrent was unsuccessful (load_magnet).
"
assert
find_torrent
(
info_hash
,
self
.
torrents
),
"
Adding torrent was unsuccessful (load_magnet).
"
time
.
sleep
(
3
)
return
self
.
find_torrent
(
info_hash
)
return
self
.
find_torrent
(
info_hash
)
def
load_torrent
(
self
,
torrent
,
start
=
False
,
verbose
=
False
,
verify_load
=
True
):
# @IgnorePep8
def
load_torrent
(
self
,
torrent
,
start
=
False
,
verbose
=
False
,
verify_load
=
True
):
# @IgnorePep8
...
...
This diff is collapsed.
Click to expand it.
lib/rtorrent/common.py
+
3
−
2
View file @
2b364c6f
...
@@ -58,8 +58,9 @@ def find_torrent(info_hash, torrent_list):
...
@@ -58,8 +58,9 @@ def find_torrent(info_hash, torrent_list):
@return: L{Torrent} instance, or -1 if not found
@return: L{Torrent} instance, or -1 if not found
"""
"""
t
=
filter
(
lambda
x
:
x
.
info_hash
==
info_hash
,
torrent_list
)
for
t
in
torrent_list
:
return
t
[
0
]
if
t
else
None
if
t
.
info_hash
==
info_hash
:
return
t
def
is_valid_port
(
port
):
def
is_valid_port
(
port
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment