mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-16 06:06:18 -08:00
fix(stalker): keep edits off Xtream save path
This commit is contained in:
1 parent
37575c8d88
commit
a998b0ebdd
4 files changed
+29
-3
No files matched your search
+23
@@ -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 = {
|
||||
|
||||
+1
-1
@@ -436,7 +436,7 @@ export class PlaylistInfoComponent {
|
||||
}
|
||||
}
|
||||
const isXtream =
|
||||
this.playlist &&
|
||||
!this.playlist.portalUrl &&
|
||||
this.playlist.username &&
|
||||
this.playlist.password &&
|
||||
this.playlist.serverUrl;
|
||||
|
||||
Reference in new issue
Block a user