add options for the admin page
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s

This commit is contained in:
2026-06-25 13:56:25 +01:00
parent e76fb6684c
commit ed70f03a83
2 changed files with 37 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
from apps.betaserie.utils import betaserieUtils
from celery.worker.state import active_requests
betaserie = betaserieUtils()
simpsons_id = 12
def mark_episode_watched(season,episode,action):
print("season_number: "+str(season))
print("episode_number: "+str(episode))
episode_number = "S"+str(season)+"E"+str(episode)
episode_id = betaserie.identify_episode(simpsons_id,episode_number)
if action == "watched":
betaserie.mark_episodes_watched(episode_id)
elif action == "unwatched":
betaserie.unmark_episodes_watched(episode_id)
else:
print("Parameter action not in range")