This commit is contained in:
@@ -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")
|
||||
Reference in New Issue
Block a user