adding the unseen all option
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s

This commit is contained in:
2026-06-25 16:01:08 +01:00
parent 25b602a3b8
commit ad9c6c7a2a
3 changed files with 28 additions and 7 deletions
+6 -1
View File
@@ -1,7 +1,8 @@
from django.http import HttpResponse
from django.db.models import Count
from django.shortcuts import redirect
from apps.random_simpsons.models import SimpsonsData,simpsons_data_object
from .models import SimpsonsData,simpsons_data_object
from .utils import mark_episode_watched
import random
@@ -36,6 +37,9 @@ def episode_generator(request):
# It will still update an already seem episode but it works and I'm lazy
simpsons_data_object.filter(season=random_seasons, episode=random_episode).values('seen').update(seen=True)
#Mark episode as seen on betaseries
mark_episode_watched(random_seasons,random_episode,"watched")
return redirect(str(random_url))
@@ -60,3 +64,4 @@ def download_mo(request,file):
file_name = file[5:]
response['Content-Disposition'] = 'inline; filename=' + file_name
return response