diff --git a/data/templates/C411.txt b/data/templates/C411.txt new file mode 100644 index 000000000..d9cd9b93b --- /dev/null +++ b/data/templates/C411.txt @@ -0,0 +1,58 @@ +[h1]{{ title }} ({{ year }})[/h1] + +{% if category == "TV" %} +[h2]Saison {{ season }} {% if episode %}Episode {{ episode }}{% endif %}[/h2] +{% endif %} + +[img]{{ poster }}[/img] + + +[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 %} +{% 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 %} + +[h3]📖 Synopsis[/h3] + +{{description}} + +[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] + +[h3]🔊 Langue(s)[/h3] + +{% for line in audio_lines %} +{{ line }} +{% endfor %} + +{% if subtitle_lines %} + +[h3]💬 Sous-titre(s)[/h3] + +{% 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..0cd430271 100644 --- a/src/trackers/FRENCH.py +++ b/src/trackers/FRENCH.py @@ -635,6 +635,7 @@ 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() try: