Bug#1032075: Play Queue and display of current title don't change when actually played song changes

2023-03-15 Thread Sven Bartscher

Hi,

On Mon, 27 Feb 2023 15:19:17 +0100 Sven Bartscher 
 wrote:
when listening to music in sublime music, the song metadata indicated in 
the lower left corner and the play queue reachable in the lower right 
corner do not update when they should. This includes situations such as


* the next song starts when the previous has ended
* the “Go to next song” button is used
* another song is selected for playback somewhere else in the interface
* a song is set to “play next“

Instead they just stay stuck in in the state they have when starting up, 
i.e. showing the song that was first played after starting and the play 
queue at that time. Note that while the mentioned interface elements 
don't reflect the change, the actual playback and the time slider in the 
lower middle reflect the changes made, e.g. the time resets to the start 
when a new song is started and “play next” selections are correctly 
respected when switching to the next song.


I just noticed that the behavior described above actually depends on the 
active tab being viewed. While viewing the “Playlists” tab, the behavior 
is as described above. However, as soon as yous switch to another tab 
(“Albums”, “Artists” or “Browse”) the metadata indicator in the lower 
left corner updates to the correct values.


The behavior of the play queue depends on how music was queued there. If 
music has been queued from tabs other then “Playlists” the play queue 
behaves similarly to the metadata indicator, i.e. it is frozen while on 
the “Playlists” tab, but resumes updating correctly once you switch to 
another tab. If you fill the play queue by clicking the “Play All” or 
“Shuffle All” buttons in the “Playlists” tab or double clicking a 
specific song from a playlist, it goes into a permanently frozen state 
that keeps displaying the play queue in the state before the playlist 
was queued. This frozen state can be broken by going into another tab 
and playing another song to replace the play queue.


If you don't queue a whole playlist, but only a single song from the 
playlist tab, by right-clicking and selecting “Play next” or “Add to 
queue“ the play queue updates accordingly (as soon as you switch away 
from the playlists tab) and doesn't go into the permanently frozen state.


Regards
Sven


OpenPGP_signature
Description: OpenPGP digital signature


Bug#1032075: Play Queue and display of current title don't change when actually played song changes

2023-02-27 Thread Sven Bartscher

Package: sublime-music
Version: 0.11.16-4
Severity: normal


Hi,

when listening to music in sublime music, the song metadata indicated in 
the lower left corner and the play queue reachable in the lower right 
corner do not update when they should. This includes situations such as


* the next song starts when the previous has ended
* the “Go to next song” button is used
* another song is selected for playback somewhere else in the interface
* a song is set to “play next“

Instead they just stay stuck in in the state they have when starting up, 
i.e. showing the song that was first played after starting and the play 
queue at that time. Note that while the mentioned interface elements 
don't reflect the change, the actual playback and the time slider in the 
lower middle reflect the changes made, e.g. the time resets to the start 
when a new song is started and “play next” selections are correctly 
respected when switching to the next song.


When starting sublime-music it prints out various exception messages, 
which might be related to the problem, as can be seen in the attached log.


Regards
Sven

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing-debug
  APT policy: (990, 'testing-debug'), (990, 'testing'), (102, 
'unstable-debug'), (102, 'unstable'), (101, 'experimental-debug'), (101, 
'experimental')

Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-6-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE 
not set

Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages sublime-music depends on:
ii  gir1.2-gtk-3.03.24.36-4
ii  gir1.2-nm-1.0 1.42.0-1
ii  libjs-sphinxdoc   5.3.0-3
ii  python3   3.11.2-1
ii  python3-bleach5.0.1-2
ii  python3-dataclasses-json  0.5.7-3
ii  python3-dateutil  2.8.2-1
ii  python3-deepdiff  6.2.2-1
ii  python3-fuzzywuzzy0.18.0-4
ii  python3-gi3.42.2-3+b1
ii  python3-levenshtein   0.12.2-2+b4
ii  python3-mpv   1.0.1-3
ii  python3-peewee3.14.10+dfsg-1+b3
ii  python3-requests  2.28.1+dfsg-1
ii  python3-semver2.10.2-3
ii  sphinx-rtd-theme-common   1.2.0+dfsg-1

Versions of packages sublime-music recommends:
ii  libnotify40.8.1-1
ii  python3-bottle0.12.23-1
ii  python3-keyring   23.9.3-2
ii  python3-pychromecast  9.4.0-2

Versions of packages sublime-music suggests:
ii  network-manager  1.42.0-1

-- no debconf information

(sublime-music:76700): Gtk-CRITICAL **: 15:16:32.819: gtk_widget_set_size_request: assertion 'width >= -1' failed
Bottle v0.12.23 server starting up (using WSGIRefServer())...
Listening on http://0.0.0.0:8282/
Hit Ctrl-C to quit.

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/peewee.py", line 6970, in get
return clone.execute(database)[0]
   ~~~^^^
  File "/usr/lib/python3/dist-packages/peewee.py", line 4339, in __getitem__
return self.row_cache[item]
   ~~^^
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sublime_music/app.py", line 346, in do_activate
self.dbus_manager.property_diff()
  File "/usr/lib/python3/dist-packages/sublime_music/dbus/manager.py", line 372, in property_diff
new_property_dict = self.property_dict()

  File "/usr/lib/python3/dist-packages/sublime_music/dbus/manager.py", line 239, in property_dict
"Metadata": self.get_mpris_metadata(

  File "/usr/lib/python3/dist-packages/sublime_music/dbus/manager.py", line 335, in get_mpris_metadata
artist_name = song.artist.name if song.artist else ""
  ^^^
  File "/usr/lib/python3/dist-packages/peewee.py", line 4486, in __get__
return self.get_rel_instance(instance)
   ^^^
  File "/usr/lib/python3/dist-packages/peewee.py", line 4477, in get_rel_instance
obj = self.rel_model.get(self.field.rel_field == value)
  ^
  File "/usr/lib/python3/dist-packages/peewee.py", line 6522, in get
return sq.get()
   
  File "/usr/lib/python3/dist-packages/peewee.py", line 6973, in get
raise self.model.DoesNotExist('%s instance matching query does '
sublime_music.adapters.filesystem.models.ArtistDoesNotExist:  instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."name", "t1"."album_count", "t1"."starred", "t1"."biography", "t1"."music_brainz_id", "t1"."last_fm_url", "t1"."_artist_image_url_id" FROM "artist" AS "t1" WHERE ("t