diff --git a/hooks/presence.py b/hooks/presence.py index e3effde5..f5e1ed3c 100644 --- a/hooks/presence.py +++ b/hooks/presence.py @@ -17,7 +17,7 @@ from pypresence.exceptions import InvalidID, InvalidPipe from trackma.utils import estimate_aired_episodes - +from trackma.utils import Tracker class DiscordRPC(Thread): """ @@ -124,7 +124,7 @@ def tracker_state(engine, status): """ Update status in thread. """ - if status["state"] == 1: + if status["state"] == Tracker.PLAYING: show = status["show"][0] title = show["titles"][0] episode = status["show"][-1] diff --git a/trackma/ui/qt/mainwindow.py b/trackma/ui/qt/mainwindow.py index 68d7a663..ae314761 100644 --- a/trackma/ui/qt/mainwindow.py +++ b/trackma/ui/qt/mainwindow.py @@ -744,11 +744,11 @@ def _rebuild_view(self): # Get the new list and pass it to our model self.view.setSortingEnabled(False) + self.view.resizeRowsToContents() self.view.model().setFilterStatus( self.notebook.tabData(self.notebook.currentIndex())) self.view.model().sourceModel().setMediaInfo(self.mediainfo) self.view.model().sourceModel().setShowList(showlist, altnames, library) - self.view.resizeRowsToContents() self.view.setSortingEnabled(True) self.s_filter_changed()