Lowercase the extension on file renaming/moving. (#2701)

This commit is contained in:
Lukáš Lalinský
2007-04-12 22:36:40 +02:00
parent e21f74c76c
commit bdc6255f7b
2 changed files with 3 additions and 2 deletions

View File

@@ -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)

View File

@@ -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."""