Added functionality to export a single playlist
Single Playlist Export
Pull Request Type
- [ ] Bugfix
- [x] Feature Implementation
- [ ] Documentation
- [ ] Other
Related issue
related to #5366
Description
This PR adds a button "Export Playlist" to the playlist-info component, that when clicked exports a single playlist with the file name "freetube-playlist-{playlistName}-{date}.db".
Screenshots
After:
Testing
I have tested this and found no problems. However, the UX is not perfect because this is only exporting. Importing currently requires going to data settings and there is no "Do you wish to overwrite the playlist" or "... add the videos to the local playlist" with the same name.
Desktop
- OS: Fedora Workstation
- OS Version: 40
- FreeTube version: latest from development
Additional context
One could further abstract the way files are saved to disk. I have copied it from data-settings.js.
I have reused the locale token Settings.Data Settings.Unable to write file.
@efb4f5ff-1298-471a-8973-3d47447115dc @absidue 👋
I know we dont have a "Import one Playlist button" but now we provide a way to export one playlist. So doesnt that automatically mean that the user can also import one playlist?
I think so
I also see export button on online playlist (which does nothing) Let me recheck later...
@ChunkyProgrammer Though I can approve it but if you have time I rather have you take a look :) Or I will just (partially self-)approve tomorrow