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
  • #17
Closed
Open
Issue created Jun 03, 2021 by EorlBruder@EorlBruderGuest

Filepath in tracks download doesn't sanitize "/" in elements name

The tracks-download doesn't remove the "/" in an elements name, thus potentially creating unwanted directories. Also characters get sanitized, which actually are valid for a filepath (though this second issue is less important for me).

As an example:

I have the a track with the following metadata

artist: Der wahre Heino
album:  Deutschland/Die letzte Schlacht 7" 
track: Die letzte Schlacht

On exporting it via tracks download with the default template, it exports Der wahre Heino - Deutschland/Die letzte Schlacht 7 - Die letzte Schlacht.flac - so a directory and a file. Here I'd expect it to only export one file.

My export from picard of this particular track had created the following structure: Der wahre Heino/Deutschland_Die letzte Schlacht 7"/Die letzte Schlacht.flac - replacing the /by _.

I would propose to go through the filename_params before applying template.format and replacing any / with _ in the download step. This would fix the issue with the additional directories.

The issue with the " lies in pathvalidate.sanitize_filepath which is an external lib, so I don't think it's fixable easily (also again it doesn't matter all that much to me).

Assignee
Assign to
Time tracking