Commit c0f77dfa authored by Marinus Schraal's avatar Marinus Schraal Committed by Jean Felder
Browse files

coremodel: Cleanup signal id handling

Use int exclusively: 0 is equal to no connection.
parent b3e1e3ab
......@@ -85,7 +85,7 @@ class CoreModel(GObject.GObject):
super().__init__()
self._flatten_model = None
self._player_signal_id = None
self._player_signal_id = 0
self._current_playlist_model = None
self._previous_playlist_model = None
......@@ -238,9 +238,9 @@ class CoreModel(GObject.GObject):
if song.props.state in played_states:
song.props.state = SongWidget.State.UNPLAYED
if self._player_signal_id is not None:
if self._player_signal_id != 0:
self._current_playlist_model.disconnect(self._player_signal_id)
self._player_signal_id = None
self._player_signal_id = 0
self._current_playlist_model = None
songs_added = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment