mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 11:06:16 -08:00
feat: enhance playlist management by adding optional title input and updating URL submission logic
This commit is contained in:
1 parent
5fdd999c7e
commit
76e4e1b032
12 files changed
+424
-122
No files matched your search
@@ -185,6 +185,8 @@ export class PwaService extends DataService {
|
||||
* @param payload playlist payload
|
||||
*/
|
||||
fetchFromUrl(payload: Partial<Playlist>): void {
|
||||
const title = payload.title?.trim() || undefined;
|
||||
|
||||
this.getPlaylistFromUrl(payload.url)
|
||||
.pipe(
|
||||
catchError((error) => {
|
||||
@@ -199,10 +201,18 @@ export class PwaService extends DataService {
|
||||
})
|
||||
)
|
||||
.subscribe((response: Playlist) => {
|
||||
const playlist = title
|
||||
? {
|
||||
...response,
|
||||
filename: title,
|
||||
title,
|
||||
}
|
||||
: response;
|
||||
|
||||
this.store.dispatch(
|
||||
PlaylistActions.handleAddingPlaylistByUrl({
|
||||
isTemporary: !!payload?.isTemporary,
|
||||
playlist: response,
|
||||
playlist,
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user