Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PICARD-1439: Unify filename generation by metadata script #1068

Merged
merged 5 commits into from Dec 11, 2018

Conversation

phw
Copy link
Member

@phw phw commented Dec 10, 2018

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

As reported on the forums new line characters in cover art naming can cause file saving errors. Actually the cover art file name generation uses code derived from the file naming, but the file naming code has some fixes for edge cases that never got implemented for cover art.

Solution

Introduce script_to_filename to be used by both file and cover art naming. This:

  1. Reduces code duplication
  2. Makes it possible to test the file name generation from scripts
  3. Provides fixes for handling of various edge cases that where implemented for file naming also for cover art

Action

Introduce script_to_filename to be used by both file and cover art naming.
test/test_scripttofilename.py Show resolved Hide resolved
picard/util/scripttofilename.py Outdated Show resolved Hide resolved
@phw phw merged commit 74779f3 into metabrainz:master Dec 11, 2018
@phw phw deleted the PICARD-1439-unify-script-to-filename branch December 11, 2018 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants