# HG changeset patch # User drewp@bigasterisk.com # Date 1684377252 25200 # Node ID e13b62bfdaff5f3d96739c09c65737451b7b2bd1 # Parent cce16500f74799d12511f4238376ff4c5749b81e fix some warnings diff -r cce16500f747 -r e13b62bfdaff light9/ascoltami/main.py --- a/light9/ascoltami/main.py Wed May 17 19:24:29 2023 -0700 +++ b/light9/ascoltami/main.py Wed May 17 19:34:12 2023 -0700 @@ -13,7 +13,7 @@ gi.require_version('Gst', '1.0') gi.require_version('Gtk', '3.0') -from gi.repository import GObject, Gst +from gi.repository import Gst # type: ignore from light9 import networking, showconfig from light9.ascoltami.player import Player from light9.ascoltami.playlist import NoSuchSong, Playlist diff -r cce16500f747 -r e13b62bfdaff light9/ascoltami/musictime_client.py --- a/light9/ascoltami/musictime_client.py Wed May 17 19:24:29 2023 -0700 +++ b/light9/ascoltami/musictime_client.py Wed May 17 19:34:12 2023 -0700 @@ -30,6 +30,7 @@ make up times between the samples, and we'll just run off the end of a song) """ + self.positionFetchTime = 0 self.period = period self.hoverPeriod = .05 self.onChange = onChange diff -r cce16500f747 -r e13b62bfdaff light9/ascoltami/player.py --- a/light9/ascoltami/player.py Wed May 17 19:24:29 2023 -0700 +++ b/light9/ascoltami/player.py Wed May 17 19:34:12 2023 -0700 @@ -4,7 +4,7 @@ """ import time, logging, traceback -from gi.repository import Gst +from gi.repository import Gst # type: ignore from twisted.internet import task from light9.metrics import metrics log = logging.getLogger() diff -r cce16500f747 -r e13b62bfdaff light9/ascoltami/playlist.py --- a/light9/ascoltami/playlist.py Wed May 17 19:24:29 2023 -0700 +++ b/light9/ascoltami/playlist.py Wed May 17 19:34:12 2023 -0700 @@ -11,6 +11,7 @@ def __init__(self, graph, playlistUri): self.graph = graph + self.playlistUri = playlistUri self.songs = list(graph.items(playlistUri)) def nextSong(self, currentSong): @@ -47,8 +48,8 @@ # maybe that function should be moved to this method @classmethod - def fromShow(playlistClass, graph, show): + def fromShow(cls, graph, show): playlistUri = graph.value(show, L9['playList']) if not playlistUri: raise ValueError("%r has no l9:playList" % show) - return playlistClass(graph, playlistUri) + return cls(graph, playlistUri)