Permalink
Browse files

fix uppercase mp3 uploading

  • Loading branch information...
2 parents 91fcda3 + 1e7b761 commit 8b04c1b62a13a2ff514649f380f57a27cfad0898 @simon-weber committed Sep 17, 2012
View
2 gmusicapi/api.py
@@ -709,7 +709,7 @@ def _temp_mp3_conversion(self, filenames):
try:
for orig_fn in filenames:
- extension = orig_fn.split(".")[-1]
+ extension = orig_fn.split(".")[-1].lower()
if extension == "mp3":
all_file_handles.append(file(orig_fn))
View
2 gmusicapi/protocol.py
@@ -753,7 +753,7 @@ def make_metadata_request(self, filenames):
for filename in filenames:
- if not filename.split(".")[-1] == "mp3":
+ if not filename.split(".")[-1].lower() == "mp3":
self.log.error("Cannot upload '%s' because it is not an mp3.")
track = metadata.tracks.add()
View
2 gmusicapi/test/regression_test_api.py
@@ -39,7 +39,7 @@
from ..protocol import UnknownExpectation
#Expected to be in this directory.
-has_tags_filename = 'test.mp3'
+has_tags_filename = 'upper.MP3'
#Also tests unicode compatibility.
no_tags_filename = '한글.mp3'
View
BIN gmusicapi/test/upper.MP3
Binary file not shown.

0 comments on commit 8b04c1b

Please sign in to comment.