Merge pull request #59208 from anlar/fix/logo-in-use

fix: prefer active logos over not in use
This commit is contained in:
Aleksandr Statciuk
2026-11-19 22:52:04 +03:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -403,10 +403,13 @@ export class Stream extends sdk.Models.Stream {
}
getLogos(): Collection<sdk.Models.Logo> {
const logos = super.getLogos()
let logos = super.getLogos()
if (logos.isEmpty()) return new Collection()
const logosInUse = logos.filter((logo: sdk.Models.Logo) => logo.in_use)
if (logosInUse.isNotEmpty()) logos = logosInUse
function format(logo: sdk.Models.Logo): number {
const levelByFormat = { SVG: 0, PNG: 3, APNG: 1, WebP: 1, AVIF: 1, JPEG: 2, GIF: 1 }
+1
View File
@@ -5,6 +5,7 @@
{"channel":"BBCNews.uk","feed":null,"tags":[],"width":512,"height":512,"format":"PNG","url":"https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png"},
{"channel":"DunaWorld.hu","feed":null,"tags":[],"width":512,"height":512,"format":"PNG","url":"https://i.imgur.com/uOBQJZS.png"},
{"channel":"VisitXTV.nl","feed":null,"tags":[],"width":512,"height":512,"format":"JPEG","url":"https://i.imgur.com/RJ9wbNF.jpg"},
{"channel":"AndorraTV.ad","feed":null,"in_use":false,"tags":[],"width":512,"height":512,"format":"PNG","url":"https://i.imgur.com/DnhTn8i.png"},
{"channel":"AndorraTV.ad","feed":"SD","tags":[],"width":512,"height":512,"format":"PNG","url":"https://i.imgur.com/BnhTn8i.png"},
{"channel":"AndorraTV.ad","feed":null,"tags":[],"width":1000,"height":1000,"format":"JPEG","url":"https://i.imgur.com/AnhTn8i.png"},
{"channel":"AndorraTV.ad","feed":null,"tags":[],"width":512,"height":512,"format":"PNG","url":"https://i.imgur.com/CnhTn8i.png"},