Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cli
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
funkwhale
cli
Commits
0c6af1dc
Commit
0c6af1dc
authored
3 years ago
by
Georg Krause
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-18' into 'master'
Don't abort whole download, when one file doesn't exist Closes
#18
See merge request
!12
parents
5078d71b
09855474
No related branches found
No related tags found
1 merge request
!12
Don't abort whole download, when one file doesn't exist
Pipeline
#14683
passed
3 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
funkwhale_cli/cli/tracks.py
+9
-5
9 additions, 5 deletions
funkwhale_cli/cli/tracks.py
with
9 additions
and
5 deletions
funkwhale_cli/cli/tracks.py
+
9
−
5
View file @
0c6af1dc
...
...
@@ -36,10 +36,10 @@ async def get_track_download_url(id, remote, format=None):
download_url
=
payload
[
"
uploads
"
][
0
][
"
listen_url
"
]
except
IndexError
:
if
remote
.
token
:
raise
click
.
ClickException
(
"
This file is not available for download
"
)
raise
click
.
ClickException
(
"
This file is not available for download
:
"
+
id
)
else
:
raise
click
.
ClickException
(
"
This file is not available for download, try to login first
"
"
This file is not available for download, try to login first
:
"
+
id
)
if
download_url
.
startswith
(
"
/
"
):
...
...
@@ -73,9 +73,13 @@ async def track_download(
async
with
ctx
.
obj
[
"
remote
"
]:
progressbar
=
tqdm
.
tqdm
(
id
,
unit
=
"
Files
"
)
for
i
in
progressbar
:
try
:
download_url
,
format
,
track_data
=
await
get_track_download_url
(
i
,
ctx
.
obj
[
"
remote
"
],
format
=
format
)
except
click
.
ClickException
as
e
:
logs
.
logger
.
error
(
e
.
message
)
continue
logs
.
logger
.
info
(
"
Downloading from {}
"
.
format
(
download_url
))
filename_params
=
utils
.
flatten
(
track_data
)
...
...
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