Skip to content

Commit

Permalink
make sure that sanitize_mpdtag always returns a number (regardless of…
Browse files Browse the repository at this point in the history
… type int or str)
  • Loading branch information
Scott Horowitz committed Oct 24, 2007
1 parent ffe18a7 commit 5ee95c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sonata.py
Expand Up @@ -3371,6 +3371,7 @@ def download_image_to_filename(self, artist, album, dest_filename, all_images=Fa
try:
img_url = ""
self.downloading_image = True
# Amazon currently doesn't support utf8 and suggests latin1 encoding instead:
try:
artist = urllib.quote(artist.encode('latin1'))
album = urllib.quote(album.encode('latin1'))
Expand Down Expand Up @@ -6888,7 +6889,7 @@ def sanitize_mpdtag(self, mpdtag, return_int=False, str_padding=0):
if return_int:
return 0
else:
return ""
return "0".zfill(str_padding)

def searchfilter_toggle(self, widget, initial_text=""):
if self.filterbox_visible:
Expand Down

0 comments on commit 5ee95c6

Please sign in to comment.