Verified Commit bf1b8cb0 authored by Tijder's avatar Tijder

Fix build warnings

parent ff95bc58
Pipeline #244877 canceled with stage
in 1 minute and 16 seconds
......@@ -31,7 +31,7 @@ class Server:
args = list(parameters.unpack())
for i, sig in enumerate(self.method_inargs[method_name]):
if sig is 'h':
if sig == 'h':
msg = invocation.get_message()
fd_list = msg.get_unix_fd_list()
args[i] = fd_list.get(args[i])
......@@ -167,7 +167,7 @@ class MediaPlayer2Service(Server):
length = media.duration * 1000
if media.type is not 'track':
if media.type != 'track':
user_rating = 1.0
else:
user_rating = media.userRating / 10
......
......@@ -125,10 +125,10 @@ class Player(GObject.Object):
if plex_stream is not None and (plex_stream.index is i['ff-index'] or ('title' in i and str(extern_stream_title) == str(i['title']))):
stream_id = i['id']
if param is 'sid':
if param == 'sid':
self._player.sid = stream_id
self.sid = pindex
elif param is 'aid':
elif param == 'aid':
self._player.aid = stream_id
self.aid = pindex
......
......@@ -331,9 +331,9 @@ class PlayerView(Gtk.Box):
self.__on_process_slected(combo, 'audio')
def __on_process_slected(self, combo, what):
if what is 'audio':
if what == 'audio':
current_stream = self._selected_audio_stream
elif what is 'subtitle':
elif what == 'subtitle':
current_stream = self._selected_subtitle_stream
tree_iter = combo.get_active_iter()
......@@ -341,10 +341,10 @@ class PlayerView(Gtk.Box):
model = combo.get_model()
stream, stream_name = model[tree_iter][:2]
if (stream is not current_stream):
if what is 'audio':
if what == 'audio':
self._selected_audio_stream = stream
self._player.set_audio(stream)
elif what is 'subtitle':
elif what == 'subtitle':
self._selected_subtitle_stream = stream
self._player.set_subtitle(stream)
......
......@@ -56,7 +56,7 @@ class Plex(GObject.Object):
self._user_uuid = self._settings.get_string("user-uuid")
self._token = self.get_token(self._user_uuid)
self._server_uuid = self._settings.get_string("server-uuid")
if (self._server_uuid is not ''):
if (self._server_uuid != ''):
self._server_token = self.get_server_token(self._server_uuid)
self._server_url = self._settings.get_string("server-url")
else:
......
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