Skip to content

feat: Import/export playlists as M3U8 files#791

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/extend-playlist-import-export
Draft

feat: Import/export playlists as M3U8 files#791
Copilot wants to merge 2 commits intomainfrom
copilot/extend-playlist-import-export

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 1, 2026

Extends the playlist system with M3U8 import/export, completing the next step after the core save/load/play functionality from #514.

UI Changes

  • PlaylistsPage: "New playlist" ButtonSplitButton; dropdown flyout exposes "Import playlist" action
  • PlaylistsPage context menu: added "Export playlist" item per playlist
  • PlaylistDetailsPage command bar: added "Export playlist" primary AppBarButton

Service Layer

  • IPlaylistService / PlaylistService: new ExportToM3u8Async and ImportFromM3u8Async methods
    • Export writes standard extended M3U8 (#EXTM3U + #EXTINF:duration,title + path per item)
    • Import parses non-comment lines; handles absolute URIs, Windows/Unix absolute paths, and paths relative to the .m3u8 file
  • IFilesService / FilesService: new PickSaveFileAsync wrapping FileSavePicker

ViewModels

  • PlaylistsPageViewModel: added ImportPlaylistCommand (pick file → parse → create playlist) and ExportPlaylistCommand (pick save path → write M3U8). Added IFilesService and MediaViewModelFactory to constructor.
  • PlaylistDetailsPageViewModel: added ExportPlaylistCommand scoped to the current Source playlist; CanExportPlaylist guards against empty playlists and re-evaluates when Source changes via [NotifyCanExecuteChangedFor].

Localization

Added ImportPlaylist and ExportPlaylist entries to en-US/Resources.resw.

Original prompt

Since the core functions of the playlist system are implemented (saving, loading, and playing from a playlist), as done in #514. The next step is to extend the playlist system functionality to allow importing and exporting playlists as m3u8 files. On the PlaylistPage, make the Create playlist button a SplitButton and the drop down option to be Import playlist. The context menu for each playlist on this page should also have an option to export playlist. In the PlaylistDetailsPage, add an Export button in the button panel. Use appropriate icons.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

- Change 'New playlist' button to SplitButton with 'Import playlist' dropdown on PlaylistsPage
- Add 'Export playlist' to context menu on PlaylistsPage
- Add 'Export playlist' AppBarButton to PlaylistDetailsPage button panel
- Add ImportPlaylistCommand and ExportPlaylistCommand to PlaylistsPageViewModel
- Add ExportPlaylistCommand to PlaylistDetailsPageViewModel
- Add ExportToM3u8Async and ImportFromM3u8Async to IPlaylistService/PlaylistService
- Add PickSaveFileAsync to IFilesService/FilesService
- Add ImportPlaylist and ExportPlaylist string resources

Co-authored-by: huynhsontung <31434093+huynhsontung@users.noreply.github.com>
Copilot AI changed the title [WIP] Add import and export functionality for playlists feat: Import/export playlists as M3U8 files Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants