[gnome-music/wip/jfelder/tag-test: 9/22] songwidget: Update getter function for track number
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/tag-test: 9/22] songwidget: Update getter function for track number
- Date: Mon, 29 Jul 2019 16:17:02 +0000 (UTC)
commit 8ae5956870ebc280fe89d3f73a6e4067e855d3fb
Author: Sumaid Syed <sumaidsyed gmail com>
Date: Wed Jul 17 16:31:47 2019 +0530
songwidget: Update getter function for track number
Track number getter defined in utils is more appropriate.
Based on patches by Jean Felder.
gnomemusic/widgets/songwidget.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/widgets/songwidget.py b/gnomemusic/widgets/songwidget.py
index 78c87181..851d137a 100644
--- a/gnomemusic/widgets/songwidget.py
+++ b/gnomemusic/widgets/songwidget.py
@@ -88,10 +88,8 @@ class SongWidget(Gtk.EventBox):
self._selection_mode = False
self._state = SongWidget.State.UNPLAYED
- song_number = media.get_track_number()
- if song_number == 0:
- song_number = ""
- self._number_label.set_text(str(song_number))
+ song_number = utils.get_media_track_nr(media)
+ self._number_label.props.label = song_number
title = utils.get_media_title(media)
self._title_label.set_max_width_chars(50)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]