Skip to content

Commit

Permalink
chore: bump nowplaypadgen to 0.1.3 (uuid vs uid)
Browse files Browse the repository at this point in the history
  • Loading branch information
hairmare committed Jan 11, 2022
1 parent 0c266b8 commit 0f36d90
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
5 changes: 4 additions & 1 deletion nowplaying/show/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def get_show_info(self, force_update=False):

def lazy_update(self):
# only update the info if we expect that a new show has started
if self.show.endtime and datetime.datetime.now(pytz.timezone("UTC")) > self.show.endtime:
if (
not self.show.endtime
or datetime.datetime.now(pytz.timezone("UTC")) > self.show.endtime
):
logger.info("Show expired, going to update show info")
self.update()

Expand Down
5 changes: 1 addition & 4 deletions nowplaying/track/observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,7 @@ def __init__(self, baseUrl, dls_enabled: bool = False):
self.dls_enabled = dls_enabled
logger.info(
"DAB+ Audio Companion initialised with URL: %s, DLS+ enabled: %r"
% (
self.baseUrl,
self.dls_enabled,
)
% (self.baseUrl, self.dls_enabled)
)

def track_started(self, track):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ConfigArgParse==1.5.3
isodate==0.6.1
lxml==4.7.1
nowplaypadgen==0.1.2
nowplaypadgen==0.1.3
pylast==4.4.0
pytz==2021.3
requests==2.27.1
5 changes: 1 addition & 4 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
@patch("nowplaying.main.NowPlaying._run_daemon")
@patch("socket.setdefaulttimeout")
def test_run(
mock_setdefaulttimeout,
mock_run_daemon,
mock_setup_urllib,
mock_setup_logging,
mock_setdefaulttimeout, mock_run_daemon, mock_setup_urllib, mock_setup_logging
):
now_playing = NowPlaying()
now_playing.run()
Expand Down
3 changes: 1 addition & 2 deletions tests/test_track_observer_dabaudiocompanion.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ def test_track_started(mock_requests_get, track_factory, show_factory):
track.show = show_factory()

dab_audio_companion_track_observer = DabAudioCompanionTrackObserver(
baseUrl=_BASE_URL,
dls_enabled=True,
baseUrl=_BASE_URL, dls_enabled=True
)
dab_audio_companion_track_observer.track_started(track)

Expand Down

0 comments on commit 0f36d90

Please sign in to comment.