mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 11:06:16 -08:00
feat(xtream): use protocol, host, port, ignore params for serverUrl
This commit is contained in:
1 parent
789bf461e5
commit
41a187c6ba
1 file changed
+9
-1
@@ -62,8 +62,16 @@ export class XtreamCodeImportComponent {
|
||||
store = inject(Store);
|
||||
|
||||
addPlaylist() {
|
||||
const serverUrlAsString = this.form.value.serverUrl as string;
|
||||
const url = new URL(serverUrlAsString);
|
||||
const serverUrl = `${url.protocol}//${url.hostname}${url.port ? ':' + url.port : ''}`;
|
||||
this.store.dispatch(
|
||||
addPlaylist({ playlist: this.form.value as Playlist })
|
||||
addPlaylist({
|
||||
playlist: {
|
||||
...this.form.value,
|
||||
serverUrl,
|
||||
} as Playlist,
|
||||
})
|
||||
);
|
||||
this.addClicked.emit();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user