diff --git a/app/ui/main.py b/app/ui/main.py index dc4ce32a..352e45d4 100644 --- a/app/ui/main.py +++ b/app/ui/main.py @@ -3524,7 +3524,8 @@ class Application(Gtk.Application): def get_url_from_m3u(self, data): error_code = data.get("error_code", 0) - if error_code or self._http_status_image.get_visible(): + if error_code: + log(f"HTTP connection error [{error_code}].") self.show_error_message("No connection to the receiver!") return diff --git a/app/ui/playback.py b/app/ui/playback.py index 744e682c..f29f7059 100644 --- a/app/ui/playback.py +++ b/app/ui/playback.py @@ -123,6 +123,7 @@ class PlayerBox(Gtk.Overlay): self.connect("delete-event", self.on_delete) self.connect("show", self.set_player_area_size) + self.connect("unrealize", self.on_unrealize) @property def playback_widget(self): @@ -196,6 +197,10 @@ class PlayerBox(Gtk.Overlay): self.init_playback_elements() self.on_play() + def on_unrealize(self, box): + if self._player: + self._player.release() + def init_playback_elements(self): self._player.connect("error", self.on_error) self._player.connect("played", self.on_played) @@ -418,8 +423,7 @@ class PlayerBox(Gtk.Overlay): elif mode is PlaybackMode.ZAP: self.on_zap() elif mode is PlaybackMode.ZAP_PLAY: - ref = self.on_play_service() - self.zap(ref) if ref else None + self.on_zap(self.play_current) elif mode is PlaybackMode.STREAM: self.on_play_stream()