[gnome-music: 1/2] glib: don't crash when clicking on artist/songs tab



commit 98c00f714a2c0338582e76f4feb090daf5134a6d
Author: Lubosz Sarnecki <lubosz gmail com>
Date:   Mon Aug 5 13:38:06 2013 +0200

    glib: don't crash when clicking on artist/songs tab
    
    Use empty string and not None to fix following exception
    
    Traceback (most recent call last):
      File "/usr/lib/python3.3/site-packages/gnomemusic/grilo.py", line 72,
    in _callback
        callback(source, param, item)
      File "/usr/lib/python3.3/site-packages/gnomemusic/widgets.py", line
    502, in get_songs
        title = AlbumArtCache.get_media_title(track)
      File "/usr/lib/python3.3/site-packages/gnomemusic/albumArtCache.py",
    line 209, in get_media_title
        title = GLib.uri_unescape_string(basename, None)
      File "/usr/lib/python3.3/site-packages/gi/types.py", line 113, in
    function
        return info.invoke(*args, **kwargs)
    TypeError: Argument 1 does not allow None as a value

 gnomemusic/albumArtCache.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index 75d8350..ccda3df 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -206,7 +206,7 @@ class AlbumArtCache:
         uri_file = Gio.File.new_for_path(uri)
         basename = uri_file.get_basename()
 
-        title = GLib.uri_unescape_string(basename, None)
+        title = GLib.uri_unescape_string(basename, "")
         if escaped:
             return GLib.markup_escape_text(title)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]