fix(stalker): keep edits off Xtream save path

This commit is contained in:
4gray committed 2026-08-09 18:07:05 +02:00
1 parent 37575c8d88
commit a998b0ebdd
4 files changed
+29 -3

No files matched your search

@@ -832,6 +832,29 @@ describe('PlaylistInfoComponent', () => {
expect(dialogRef.close).toHaveBeenCalledTimes(1);
});
it('does not route a Stalker edit through stale Xtream metadata', async () => {
runtime.supportsXtreamSqliteDataSource = true;
await createStalkerComponent({
serverUrl: 'https://old-xtream.example.com',
username: 'subscriber',
password: 'secret',
});
component.playlistDetails
.get('portalUrl')
?.setValue('https://new.example.com');
await component.saveChanges(
component.playlistDetails.getRawValue() as PlaylistMeta
);
expect(
databaseService.updateXtreamPlaylistDetails
).not.toHaveBeenCalled();
expect(
stalkerConnectionEditor.applyResolvedConnection
).toHaveBeenCalledTimes(1);
});
it('persists a resolved edit when the component is destroyed during discovery', async () => {
await createStalkerComponent();
const resolvedPlaylist = {
@@ -436,7 +436,7 @@ export class PlaylistInfoComponent {
}
}
const isXtream =
this.playlist &&
!this.playlist.portalUrl &&
this.playlist.username &&
this.playlist.password &&
this.playlist.serverUrl;