FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Added functionality to export a single playlist

Open Zeabyte opened this issue 2 years ago • 2 comments

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: image

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.

Zeabyte avatar Oct 01 '24 16:10 Zeabyte

@efb4f5ff-1298-471a-8973-3d47447115dc @absidue 👋

PikachuEXE avatar Oct 10 '24 00:10 PikachuEXE

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

PikachuEXE avatar Oct 12 '24 08:10 PikachuEXE

I also see export button on online playlist (which does nothing) Let me recheck later...

PikachuEXE avatar Oct 27 '24 00:10 PikachuEXE

@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

PikachuEXE avatar Nov 04 '24 01:11 PikachuEXE