mirror of
https://github.com/iptv-org/iptv
synced 2026-09-06 03:50:47 -04:00
fix: correct Live 24/7 handling and label regressions
- stream.updateWithIssue: 'Live 24/7: Yes' meant the stream IS 24/7, but it was assigned straight to isNot247, inverting the label. A 'No' answer was also ignored because the guard skipped falsy values. - dataSet.getBoolean: an unanswered dropdown is stored as '' by parseIssueBody, which getBoolean read as false. Treat it as undefined so 'no answer' means 'leave unchanged' instead of 'Not 24/7'. - update.addStream: has() is true for an unanswered field, so it produced isNot247 = true for issues that left the dropdown blank. - generate: sortBy got five orders for four iteratees. - 2_streams_edit.yml: restore the '~' reset option dropped from the quality dropdown when the Label field was removed. - stream.getLabels: use const to satisfy prefer-const.
This commit is contained in:
@@ -53,8 +53,8 @@ export class Stream extends sdk.Models.Stream {
|
||||
const live247 = dataSet.getBoolean('live_247')
|
||||
const geoBlocked = dataSet.getBoolean('geo_blocked')
|
||||
|
||||
if (live247) this.isNot247 = live247
|
||||
if (geoBlocked) this.isGeoBlocked = geoBlocked
|
||||
if (live247 !== undefined) this.isNot247 = !live247
|
||||
if (geoBlocked !== undefined) this.isGeoBlocked = geoBlocked
|
||||
|
||||
const quality = dataSet.isDeleted('quality') ? '' : dataSet.getString('quality')
|
||||
const httpUserAgent = dataSet.isDeleted('http_user_agent')
|
||||
@@ -435,7 +435,7 @@ export class Stream extends sdk.Models.Stream {
|
||||
}
|
||||
|
||||
getLabels(): string[] {
|
||||
let labels: string[] = []
|
||||
const labels: string[] = []
|
||||
if (this.isNot247 === true) {
|
||||
labels.push('Not 24/7')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user