mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-14 05:06:16 -08:00
feat: implement file dialog for playlist uploads in FileUploadComponent
This commit is contained in:
1 parent
c9a917ef9d
commit
d13fa6fa28
4 files changed
+40
-6
No files matched your search
@@ -6,6 +6,7 @@
|
||||
<app-file-upload
|
||||
(fileRejected)="rejectFile($event)"
|
||||
(fileSelected)="handlePlaylist($event)"
|
||||
(closeDialog)="closeDialog()"
|
||||
/>
|
||||
} @else if (playlistType === 'url') {
|
||||
<app-url-upload (urlAdded)="sendPlaylistsUrl($event)" />
|
||||
|
||||
@@ -54,7 +54,6 @@ export class AddPlaylistDialogComponent {
|
||||
* @param payload
|
||||
*/
|
||||
handlePlaylist(payload: { uploadEvent: Event; file: File }): void {
|
||||
// this.isLoading = true;
|
||||
const playlist = (payload.uploadEvent.target as FileReader)
|
||||
.result as string;
|
||||
|
||||
@@ -75,7 +74,6 @@ export class AddPlaylistDialogComponent {
|
||||
filename,
|
||||
})
|
||||
);
|
||||
// this.isLoading = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,7 +81,6 @@ export class AddPlaylistDialogComponent {
|
||||
* @param playlistUrl url of the added playlist
|
||||
*/
|
||||
sendPlaylistsUrl(playlistUrl: string): void {
|
||||
// this.isLoading = true;
|
||||
this.dataService.sendIpcEvent(PLAYLIST_PARSE_BY_URL, {
|
||||
title: getFilenameFromUrl(playlistUrl),
|
||||
url: playlistUrl,
|
||||
@@ -96,7 +93,6 @@ export class AddPlaylistDialogComponent {
|
||||
* @param text playlist as string
|
||||
*/
|
||||
uploadAsText(playlist: string): void {
|
||||
// this.isLoading = true;
|
||||
this.store.dispatch(
|
||||
parsePlaylist({
|
||||
uploadType: 'TEXT',
|
||||
|
||||
Reference in new issue
Block a user