[gnome-music] simplify set_view_filter: don't re-read media's artist and album
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] simplify set_view_filter: don't re-read media's artist and album
- Date: Thu, 27 Mar 2014 21:21:08 +0000 (UTC)
commit b5092d68bb1627e4ad73c2dff608d714797c189c
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Thu Mar 27 17:04:55 2014 +0100
simplify set_view_filter: don't re-read media's artist and album
https://bugzilla.gnome.org/show_bug.cgi?id=726721
gnomemusic/searchbar.py | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/gnomemusic/searchbar.py b/gnomemusic/searchbar.py
index 8202b26..988ecc6 100644
--- a/gnomemusic/searchbar.py
+++ b/gnomemusic/searchbar.py
@@ -27,18 +27,10 @@ class Searchbar(Gd.Revealer):
if self._search_entry.get_property("visible"):
search_string = self._search_entry.get_text().lower()
media = model.get_value(itr, 5)
- searchable_fields = []
- artist = _("Unknown Artist")
- album = _("Unknown Album")
+ searchable_fields = [model.get_value(itr, 2),
+ model.get_value(itr, 3)]
if media and media.get_url():
- if media.get_artist() is not None:
- artist = media.get_artist()
- if media.get_album() is not None:
- album = media.get_album()
- searchable_fields = [artist, album, media.get_title()]
- else:
- searchable_fields = [model.get_value(itr, 2),
- model.get_value(itr, 3)]
+ searchable_fields.append(media.get_title())
for field in searchable_fields:
if field and search_string in field.lower():
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]