Ejemplo n.º 1
0
 def __init__(self, sp: spotipy.Spotify, queue: Queue):
     self.sp = sp
     self._playback = playback.PlaybackFunctions(sp)
     self._play = play.PlayFunctions(sp, queue)
     self._toggle = toggle.ToggleFunctions(sp)
     self._check = check.CheckFunctions(sp)
     self._misc = misc.MiscFunctions(sp)
Ejemplo n.º 2
0
    def refresh(self, method):
        if method is not None:
            method()
        checks = check.CheckFunctions(self.sp)
        if checks.is_song_liked():
            self.like_button.load_svg(f"{ASSETS_DIR}svg{sep}heart.svg")
        else:
            self.like_button.load_svg(f"{ASSETS_DIR}svg{sep}heart-no-fill.svg")

        if checks.is_song_playing():
            self.pause_play_button.load_svg(f"{ASSETS_DIR}svg{sep}pause.svg")
        else:
            self.pause_play_button.load_svg(f"{ASSETS_DIR}svg{sep}play.svg")

        if checks.is_shuffle_on():
            self.shuffle_button.load_svg(f"{ASSETS_DIR}svg{sep}shuffle.svg")
        else:
            self.shuffle_button.load_svg(
                f"{ASSETS_DIR}svg{sep}shuffle-off.svg")
Ejemplo n.º 3
0
 def __init__(self, sp: spotipy.Spotify):
     self.sp = sp
     self._check = check.CheckFunctions(sp)