Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • C cli
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • cli
  • Issues
  • #19
Closed
Open
Issue created Jun 11, 2021 by EorlBruder@EorlBruderGuest

Track download fails for items of channel

If I try downloading an item of a channel the download fails due to album-tag missing:

# ./funkwhale -H $server tracks download 184003 -t "{title}.{extension}" 
  0%|                                                                                                                       | 0/1 [00:00<?, ?Files/s]
Downloading from $url
  0%|                                                                                                                       | 0/1 [00:00<?, ?Files/s]
Traceback (most recent call last):                                                                                                                   
  File "/home/david/.local/bin/./funkwhale", line 8, in <module>                                                                                     
    sys.exit(cli())                                                                                                                                  
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1137, in __call__                                                                      
    return self.main(*args, **kwargs)                                                                                                                
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1062, in main                                                                          
    rv = self.invoke(ctx)                                                                                                                            
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1668, in invoke                                                                        
    return _process_result(sub_ctx.command.invoke(sub_ctx))                                                                                          
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1668, in invoke                                                                        
    return _process_result(sub_ctx.command.invoke(sub_ctx))                                                                                          
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1404, in invoke                                                                        
    return ctx.invoke(self.callback, **ctx.params)                                                                                                   
  File "/usr/lib/python3.9/site-packages/click/core.py", line 763, in invoke                                                                         
    return __callback(*args, **kwargs)                                                                                                               
  File "/usr/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func                                                                  
    return f(get_current_context(), *args, **kwargs)                                                                                                 
  File "/home/david/.local/lib/python3.9/site-packages/funkwhale_cli/cli/base.py", line 117, in wrapper                                              
    return loop.run_until_complete(f(*args, **kwargs))                                                                                               
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete                                                                  
    return future.result()                                                                                                                           
  File "/home/david/.local/lib/python3.9/site-packages/funkwhale_cli/cli/tracks.py", line 82, in track_download                                      
    filename_params["album"] = filename_params["album_title"]                                                                                        
KeyError: 'album_title'                                                                                                                              

For this to work, we probably need to ignore missing keys (and replace them e.g. with None).

I checked the JSON of this track directly and it's only missing the album (that being null), other tags like title, position and artist are there.

Assignee
Assign to
Time tracking