Update List
This commit is contained in:
177
digi_dash_playlist_generator.py
Normal file
177
digi_dash_playlist_generator.py
Normal file
@@ -0,0 +1,177 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
DIGI Online - DASH Playlist Generator
|
||||
Generează playlist cu URL-uri DASH (.mpd) pentru canalele DIGI
|
||||
"""
|
||||
|
||||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
def generate_digi_dash_playlist():
|
||||
"""Generează playlist DASH pentru canalele DIGI Online"""
|
||||
|
||||
# URL de bază pentru manifest-uri DASH
|
||||
base_url = "https://edge-ar.rcs-rds.ro"
|
||||
|
||||
# Lista de canale cu ID-uri și informații
|
||||
# Format: (id, nume, logo, categorie, base_stream_name)
|
||||
channels = [
|
||||
# TVR
|
||||
("1", "TVR 1 HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/TVR1.png", "Generaliste", "tvr1"),
|
||||
("2", "TVR 2", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/TVR2.png", "Generaliste", "tvr2"),
|
||||
("3", "TVR 3", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/TVR3.png", "Generaliste", "tvr3"),
|
||||
|
||||
# Generaliste
|
||||
("10", "Antena 1 HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/Antena1.png", "Generaliste", "antena1"),
|
||||
("11", "PRO TV HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/ProTV.png", "Generaliste", "protv"),
|
||||
("12", "Kanal D", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/KanalD.png", "Generaliste", "kanald"),
|
||||
("13", "Prima TV", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/PrimaTV.png", "Generaliste", "primatv"),
|
||||
|
||||
# Știri
|
||||
("20", "Digi 24", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/Digi24.png", "Stiri", "digi24"),
|
||||
("21", "Antena 3 CNN", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/Antena3.png", "Stiri", "antena3"),
|
||||
("22", "B1 TV", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/B1.png", "Stiri", "b1tv"),
|
||||
|
||||
# Sport
|
||||
("30", "Digi Sport 1 HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/DigiSport1.png", "Sport", "digisport1"),
|
||||
("31", "Digi Sport 2 HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/DigiSport2.png", "Sport", "digisport2"),
|
||||
("32", "Digi Sport 3 HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/DigiSport3.png", "Sport", "digisport3"),
|
||||
("33", "Digi Sport 4 HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/DigiSport4.png", "Sport", "digisport4"),
|
||||
("34", "Eurosport 1 HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/Eurosport1.png", "Sport", "eurosport1"),
|
||||
("35", "Eurosport 2 HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/Eurosport2.png", "Sport", "eurosport2"),
|
||||
|
||||
# Documentare
|
||||
("50", "Discovery Channel HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/DiscoveryChannel.png", "Documentare", "discovery"),
|
||||
("51", "History HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/HistoryChannel.png", "Documentare", "history"),
|
||||
("52", "National Geographic HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/NatGeographic.png", "Documentare", "natgeo"),
|
||||
("53", "Nat Geo Wild HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/NatGeoWild.png", "Documentare", "natgeowild"),
|
||||
("54", "Digi World HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/DigiWorld.png", "Documentare", "digiworld"),
|
||||
("55", "Digi Animal World HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/DigiAnimalWorld.png", "Documentare", "digianimalworld"),
|
||||
|
||||
# Filme
|
||||
("60", "AXN HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/AXN.png", "Filme", "axn"),
|
||||
("61", "AXN Black HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/AXN_Black.png", "Filme", "axnblack"),
|
||||
("62", "AXN White HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/AXN_White.png", "Filme", "axnwhite"),
|
||||
("63", "Film Now HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/FilmNow.png", "Filme", "filmnow"),
|
||||
("64", "Digi Film HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/DigiFilm.png", "Filme", "digifilm"),
|
||||
("65", "TNT", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/TNT.png", "Filme", "tnt"),
|
||||
("66", "Paramount Network", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/ParamountNetwork.png", "Filme", "paramount"),
|
||||
("67", "Comedy Central", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/ComedyCentral.png", "Filme", "comedycentral"),
|
||||
|
||||
# Lifestyle
|
||||
("70", "DIVA", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/Diva.png", "Lifestyle", "diva"),
|
||||
("71", "Digi Life HD", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/DigiLife.png", "Lifestyle", "digilife"),
|
||||
("72", "TLC", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/TLC.png", "Lifestyle", "tlc"),
|
||||
("73", "Food Network", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/FoodNetwork.png", "Lifestyle", "foodnetwork"),
|
||||
("103", "HGTV", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/HGTV.png", "Lifestyle", "hgtv"),
|
||||
|
||||
# Copii
|
||||
("80", "Minimax", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/Minimax.png", "Copii", "minimax"),
|
||||
("81", "Cartoon Network", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/CartoonNetwork.png", "Copii", "cartoonnetwork"),
|
||||
("82", "Nickelodeon", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/Nickelodeon.png", "Copii", "nickelodeon"),
|
||||
("83", "Disney Channel", "https://raw.githubusercontent.com/staycanuca/plugin.video.digi-online/master/resources/media/DisneyChannel.png", "Copii", "disney"),
|
||||
]
|
||||
|
||||
output_file = "digi_dash_authenticated.m3u"
|
||||
|
||||
print("=" * 70)
|
||||
print("🎬 DIGI ONLINE - DASH PLAYLIST GENERATOR")
|
||||
print("=" * 70)
|
||||
print()
|
||||
print("📝 Generare playlist DASH pentru Jellyfin/Kodi...")
|
||||
print(f"📺 Total canale: {len(channels)}")
|
||||
print()
|
||||
|
||||
try:
|
||||
with open(output_file, 'w', encoding='utf-8') as f:
|
||||
# Header M3U
|
||||
f.write("#EXTM3U\n\n")
|
||||
f.write("# ========================================\n")
|
||||
f.write("# PLAYLIST DIGI ONLINE - DASH (MPD)\n")
|
||||
f.write(f"# Generat: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n")
|
||||
f.write(f"# Canale: {len(channels)}\n")
|
||||
f.write("# Format: DASH (manifest.mpd)\n")
|
||||
f.write("# Compatibil cu: Jellyfin, Kodi, VLC\n")
|
||||
f.write("# ========================================\n\n")
|
||||
f.write("# NOTĂ: Aceste URL-uri necesită autentificare DIGI Online\n")
|
||||
f.write("# Pentru a funcționa, trebuie să fii autentificat în browser\n")
|
||||
f.write("# sau să folosești cookies-urile de autentificare\n\n")
|
||||
|
||||
# Procesează fiecare canal
|
||||
for channel_id, name, logo, category, stream_name in channels:
|
||||
# Construiește URL-ul manifest DASH
|
||||
# Format observat: https://edge-ar.rcs-rds.ro/{id}/{stream_name}/manifest.mpd
|
||||
manifest_url = f"{base_url}/{channel_id}/{stream_name}/manifest.mpd"
|
||||
|
||||
# Scrie în playlist
|
||||
f.write(f'#EXTINF:-1 tvg-id="{channel_id}" tvg-name="{name}" ')
|
||||
f.write(f'tvg-logo="{logo}" group-title="{category}",{name}\n')
|
||||
f.write(f'{manifest_url}\n\n')
|
||||
|
||||
print(f" ✅ {name}")
|
||||
|
||||
# Footer
|
||||
f.write("# ========================================\n")
|
||||
f.write(f"# Total canale: {len(channels)}\n")
|
||||
f.write("# ========================================\n")
|
||||
f.write("# \n")
|
||||
f.write("# IMPORTANT:\n")
|
||||
f.write("# - Stream-urile sunt protejate cu DRM (Widevine)\n")
|
||||
f.write("# - Necesită player compatibil cu DASH și DRM\n")
|
||||
f.write("# - Jellyfin și Kodi suportă DASH cu DRM\n")
|
||||
f.write("# - VLC poate avea probleme cu DRM\n")
|
||||
f.write("# \n")
|
||||
f.write("# Pentru Jellyfin:\n")
|
||||
f.write("# 1. Dashboard → Live TV → Tuner Devices → Add → M3U Tuner\n")
|
||||
f.write("# 2. File or URL: C:\\Users\\EDD\\Desktop\\IPTV\\digi_dash_authenticated.m3u\n")
|
||||
f.write("# 3. Save\n")
|
||||
f.write("# \n")
|
||||
f.write("# ========================================\n")
|
||||
|
||||
print()
|
||||
print("=" * 70)
|
||||
print("🎉 SUCCES!")
|
||||
print("=" * 70)
|
||||
print(f"\n📁 Playlist generat: {output_file}")
|
||||
print(f"📺 Canale incluse: {len(channels)}")
|
||||
print()
|
||||
print("⚠️ IMPORTANT:")
|
||||
print(" - Stream-urile folosesc DASH (manifest.mpd)")
|
||||
print(" - Sunt protejate cu DRM (Widevine)")
|
||||
print(" - Necesită autentificare DIGI Online")
|
||||
print()
|
||||
print("✅ Compatibil cu:")
|
||||
print(" - Jellyfin (recomandat)")
|
||||
print(" - Kodi cu plugin-uri DRM")
|
||||
print(" - VLC (suport limitat pentru DRM)")
|
||||
print()
|
||||
print("📋 Următorii pași:")
|
||||
print(" 1. Deschide Jellyfin")
|
||||
print(" 2. Dashboard → Live TV → Add M3U Tuner")
|
||||
print(f" 3. Path: C:\\Users\\EDD\\Desktop\\IPTV\\{output_file}")
|
||||
print(" 4. Testează canalele")
|
||||
print()
|
||||
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
print(f"❌ Eroare la generare playlist: {e}")
|
||||
return False
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
if generate_digi_dash_playlist():
|
||||
sys.exit(0)
|
||||
else:
|
||||
sys.exit(1)
|
||||
except KeyboardInterrupt:
|
||||
print("\n\n⚠️ Întrerupt de utilizator!")
|
||||
sys.exit(0)
|
||||
except Exception as e:
|
||||
print(f"\n❌ Eroare neașteptată: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user