Skip to content
This repository has been archived by the owner on May 8, 2022. It is now read-only.

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
glebliutsko committed Mar 4, 2021
2 parents 0e712ea + 2530235 commit af949f6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spolyrics/services/spotify_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ def short_description(self) -> str:
return 'Spotify not playing'


class LoadingLyricsStatus(StatusABC):
def __init__(self):
super().__init__(False)

@property
def short_description(self) -> str:
return 'Loading lyrics'


class NetworkErrorStatus(StatusABC):
def __init__(self):
super().__init__(True)
Expand Down Expand Up @@ -139,6 +148,8 @@ def run(self):
elif diff_track.is_change:
self.logger.info(f'Update current track: {current_track}')

self.status_change.emit(LoadingLyricsStatus())

lyrics = self.service.get_lyrics(current_track)

self.track_changed.emit(current_track, lyrics)
Expand Down

0 comments on commit af949f6

Please sign in to comment.