mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-20 14:44:05 +00:00
Lowercase the extension on file renaming/moving. (#2701)
This commit is contained in:
1
NEWS.txt
1
NEWS.txt
@@ -3,6 +3,7 @@ Version 0.9.0beta1 - 2007-04-XX
|
||||
* Remember location in the file browser. (#2618)
|
||||
* Added FFmpeg support on Windows (MP3, Vorbis,
|
||||
FLAC, WavPack and many other audio formats).
|
||||
* Lowercase the extension on file renaming/moving. (#2701)
|
||||
* Bug Fixes:
|
||||
* Failed PUID submission deactivates the submit button. (#2673)
|
||||
* Unable to specify album art file name mask. (#2655)
|
||||
|
||||
@@ -109,7 +109,7 @@ class File(LockableObject, Item):
|
||||
|
||||
def _post_load(self):
|
||||
filename, extension = os.path.splitext(os.path.basename(self.filename))
|
||||
self.metadata['~extension'] = extension[1:]
|
||||
self.metadata['~extension'] = extension[1:].lower()
|
||||
self.metadata['~length'] = format_time(self.metadata['~#length'])
|
||||
if 'title' not in self.metadata:
|
||||
self.metadata['title'] = filename
|
||||
@@ -182,7 +182,7 @@ class File(LockableObject, Item):
|
||||
if settings['windows_compatible_filenames'] or sys.platform == 'win32':
|
||||
new_filename = new_filename.replace('./', '_/').replace('.\\', '_\\')
|
||||
|
||||
return os.path.join(new_dirname, new_filename + ext)
|
||||
return os.path.join(new_dirname, new_filename + ext.lower())
|
||||
|
||||
def save_images(self):
|
||||
"""Save the cover images to disk."""
|
||||
|
||||
Reference in New Issue
Block a user