Die Comedy-Quizshow
+Schaltet ein und seht, ob das Panel die unglaublichsten Fragen beantworten kann. Willkommen im offiziellen Archiv von Genial Daneben.
+ Aktuelle Folge ansehen +diff --git a/README.md b/README.md index 3af8578..4cce9f6 100644 --- a/README.md +++ b/README.md @@ -93,4 +93,34 @@ This project is a purely private fan project for archival and statistical purpos ### 📄 License & Copyright This system was developed exclusively for private use. -**Copyright (c) 2026.** *Conception & Development: Genial Daneben Archive Project.* All rights reserved. No unauthorized reproduction or commercial use. \ No newline at end of file +**Copyright (c) 2026.** *Conception & Development: Genial Daneben Archive Project.* All rights reserved. No unauthorized reproduction or commercial use. + +--- + +# Changelog - Genial Daneben Archive: + +## [2026-02-16] - Weekly Sprint: Backend Tools & System Architecture + +### Added +- **Community Video Reporting System (gd app)**: Decentralized "Broken Video" reporting for YouTube. + - **Crowdsourced Validation**: Implemented a "3-Strike Rule" via `melde_count`. + - **Anti-Spam**: Integrated browser cookies and IP-logging (`reporter_ips`) to prevent manipulation. +- **REST API Integration (gd app)**: Added v1 API functionality using Django REST Framework for Episode and Team data. +- **Environmental Configuration (Main Project)**: Implemented `.env` support for secure management of sensitive data (Secret Keys, DB credentials, Jellyfin URLs). +- **[WIP] Reporting Engine (Main Project)**: Added a test-phase script for automated report generation and data analysis. + +### Changed +- **Episode Management (intern app)**: + - Enhanced the Episode Creation Form with a dedicated **Media Data section**. + - Improved UX by enlarging the **Answer text fields** for better readability during data entry. +- **Archive List (intern app)**: Updated the episode list view with status icons for **Jellyfin** and **YouTube** availability. +- **Messaging & UI (gd app)**: + - Relocated system messages to a fixed-position floating layer (Top-Right) with a 5-second auto-close timer. + - Improved **Episode Detail layout** for better content hierarchy and video integration. +- **Dashboard Refinement (gd app)**: Updated header information and adjusted statistics to exclude moderator/pseudo-member data. +- **Global Styles (Base Template)**: Added JavaScript enhancements to support dynamic icon rendering across different modules. +- **Namespace Migration**: Switched all routing to the `gd:` namespace for scalability. + +### Fixed +- **Database Schema**: Migrated `FolgenZusatzInfo` to include reporting metadata (`melde_count`, `gemeldet_am`, `reporter_ips`). +- **Ranking Accuracy**: Refined SQL queries to correctly filter out "Hugo Egon Balder" and "Unknown" from solve-rate statistics. \ No newline at end of file diff --git a/gd/admin.py b/gd/admin.py index 281255c..6155296 100644 --- a/gd/admin.py +++ b/gd/admin.py @@ -1,9 +1,87 @@ +import requests +from django.conf import settings from django.contrib import admin -from .models import Team, Folge, FolgePanel, Frage, FrageAntwort +from django.utils.html import format_html +from .models import Team, Folge, FolgePanel, Frage, FrageAntwort, FolgenZusatzInfo -# ========================= -# Inline für Panel-Mitglieder einer Folge -# ========================= +# ================================================================= +# HILFSFUNKTION: JELLYFIN API SUCHE +# ================================================================= +def find_jellyfin_id(folgen_nummer): + """ + Sucht in Jellyfin nach der Episode (Muster: ep1, ep2...). + Nutzt Einstellungen aus settings.py (geladen aus .env). + """ + jf_url = getattr(settings, 'JELLYFIN_URL', None) + jf_key = getattr(settings, 'JELLYFIN_API_KEY', None) + + if not jf_url or not jf_key: + return None + + # Kleingeschriebenes 'ep' wie in deinem manuellen Test-Link + search_term = f"ep{folgen_nummer}" + headers = {"X-Emby-Token": jf_key} + url = f"{jf_url.rstrip('/')}/Items" + + params = { + "searchTerm": search_term, + "Recursive": True, + "IncludeItemTypes": "Video", + "Limit": 1 + } + + try: + response = requests.get(url, headers=headers, params=params, timeout=5) + if response.status_code == 200: + data = response.json() + if data.get('Items'): + return data['Items'][0]['Id'] + except Exception: + pass + return None + +# ================================================================= +# INLINE: Zusatzinfos (Jellyfin/YouTube) +# ================================================================= +class FolgenZusatzInfoInline(admin.StackedInline): + model = FolgenZusatzInfo + can_delete = False + verbose_name = "Video-Link & Zusatzinfo" + verbose_name_plural = "Video-Links & Zusatzinfos" + readonly_fields = ('jellyfin_suche_link', 'jellyfin_status_view') + + fields = ('jellyfin_item_id', 'jellyfin_status_view', 'jellyfin_suche_link', 'yt_adresse', 'folgen_infos') + + def jellyfin_suche_link(self, obj): + """Manueller Link zur Suche mit DEINER spezifischen Jellyfin-Syntax""" + if obj.folge: + base_url = getattr(settings, 'JELLYFIN_URL', 'http://192.168.178.9:8096') + search_term = f"ep{obj.folge.folgen_nummer}" + + # Syntax basierend auf deinem Link: #/search?query= + url = f"{base_url.rstrip('/')}/web/index.html#/search?query={search_term}" + + return format_html( + '
- Digitale Erfassung aller Sendungen, Panel-Gäste und Fragen. - Dieses Dashboard dient der Analyse von Lösungsquoten und der Performance der Rateteams über alle Staffeln hinweg. -
++ Digitale Erfassung aller Sendungen, Panel-Gäste und Fragen. + Dieses Dashboard dient der Analyse von Lösungsquoten und der Performance der Rateteams über alle Staffeln hinweg (bis 2011). +
+ +- Privates Archiv-Projekt zur Dokumentation deutscher TV-Geschichte. -
-Ausstrahlung am {{ folge.datum|date:"d. F Y" }} | Moderator: {{ folge.moderator }}
+ + Externer Inhalt: Dieses Video wird von YouTube bereitgestellt. Für Inhalte und Erreichbarkeit wird keine Haftung übernommen. +
+ + {# --- MELDE-LOGIK --- #} +{{ f.frage_text }}
+{{ f.frage_text }}
-{{ f.antwort.antwort_text }}
+{{ f.antwort.antwort_text }}
{% if f.antwort.team.all %} -Keine Fragen zu dieser Folge vorhanden.
+Keine Fragen zu dieser Folge vorhanden.
{% endfor %}
+
+
+ Schaltet ein und seht, ob das Panel die unglaublichsten Fragen beantworten kann. Willkommen im offiziellen Archiv von Genial Daneben.
+ Aktuelle Folge ansehen +