Merge pull request #12 from PiratesIRC/claude/add-github-version-checker-011CV1F3iesvv3HC5qVfsYLn

Claude/add GitHub version checker 011 cv1 f3iesvv3 hc5q vfs y ln
This commit is contained in:
Pirates IRC
2025-11-10 19:46:58 -06:00
committed by GitHub
10 changed files with 1833 additions and 1 deletions

46
.gitignore vendored Normal file
View File

@@ -0,0 +1,46 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# Virtual environments
venv/
ENV/
env/
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# Testing
.pytest_cache/
.coverage
htmlcov/
# Data files (cache)
/data/
*.log

View File

@@ -0,0 +1,257 @@
{
"country_code": "AU",
"country_name": "Australia",
"version": "2025-11-10",
"channels": [
{
"channel_name": "ABC TV",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ABC",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ABC TV Plus",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ABC Family",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ABC Kids",
"category": "Kids",
"type": "National"
},
{
"channel_name": "ABC Entertains",
"category": "Kids",
"type": "National"
},
{
"channel_name": "ABC Me",
"category": "Kids",
"type": "National"
},
{
"channel_name": "ABC News",
"category": "News",
"type": "National"
},
{
"channel_name": "SBS",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "SBS One",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "SBS Viceland",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "SBS World Movies",
"category": "Movies",
"type": "National"
},
{
"channel_name": "SBS Food",
"category": "Lifestyle",
"type": "National"
},
{
"channel_name": "NITV",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "SBS WorldWatch",
"category": "News",
"type": "National"
},
{
"channel_name": "Seven",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "7",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "7 Sydney",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "7 Melbourne",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "7two",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "7mate",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "7flix",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "7Bravo",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Nine",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "9",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "9 Sydney",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "9 Melbourne",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "9Gem",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "9Go!",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "9Life",
"category": "Lifestyle",
"type": "National"
},
{
"channel_name": "9Rush",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "10",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Network 10",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "10 Peach",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "10 Bold",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "10 Shake",
"category": "Kids",
"type": "National"
},
{
"channel_name": "Fox Sports",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Fox Sports News",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Fox Cricket",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Fox League",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Fox Footy",
"category": "Sports",
"type": "National"
},
{
"channel_name": "ESPN",
"category": "Sports",
"type": "National"
},
{
"channel_name": "beIN Sports",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Sky News Australia",
"category": "News",
"type": "National"
},
{
"channel_name": "Racing.com",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Lifestyle",
"category": "Lifestyle",
"type": "National"
},
{
"channel_name": "Arena",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Discovery",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "History",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "BBC Earth",
"category": "Documentary",
"type": "National"
}
]
}

View File

@@ -0,0 +1,242 @@
{
"country_code": "BR",
"country_name": "Brazil",
"version": "2025-11-10",
"channels": [
{
"channel_name": "Globo",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "TV Globo",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Record",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "RecordTV",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "SBT",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Band",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Rede Bandeirantes",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "RedeTV!",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "TV Cultura",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "TV Brasil",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "GloboNews",
"category": "News",
"type": "National"
},
{
"channel_name": "CNN Brasil",
"category": "News",
"type": "National"
},
{
"channel_name": "Record News",
"category": "News",
"type": "National"
},
{
"channel_name": "BandNews TV",
"category": "News",
"type": "National"
},
{
"channel_name": "Jovem Pan News",
"category": "News",
"type": "National"
},
{
"channel_name": "SporTV",
"category": "Sports",
"type": "National"
},
{
"channel_name": "SporTV 2",
"category": "Sports",
"type": "National"
},
{
"channel_name": "SporTV 3",
"category": "Sports",
"type": "National"
},
{
"channel_name": "ESPN",
"category": "Sports",
"type": "National"
},
{
"channel_name": "ESPN 2",
"category": "Sports",
"type": "National"
},
{
"channel_name": "ESPN 3",
"category": "Sports",
"type": "National"
},
{
"channel_name": "ESPN 4",
"category": "Sports",
"type": "National"
},
{
"channel_name": "BandSports",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Premiere",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Combate",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Multishow",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "GNT",
"category": "Lifestyle",
"type": "National"
},
{
"channel_name": "Viva",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Canal Brasil",
"category": "Movies",
"type": "National"
},
{
"channel_name": "Futura",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Telecine Premium",
"category": "Movies",
"type": "National"
},
{
"channel_name": "Telecine Action",
"category": "Movies",
"type": "National"
},
{
"channel_name": "Telecine Pipoca",
"category": "Movies",
"type": "National"
},
{
"channel_name": "Telecine Fun",
"category": "Movies",
"type": "National"
},
{
"channel_name": "Telecine Cult",
"category": "Movies",
"type": "National"
},
{
"channel_name": "Gloob",
"category": "Kids",
"type": "National"
},
{
"channel_name": "Gloobinho",
"category": "Kids",
"type": "National"
},
{
"channel_name": "Cartoon Network",
"category": "Kids",
"type": "National"
},
{
"channel_name": "Discovery Kids",
"category": "Kids",
"type": "National"
},
{
"channel_name": "Nickelodeon",
"category": "Kids",
"type": "National"
},
{
"channel_name": "Nick Jr.",
"category": "Kids",
"type": "National"
},
{
"channel_name": "Disney Channel",
"category": "Kids",
"type": "National"
},
{
"channel_name": "Discovery Channel",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "National Geographic",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "History",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Arte 1",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Terra Viva",
"category": "Lifestyle",
"type": "National"
}
]
}

View File

@@ -0,0 +1,252 @@
{
"country_code": "DE",
"country_name": "Germany",
"version": "2025-11-10",
"channels": [
{
"channel_name": "Das Erste",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ARD",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ZDF",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Arte",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "3sat",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "KiKA",
"category": "Kids",
"type": "National"
},
{
"channel_name": "Phoenix",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Tagesschau24",
"category": "News",
"type": "National"
},
{
"channel_name": "One",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ZDFneo",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ZDFinfo",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "BR Fernsehen",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "hr-fernsehen",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "MDR Fernsehen",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "NDR Fernsehen",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "Radio Bremen TV",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "rbb Fernsehen",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "SR Fernsehen",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "SWR Fernsehen",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "WDR Fernsehen",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "RTL",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "RTL Zwei",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "RTLZWEI",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Vox",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Super RTL",
"category": "Kids",
"type": "National"
},
{
"channel_name": "n-tv",
"category": "News",
"type": "National"
},
{
"channel_name": "Nitro",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "RTLup",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "VOXup",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ProSieben",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Sat.1",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Kabel Eins",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Sixx",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ProSieben Maxx",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Sat.1 Gold",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Kabel Eins Doku",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Welt",
"category": "News",
"type": "National"
},
{
"channel_name": "N24",
"category": "News",
"type": "National"
},
{
"channel_name": "Sport1",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Eurosport 1",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Sky Bundesliga",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Sky Sport DE",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Disney Channel",
"category": "Kids",
"type": "National"
},
{
"channel_name": "Comedy Central",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "DMAX",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "TLC",
"category": "Lifestyle",
"type": "National"
},
{
"channel_name": "Tele 5",
"category": "Movies",
"type": "National"
},
{
"channel_name": "Servus TV",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Deluxe Music",
"category": "Music",
"type": "National"
}
]
}

View File

@@ -0,0 +1,187 @@
{
"country_code": "ES",
"country_name": "Spain",
"version": "2025-11-10",
"channels": [
{
"channel_name": "La 1",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "TVE La 1",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "La 2",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "TVE La 2",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "24h",
"category": "News",
"type": "National"
},
{
"channel_name": "TVE 24h",
"category": "News",
"type": "National"
},
{
"channel_name": "Teledeporte",
"category": "Sports",
"type": "National"
},
{
"channel_name": "TDP",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Clan",
"category": "Kids",
"type": "National"
},
{
"channel_name": "Antena 3",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "laSexta",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Neox",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Nova",
"category": "Lifestyle",
"type": "National"
},
{
"channel_name": "Mega",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Atreseries",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Telecinco",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Cuatro",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "FDF",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Boing",
"category": "Kids",
"type": "National"
},
{
"channel_name": "Divinity",
"category": "Lifestyle",
"type": "National"
},
{
"channel_name": "Energy",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Be Mad",
"category": "Movies",
"type": "National"
},
{
"channel_name": "DMAX",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Paramount Network",
"category": "Movies",
"type": "National"
},
{
"channel_name": "Trece",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Real Madrid TV",
"category": "Sports",
"type": "National"
},
{
"channel_name": "TV3",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "Canal Sur",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "ETB 1",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "ETB 2",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "TVG",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "Telemadrid",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "Movistar LaLiga",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Movistar Liga de Campeones",
"category": "Sports",
"type": "National"
},
{
"channel_name": "DAZN LaLiga",
"category": "Sports",
"type": "National"
},
{
"channel_name": "DAZN 1",
"category": "Sports",
"type": "National"
}
]
}

View File

@@ -0,0 +1,202 @@
{
"country_code": "FR",
"country_name": "France",
"version": "2025-11-10",
"channels": [
{
"channel_name": "TF1",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "France 2",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "France 3",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "France 3 Paris",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "France 3 Lyon",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "Canal+",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "France 5",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "M6",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Arte",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "C8",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "W9",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "TMC",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "TFX",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "NRJ 12",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "LCP",
"category": "News",
"type": "National"
},
{
"channel_name": "France 4",
"category": "Kids",
"type": "National"
},
{
"channel_name": "BFMTV",
"category": "News",
"type": "National"
},
{
"channel_name": "CNews",
"category": "News",
"type": "National"
},
{
"channel_name": "CStar",
"category": "Music",
"type": "National"
},
{
"channel_name": "Gulli",
"category": "Kids",
"type": "National"
},
{
"channel_name": "TF1 Séries Films",
"category": "Movies",
"type": "National"
},
{
"channel_name": "L'Équipe",
"category": "Sports",
"type": "National"
},
{
"channel_name": "6ter",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "RMC Story",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "RMC Découverte",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Chérie 25",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "LCI",
"category": "News",
"type": "National"
},
{
"channel_name": "Franceinfo",
"category": "News",
"type": "National"
},
{
"channel_name": "France 24",
"category": "News",
"type": "National"
},
{
"channel_name": "Euronews",
"category": "News",
"type": "National"
},
{
"channel_name": "Canal+ Sport",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Canal+ Cinéma",
"category": "Movies",
"type": "National"
},
{
"channel_name": "beIN Sports 1",
"category": "Sports",
"type": "National"
},
{
"channel_name": "beIN Sports 2",
"category": "Sports",
"type": "National"
},
{
"channel_name": "RMC Sport 1",
"category": "Sports",
"type": "National"
},
{
"channel_name": "RMC Sport 2",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Eurosport 1",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Eurosport 2",
"category": "Sports",
"type": "National"
},
{
"channel_name": "TV5 Monde",
"category": "Entertainment",
"type": "National"
}
]
}

View File

@@ -0,0 +1,132 @@
{
"country_code": "MX",
"country_name": "Mexico",
"version": "2025-11-10",
"channels": [
{
"channel_name": "Las Estrellas",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Canal 5",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Nueve",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Nu9ve",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "N+ Foro",
"category": "News",
"type": "National"
},
{
"channel_name": "Foro TV",
"category": "News",
"type": "National"
},
{
"channel_name": "TUDN",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Azteca Uno",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Azteca 7",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ADN 40",
"category": "News",
"type": "National"
},
{
"channel_name": "adn Noticias",
"category": "News",
"type": "National"
},
{
"channel_name": "a+",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "A Más",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "Imagen Televisión",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Excélsior TV",
"category": "News",
"type": "National"
},
{
"channel_name": "Canal Once",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Canal 22",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Canal Catorce",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "TV UNAM",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Canal del Congreso",
"category": "News",
"type": "National"
},
{
"channel_name": "Canal 6",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "Multimedios",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "Distrito Comedia",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Tlnovelas",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "De Película",
"category": "Movies",
"type": "National"
}
]
}

View File

@@ -0,0 +1,347 @@
{
"country_code": "UK",
"country_name": "United Kingdom",
"version": "2025-11-10",
"channels": [
{
"channel_name": "BBC One",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "BBC1",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "BBC One London",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "BBC One Scotland",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "BBC One Wales",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "BBC One NI",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "BBC Two",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "BBC2",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "BBC Three",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "BBC3",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "BBC Four",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "BBC4",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "CBBC",
"category": "Kids",
"type": "National"
},
{
"channel_name": "CBeebies",
"category": "Kids",
"type": "National"
},
{
"channel_name": "BBC News",
"category": "News",
"type": "National"
},
{
"channel_name": "BBC Parliament",
"category": "News",
"type": "National"
},
{
"channel_name": "BBC Alba",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "S4C",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "ITV",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ITV1",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ITV1 London",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "ITV1 Granada",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "ITV1 Wales",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "STV",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "UTV",
"category": "Entertainment",
"type": "Regional"
},
{
"channel_name": "ITV2",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ITV3",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ITV4",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "ITVBe",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Channel 4",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "E4",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "More4",
"category": "Lifestyle",
"type": "National"
},
{
"channel_name": "Film4",
"category": "Movies",
"type": "National"
},
{
"channel_name": "4seven",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Channel 5",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "5STAR",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "5USA",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "5Action",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "5Select",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Sky Showcase",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Sky Max",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Sky Atlantic",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Sky Witness",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Sky Comedy",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Sky Documentaries",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Sky History",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Sky Nature",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Sky Arts",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Sky News",
"category": "News",
"type": "National"
},
{
"channel_name": "Sky Sports Main Event",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Sky Sports Premier League",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Sky Sports Football",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Sky Sports Cricket",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Sky Sports F1",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Sky Sports Golf",
"category": "Sports",
"type": "National"
},
{
"channel_name": "TNT Sports 1",
"category": "Sports",
"type": "National"
},
{
"channel_name": "TNT Sports 2",
"category": "Sports",
"type": "National"
},
{
"channel_name": "TNT Sports 3",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Eurosport 1",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Eurosport 2",
"category": "Sports",
"type": "National"
},
{
"channel_name": "Dave",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Gold",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "W",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Alibi",
"category": "Entertainment",
"type": "National"
},
{
"channel_name": "Yesterday",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "Eden",
"category": "Documentary",
"type": "National"
},
{
"channel_name": "GB News",
"category": "News",
"type": "National"
},
{
"channel_name": "Talk",
"category": "News",
"type": "National"
}
]
}

View File

@@ -9,7 +9,9 @@ import csv
import os import os
import re import re
import requests import requests
from datetime import datetime import urllib.request
import urllib.error
from datetime import datetime, timedelta
from django.utils import timezone from django.utils import timezone
# Django model imports # Django model imports
@@ -37,8 +39,20 @@ class Plugin:
@property @property
def fields(self): def fields(self):
"""Dynamically generate settings fields including channel database selection.""" """Dynamically generate settings fields including channel database selection."""
# Check for version updates (with caching)
version_info = {'message': f"Current version: {self.version}", 'status': 'unknown'}
try:
version_info = self._check_version_update()
except Exception as e:
LOGGER.debug(f"[Stream-Mapparr] Error checking version update: {e}")
# Static fields that are always present # Static fields that are always present
static_fields = [ static_fields = [
{
"id": "version_status",
"type": "info",
"label": version_info['message'],
},
{ {
"id": "overwrite_streams", "id": "overwrite_streams",
"label": "🔄 Overwrite Existing Streams", "label": "🔄 Overwrite Existing Streams",
@@ -240,6 +254,7 @@ class Plugin:
def __init__(self): def __init__(self):
self.processed_data_file = "/data/stream_mapparr_processed.json" self.processed_data_file = "/data/stream_mapparr_processed.json"
self.version_check_cache_file = "/data/stream_mapparr_version_check.json"
self.loaded_channels = [] self.loaded_channels = []
self.loaded_streams = [] self.loaded_streams = []
self.channel_stream_matches = [] self.channel_stream_matches = []
@@ -247,6 +262,158 @@ class Plugin:
LOGGER.info(f"[Stream-Mapparr] {self.name} Plugin v{self.version} initialized") LOGGER.info(f"[Stream-Mapparr] {self.name} Plugin v{self.version} initialized")
def _get_latest_version(self, owner, repo):
"""
Fetches the latest release tag name from GitHub using only Python's standard library.
Args:
owner (str): GitHub repository owner
repo (str): GitHub repository name
Returns:
str: Latest version tag or error message
"""
url = f"https://api.github.com/repos/{owner}/{repo}/releases/latest"
# Add a user-agent to avoid potential 403 Forbidden errors
headers = {
'User-Agent': 'Dispatcharr-Plugin-Version-Checker'
}
try:
# Create a request object with headers
req = urllib.request.Request(url, headers=headers)
# Make the request and open the URL with a timeout
with urllib.request.urlopen(req, timeout=5) as response:
# Read the response and decode it as UTF-8
data = response.read().decode('utf-8')
# Parse the JSON string
json_data = json.loads(data)
# Get the tag name
latest_version = json_data.get("tag_name")
if latest_version:
return latest_version
else:
return None
except urllib.error.HTTPError as http_err:
if http_err.code == 404:
LOGGER.debug(f"[Stream-Mapparr] GitHub repo not found or has no releases: {http_err}")
return None
else:
LOGGER.debug(f"[Stream-Mapparr] HTTP error checking version: {http_err.code}")
return None
except Exception as e:
# Catch other errors like timeouts
LOGGER.debug(f"[Stream-Mapparr] Error checking version: {str(e)}")
return None
def _check_version_update(self):
"""
Check if a new version is available on GitHub.
Uses caching to limit checks to once per day or when the plugin version changes.
Returns:
dict: Contains 'message' and 'status' keys for display
"""
current_version = self.version
github_owner = "PiratesIRC"
github_repo = "Stream-Mapparr"
# Default response
result = {
'message': f"Current version: {current_version}",
'status': 'unknown'
}
try:
# Load cache if it exists
cache_data = {}
should_check = True
if os.path.exists(self.version_check_cache_file):
try:
with open(self.version_check_cache_file, 'r', encoding='utf-8') as f:
cache_data = json.load(f)
# Check if we need to recheck:
# 1. Plugin version changed (upgrade/downgrade)
# 2. More than 24 hours since last check
cached_plugin_version = cache_data.get('plugin_version')
last_check_str = cache_data.get('last_check')
if cached_plugin_version == current_version and last_check_str:
# Parse the last check time
last_check = datetime.fromisoformat(last_check_str)
time_diff = datetime.now() - last_check
# If less than 24 hours, use cached data
if time_diff < timedelta(hours=24):
should_check = False
latest_version = cache_data.get('latest_version')
# Compare versions
if latest_version and latest_version != current_version:
result = {
'message': f"🎉 Update available! Current: {current_version} → Latest: {latest_version}",
'status': 'update_available'
}
else:
result = {
'message': f"✅ You are up to date (v{current_version})",
'status': 'up_to_date'
}
except Exception as e:
LOGGER.debug(f"[Stream-Mapparr] Error reading version cache: {e}")
should_check = True
# Perform the check if needed
if should_check:
latest_version = self._get_latest_version(github_owner, github_repo)
# Update cache
cache_data = {
'plugin_version': current_version,
'latest_version': latest_version,
'last_check': datetime.now().isoformat()
}
try:
with open(self.version_check_cache_file, 'w', encoding='utf-8') as f:
json.dump(cache_data, f, indent=2)
except Exception as e:
LOGGER.debug(f"[Stream-Mapparr] Error writing version cache: {e}")
# Compare versions
if latest_version and latest_version != current_version:
result = {
'message': f"🎉 Update available! Current: {current_version} → Latest: {latest_version}",
'status': 'update_available'
}
elif latest_version:
result = {
'message': f"✅ You are up to date (v{current_version})",
'status': 'up_to_date'
}
else:
result = {
'message': f"Current version: {current_version} (unable to check for updates)",
'status': 'error'
}
except Exception as e:
LOGGER.debug(f"[Stream-Mapparr] Error in version check: {e}")
result = {
'message': f"Current version: {current_version} (update check failed)",
'status': 'error'
}
return result
def _get_channel_databases(self): def _get_channel_databases(self):
""" """
Scan for channel database files and return metadata for each. Scan for channel database files and return metadata for each.