Skip to content

Commit

Permalink
Updated Discord presence hook
Browse files Browse the repository at this point in the history
  • Loading branch information
z411 committed Sep 1, 2022
1 parent 16c1551 commit cfe60aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hooks/presence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion trackma/ui/qt/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit cfe60aa

Please sign in to comment.