Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Nuovo sito
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Nuovo sito
Commits
7caa5324
Commit
7caa5324
authored
Oct 16, 2023
by
shadMod
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added debug param; set 'https' key
parent
6609d289
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
uitwww/download.py
uitwww/download.py
+4
-3
No files found.
uitwww/download.py
View file @
7caa5324
...
...
@@ -36,7 +36,7 @@ CACHE_FILE_VERSION = 1
class
Downloads
:
def
__init__
(
self
,
data_path
):
def
__init__
(
self
,
data_path
,
debug
:
bool
=
False
):
# init _mirrors
self
.
_mirrors
=
None
# Load the configuration
...
...
@@ -51,6 +51,7 @@ class Downloads:
with
open
(
path
,
"rb"
)
as
raw
:
self
.
_config_hash
=
"sha1=%s"
%
hashlib
.
sha1
(
raw
.
read
()).
hexdigest
()
if
debug
is
False
:
self
.
_cache_file
=
os
.
path
.
join
(
data_path
,
CACHE_FILE
)
@
property
...
...
@@ -210,7 +211,7 @@ class Downloads:
if
torrent
:
url
=
source
[
"torrent"
]
else
:
url
=
source
[
"http"
]
url
=
source
[
"http
s
"
]
for
key
,
value
in
replaces
.
items
():
url
=
url
.
replace
(
"{%s}"
%
key
,
value
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment