mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-14 05:06:16 -08:00
feat: export playlist as m3u
This commit is contained in:
1 parent
ba41c8dae5
commit
7e4d6b171f
8 files changed
+204
-179
No files matched your search
@@ -7,12 +7,12 @@ import { Channel } from '../../../shared/channel.interface';
|
||||
import { GLOBAL_FAVORITES_PLAYLIST_ID } from '../../../shared/constants';
|
||||
import {
|
||||
Playlist,
|
||||
PlaylistUpdateState,
|
||||
PlaylistUpdateState
|
||||
} from '../../../shared/playlist.interface';
|
||||
import {
|
||||
aggregateFavoriteChannels,
|
||||
createFavoritesPlaylist,
|
||||
createPlaylistObject,
|
||||
createPlaylistObject
|
||||
} from '../../../shared/playlist.utils';
|
||||
import { DbStores } from '../indexed-db.config';
|
||||
import { PlaylistMeta } from '../shared/playlist-meta.type';
|
||||
@@ -191,4 +191,11 @@ export class PlaylistsService {
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
getRawPlaylistById(id: string) {
|
||||
return this.dbService.getByID<Playlist>(DbStores.Playlists, id).pipe(map(playlist => {
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
||||
return playlist.playlist.header.raw + '\n' + playlist.playlist.items.map(item => item.raw).join('\n');
|
||||
}));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user