Skip to content

Commit

Permalink
fix(presences.Animepahe): update status tracking from last_title to l…
Browse files Browse the repository at this point in the history
…ast_status
  • Loading branch information
manucabral committed Nov 28, 2024
1 parent b907101 commit 663be91
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions presences/Animepahe/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,48 +47,48 @@ def get_rpp_label(self) -> str:
return f"{rpp.__title__} v{rpp.__version__}"

def set_idle(self):
if self.last_title != "idle":
if self.last_status != "idle":
self.state = "Idle"
self.details = "Nothing to show"
self.large_text = self.get_rpp_label()
self.large_image = self.buttons = None
self.end = self.start = None
self.log.info("Idle")
self.last_title = "idle"
self.last_status = "idle"
self.force_update()

def set_viewing_home(self):
if self.last_title != "viewing_home":
if self.last_status != "viewing_home":
self.state = "Home"
self.details = "Last releases"
self.large_text = self.get_rpp_label()
self.large_image = self.buttons = None
self.start = int(time.time())
self.log.info("Viewing home")
self.last_title = "viewing_home"
self.last_status = "viewing_home"
self.force_update()

def set_viewing_queue(self):
if self.last_title != "viewing_queue":
if self.last_status != "viewing_queue":
self.state = "Queue"
self.details = "Watching queue"
self.lage_image = ""
self.large_text = self.get_rpp_label()
self.buttons = None
self.start = int(time.time())
self.log.info("Viewing queue")
self.last_title = "viewing_queue"
self.last_status = "viewing_queue"
self.force_update()

def set_browsing_catalog(self):
if self.last_title != "browsing_catalog":
if self.last_status != "browsing_catalog":
self.state = "Browsing..."
self.details = "Searching in catalog"
self.large_text = self.get_rpp_label()
self.large_image = self.buttons = None
self.start = int(time.time())
self.log.info("Browsing in catalog")
self.last_title = "browsing_catalog"
self.last_status = "browsing_catalog"
self.force_update()

def set_watching_episode(self):
Expand All @@ -114,9 +114,9 @@ def set_watching_episode(self):
}
]

if self.last_title != metadata:
if self.last_status != metadata:
self.start = int(time.time())
self.last_title = metadata
self.last_status = metadata
self.log.info("Watching %s episode %s", title, episode)
self.force_update()

Expand Down

0 comments on commit 663be91

Please sign in to comment.