-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix playlists database import and export not using the actual database format #4664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix playlists database import and export not using the actual database format #4664
Conversation
|
I checked the file for history & the logic at 0.19.1 d21a7f1#diff-3d237cfb3b1c9b7a1d14cc731643319d4e50982c43202b626bc6de4d25376269R1225 So this is a breaking change for all previous FT versions |
|
I'll add back support for the old format in the import, for the sake of backwards compatibility so that you can import both a real FreeTube database and the JSON array format (if you want to export your playlists for 0.19.1 or below you need to enable the backwards compatibility switch before exporting anyway, so the new export doesn't need support for both). |
|
It now supports importing the proper database format and the old array format. The export is only for the proper database format, anyone that wants to export their playlists to 0.19.1 or below or to nightlies before the playlists PR, needs to use the That makes this only a breaking change for the nightlies between this pull request and the playlists pull request, which is completely fine. |
PikachuEXE
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Export: tested both export formats with text editor
Import: tested 3 formats, 2 above, 1 with older format but with json
efb4f5ff-1298-471a-8973-3d47447115dc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a dump q based on the convo im reading but still going to ask it, is this expected?
VirtualBoxVM_lJFemLAl9o.mp4
If you are expecting default generated playlists, they are only generated after app restart (or new window open?) |
efb4f5ff-1298-471a-8973-3d47447115dc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismiss my previous q😬
* development: (28 commits) Fix handling of video published date in video lists (FreeTubeApp#4752) Translated using Weblate (Dutch) Translated using Weblate (Chinese (Simplified)) Bump lefthook from 1.6.4 to 1.6.5 (FreeTubeApp#4758) Bump marked from 12.0.0 to 12.0.1 (FreeTubeApp#4757) Bump electron from 29.1.0 to 29.1.1 (FreeTubeApp#4756) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese (Brazil)) Improve touch controls for dash quality selector (FreeTubeApp#4750) Translated using Weblate (Serbian) Translated using Weblate (Spanish) Translated using Weblate (French) Translated using Weblate (German) Translated using Weblate (Estonian) Translated using Weblate (Polish) Translated using Weblate (Basque) Translated using Weblate (Portuguese (Brazil)) Translated using Weblate (Portuguese (Brazil)) Translated using Weblate (Portuguese (Brazil)) Fix playlists database import and export not using the actual database format (FreeTubeApp#4664) ... # Conflicts: # src/renderer/views/Search/Search.js
Fix playlists DB import and export not using the actual DB format
Pull Request Type
Description
Currently the playlists export generates a JSON array with the playlists and the playlists import expects said JSON array, however that doesn't match the actual playlists database format, so you can't import a real playlists database file. If we exported it as JSON file that would be fine, but we explicitly label it as a database file and expect a database file to be picked during the import.
This pull request changes the import and export to match the real database format (each playlist is a JSON object on it's own line, with a final new line at the end of the file), so that we are consistent across the board. It still supports importing the old array format for the sake of backwards compatibility.
While yes this is technically a breaking change compared to previous nightly builds, it's not a breaking change compared to the previous (0.19.1) release. It corrects incorrect behaviour and people cannot expect stability across nightly builds, as they are by definition development/bleeding edge builds, which we've never recommended normal users use for every day use.
Testing
yarn devuses a folder calledElectroninstead)Remove All Playlistsin thePrivacy SettingsRemove All Playlistsin thePrivacy SettingsagainIf both the original import (a real database written by nedb) and the secondary one (the database created by the export) were successful (no errors and playlists show up), this pull request works as expected.
Desktop