fix: keep the main feed when a streams:edit request gives only the channel ID

The edit template accepts a Stream ID made of the channel ID alone. In that
case updateWithIssue set the feed to undefined and updateTvgId wrote
tvg-id="<channel_id>" with no feed. playlist:generate only keeps streams
with an explicit feed, so the edited stream silently dropped out of
index.m3u and every grouped playlist until someone ran playlist:format.
This happened for #59575 (ATM Rozrywka REWORK) and earlier for Qazaqstan HD.

Fill in the channel's main feed, the same feed the SDK's getId() and the
add path already resolve to.
This commit is contained in:
Leo Camus
2026-11-23 04:28:55 +00:00
parent 7abc814071
commit f40752a04e
5 changed files with 27 additions and 3 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ export class Stream extends sdk.Models.Stream {
if (channelId) {
this.channel = channelId
this.feed = feedId
this.feed = feedId || this.getChannel()?.getMainFeed()?.id || null
this.updateTvgId().updateTitle().updateFilepath()
}
}