From c314b993fc96965cc48c37c7331611abf9da1451 Mon Sep 17 00:00:00 2001 From: Merrick28 Date: Thu, 19 Feb 2026 15:27:45 +0100 Subject: [PATCH 1/3] bugfix template --- data/templates/C411.txt | 56 +++++++++++++++++++++++++++++++++++++++ data/templates/FRENCH.txt | 4 +-- src/trackers/FRENCH.py | 2 ++ 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 data/templates/C411.txt diff --git a/data/templates/C411.txt b/data/templates/C411.txt new file mode 100644 index 000000000..00abb11de --- /dev/null +++ b/data/templates/C411.txt @@ -0,0 +1,56 @@ +[img]{{ poster }}[/img] + +[b][font=Verdana][color=#3d85c6][size=29]{{ title }}[/size][/font] +[size=18]{{ year }}[/size][/color][/b] + +{% if category == "TV" %} +[b][size=18]S{{ season }}E{{ episode }}[/size][/b] +{% endif %} + +[font=Verdana][size=13][b][color=#3d85c6]Titre original :[/color][/b] [i]{{ original_title }}[/i][/size][/font] +[b][color=#3d85c6]Pays :[/color][/b] [i]{{ pays }}[/i] +[b][color=#3d85c6]Genres :[/color][/b] [i]{{ genre }}[/i] +[b][color=#3d85c6]Date de sortie :[/color][/b] [i]{{ release_date }}[/i] + +{% if category == 'MOVIE' %} +[b][color=#3d85c6]Durée :[/color][/b] [i]{{ video_duration }} Minutes[/i] +{% endif %} + +{% if imdb_url %}[url={{ imdb_url }}]IMDb[/url]{% endif %} +{% if tmdb %}[url=https://www.themoviedb.org/{{ category.lower() }}/{{ tmdb }}]TMDB[/url]{% endif %} +{% if tvdb_id %}[url=https://www.thetvdb.com/?id={{ tvdb_id }}&tab=series]TVDB[/url]{% endif %} +{% if tvmaze_id %}[url=https://www.tvmaze.com/shows/{{ tvmaze_id }}]TVmaze[/url]{% endif %} +{% if mal_id %}[url=https://myanimelist.net/anime/{{ mal_id }}]MyAnimeList[/url]{% endif %} + +[img]https://i.imgur.com/W3pvv6q.png[/img] + +{{ description }} + +[img]https://i.imgur.com/KMZsqZn.png[/img] + +[b][color=#3d85c6]Source :[/color][/b] [i]{{ source }} {{ service_longname }}[/i] +[b][color=#3d85c6]Type :[/color][/b] [i]{{ type }}[/i] +[b][color=#3d85c6]Résolution vidéo :[/color][/b][i]{{ resolution }}[/i] +[b][color=#3d85c6]Format vidéo :[/color][/b] [i]{{ container }}[/i] +[b][color=#3d85c6]Codec vidéo :[/color][/b] [i]{{ video_codec }} {{ hdr }}[/i] +[b][color=#3d85c6]Débit vidéo :[/color][/b] [i]{{ mbps|round(2) }} MB/s[/i] + +[b][color=#3d85c6] Audio(s) :[/color][/b] +{% for line in audio_lines %} +{{ line }} +{% endfor %} + +{% if subtitle_lines %}[b][color=#3d85c6]Sous-titres :[/color][/b] +{% for line in subtitle_lines %} +{{ line }} +{% endfor %} +{% endif %} + +[b][color=#3d85c6]Team :[/color][/b] [i]{{ tag }}[/i] +[b][color=#3d85c6] Taille totale :[/color][/b] {{ size_gib|round(2) }} GB + +{% if images %}{% for image in images %} +[img]{{ image['raw_url'] }}[/img] +{% endfor %}{% endif %} + +[url=https://github.com/Audionut/Upload-Assistant]{{ signature }}[/url] \ No newline at end of file diff --git a/data/templates/FRENCH.txt b/data/templates/FRENCH.txt index e7473628d..efa304e28 100644 --- a/data/templates/FRENCH.txt +++ b/data/templates/FRENCH.txt @@ -33,7 +33,7 @@ [b][color=#3d85c6]Résolution vidéo :[/color][/b][i]{{ resolution }}[/i] [b][color=#3d85c6]Format vidéo :[/color][/b] [i]{{ container }}[/i] [b][color=#3d85c6]Codec vidéo :[/color][/b] [i]{{ video_codec }} {{ hdr }}[/i] -[b][color=#3d85c6]Débit vidéo :[/color][/b] [i]{{ mbps:.2f }} MB/s[/i] +[b][color=#3d85c6]Débit vidéo :[/color][/b] [i]{{ mbps|round(2) }} MB/s[/i] [b][color=#3d85c6] Audio(s) :[/color][/b] {% for line in audio_lines %} @@ -47,7 +47,7 @@ {% endif %} [b][color=#3d85c6]Team :[/color][/b] [i]{{ tag }}[/i] -[b][color=#3d85c6] Taille totale :[/color][/b] {{ size_gib:.2f }} GB +[b][color=#3d85c6] Taille totale :[/color][/b] {{ size_gib|round(2) }} GB {% if images %}{% for image in images %} [img]{{ image['raw_url'] }}[/img] diff --git a/src/trackers/FRENCH.py b/src/trackers/FRENCH.py index 7c9d2a41d..f21837201 100644 --- a/src/trackers/FRENCH.py +++ b/src/trackers/FRENCH.py @@ -635,8 +635,10 @@ async def get_desc_full(meta: dict[str, Any], tracker) -> str: template_path = os.path.abspath(f"{meta['base_dir']}/data/templates/FRENCH.txt") if os.path.exists(template_path): + async with aiofiles.open(template_path, 'r', encoding='utf-8') as description_file: template_content = await description_file.read() + description_text = Template(template_content).render(**context) try: description_text = Template(template_content).render(**context) except Exception: From 9ba21a8c7eff23445bd4f3d66c1f2f424b0e21f3 Mon Sep 17 00:00:00 2001 From: Merrick28 Date: Mon, 23 Feb 2026 06:53:19 +0100 Subject: [PATCH 2/3] use c411 template --- data/templates/C411.txt | 37 ++++++++++++++++++++----------------- src/trackers/FRENCH.py | 1 - 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/data/templates/C411.txt b/data/templates/C411.txt index 00abb11de..89a9599d7 100644 --- a/data/templates/C411.txt +++ b/data/templates/C411.txt @@ -1,20 +1,19 @@ -[img]{{ poster }}[/img] +[h1]{{ title }} ({{ year }})[/h1] -[b][font=Verdana][color=#3d85c6][size=29]{{ title }}[/size][/font] -[size=18]{{ year }}[/size][/color][/b] {% if category == "TV" %} -[b][size=18]S{{ season }}E{{ episode }}[/size][/b] +[h2]Saison {{ season }} {% if episode %}Episode {{ episode }}{% endif %}[/h2] {% endif %} -[font=Verdana][size=13][b][color=#3d85c6]Titre original :[/color][/b] [i]{{ original_title }}[/i][/size][/font] -[b][color=#3d85c6]Pays :[/color][/b] [i]{{ pays }}[/i] -[b][color=#3d85c6]Genres :[/color][/b] [i]{{ genre }}[/i] -[b][color=#3d85c6]Date de sortie :[/color][/b] [i]{{ release_date }}[/i] +[img]{{ poster }}[/img] + -{% if category == 'MOVIE' %} -[b][color=#3d85c6]Durée :[/color][/b] [i]{{ video_duration }} Minutes[/i] -{% endif %} +[h2]🎬 Informations[/h2] + +[b]Pays :[/b] {{pays}} +[b]Genres :[/b] {{genre}} +[b]Date de sortie :[/b] {{release_date}} +{% if video_duration %}[b]Durée :[/b] {{video_duration}}{% endif %} {% if imdb_url %}[url={{ imdb_url }}]IMDb[/url]{% endif %} {% if tmdb %}[url=https://www.themoviedb.org/{{ category.lower() }}/{{ tmdb }}]TMDB[/url]{% endif %} @@ -22,25 +21,29 @@ {% if tvmaze_id %}[url=https://www.tvmaze.com/shows/{{ tvmaze_id }}]TVmaze[/url]{% endif %} {% if mal_id %}[url=https://myanimelist.net/anime/{{ mal_id }}]MyAnimeList[/url]{% endif %} -[img]https://i.imgur.com/W3pvv6q.png[/img] +[h3]📖 Synopsis[/h3] -{{ description }} +{{description}} -[img]https://i.imgur.com/KMZsqZn.png[/img] +[h2]⚙️ Détails Techniques[/h2] [b][color=#3d85c6]Source :[/color][/b] [i]{{ source }} {{ service_longname }}[/i] [b][color=#3d85c6]Type :[/color][/b] [i]{{ type }}[/i] [b][color=#3d85c6]Résolution vidéo :[/color][/b][i]{{ resolution }}[/i] [b][color=#3d85c6]Format vidéo :[/color][/b] [i]{{ container }}[/i] [b][color=#3d85c6]Codec vidéo :[/color][/b] [i]{{ video_codec }} {{ hdr }}[/i] -[b][color=#3d85c6]Débit vidéo :[/color][/b] [i]{{ mbps|round(2) }} MB/s[/i] +[b][color=#3d85c6]Débit vidéo :[/color][/b] [i]{{ mbps|round(2) }} MB/s[/i] + +[h3]🔊 Langue(s)[/h3] -[b][color=#3d85c6] Audio(s) :[/color][/b] {% for line in audio_lines %} {{ line }} {% endfor %} -{% if subtitle_lines %}[b][color=#3d85c6]Sous-titres :[/color][/b] +{% if subtitle_lines %} + +[h3]💬 Sous-titre(s)[/h3] + {% for line in subtitle_lines %} {{ line }} {% endfor %} diff --git a/src/trackers/FRENCH.py b/src/trackers/FRENCH.py index f21837201..0cd430271 100644 --- a/src/trackers/FRENCH.py +++ b/src/trackers/FRENCH.py @@ -638,7 +638,6 @@ async def get_desc_full(meta: dict[str, Any], tracker) -> str: async with aiofiles.open(template_path, 'r', encoding='utf-8') as description_file: template_content = await description_file.read() - description_text = Template(template_content).render(**context) try: description_text = Template(template_content).render(**context) except Exception: From 62ffc9068cc386e6e3235e7e785cb1ca65babe2c Mon Sep 17 00:00:00 2001 From: Merrick28 Date: Mon, 23 Feb 2026 06:55:33 +0100 Subject: [PATCH 3/3] template c411 --- data/templates/C411.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/data/templates/C411.txt b/data/templates/C411.txt index 89a9599d7..d9cd9b93b 100644 --- a/data/templates/C411.txt +++ b/data/templates/C411.txt @@ -1,6 +1,5 @@ [h1]{{ title }} ({{ year }})[/h1] - {% if category == "TV" %} [h2]Saison {{ season }} {% if episode %}Episode {{ episode }}{% endif %}[/h2] {% endif %}