mirror of
https://github.com/iptv-org/iptv
synced 2026-09-06 20:11:55 -04:00
Merge branch 'master' into patch-2026.09.1
Resolved conflict in scripts/models/stream.ts: kept the branch's labels/isNot247/isGeoBlocked handling in fromPlaylistItem while adopting master's optional-chaining guards for data.tvg / data.http.
This commit is contained in:
+11
-2
@@ -39,9 +39,18 @@ export function isURI(string: string): boolean {
|
||||
}
|
||||
|
||||
export function normalizeURL(url: string): string {
|
||||
const normalized = normalizeUrl(url, { stripWWW: false })
|
||||
let normalized: string
|
||||
try {
|
||||
normalized = normalizeUrl(url, { stripWWW: false })
|
||||
} catch {
|
||||
return url.replace(/\s/g, '+')
|
||||
}
|
||||
|
||||
return decodeURIComponent(normalized).replace(/\s/g, '+').toString()
|
||||
try {
|
||||
return decodeURIComponent(normalized).replace(/\s/g, '+')
|
||||
} catch {
|
||||
return normalized.replace(/\s/g, '+')
|
||||
}
|
||||
}
|
||||
|
||||
export function truncate(string: string, limit: number = 100) {
|
||||
|
||||
Reference in New Issue
Block a user