[gnome-music] Do not crash if we happen to come across a filename we can't decode
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] Do not crash if we happen to come across a filename we can't decode
- Date: Mon, 3 Mar 2014 09:51:12 +0000 (UTC)
commit fd195b8c3dfbbb520434a86f24e3bd216fbeb2e3
Author: Dominique Leuenberger <dimstar opensuse org>
Date: Thu Feb 27 23:37:20 2014 +0100
Do not crash if we happen to come across a filename we can't decode
https://bugzilla.gnome.org/show_bug.cgi?id=725355
gnomemusic/albumArtCache.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index c4e9735..292aa8c 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -237,7 +237,11 @@ class AlbumArtCache:
uri_file = Gio.File.new_for_path(uri)
basename = uri_file.get_basename()
- title = GLib.uri_unescape_string(basename, '')
+ try:
+ title = GLib.uri_unescape_string(basename, '')
+ except:
+ title = "Filename could not be decoded..."
+ pass
if escaped:
return GLib.markup_escape_text(title)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]