Piped
Piped copied to clipboard
Backend: NullPointers when trying to import playlist
Official Instance
- [x] The bug is reproducible on the official hosted instance, or is API-related.
Describe the bug
It seems that playlist import doesn't appear to work with the route /user/playlists/create
To Reproduce
- Export your already existing playlist from YouTube via Google Takeout
- Notice that it may be in different language than English
- See that the import fails with a ERROR 500 and NullPointer in backend logs
Expected behavior
I would have expected it to have imported my playlist.
Logs/Errors
An error occoured in the path: /user/playlists/add
java.lang.NullPointerException: Cannot invoke "com.fasterxml.jackson.databind.JsonNode.textValue()" because the return value of "com.fasterxml.jackson.databind.JsonNode.get(String)" is null
at me.kavin.piped.server.ServerLauncher.lambda$mainServlet$46(ServerLauncher.java:415)
at io.activej.http.AsyncServlet.lambda$ofBlocking$0(AsyncServlet.java:43)
at io.activej.promise.Promise.lambda$ofBlocking$12(Promise.java:249)
at java.base/java.util.concurrent.ThreadPerTaskExecutor$TaskRunner.run(ThreadPerTaskExecutor.java:314)
at java.base/java.lang.VirtualThread.run(VirtualThread.java:311)
Browser, and OS with Version.
Not applicable
Additional context
No response
I had the same problem, manually added the playlists, now export to jason
button for playlists not working (it worked once). I think I should open a new issue.
#2866
Is there an example playlist file that could be shared?
I'm having the same problem here, but it's a little different.
When I try to "Restore Preferences" then the import section is broken and when I go to the "Feed" section there is a box that says "Do you want to delete the playlist" (not sure if it's totally accurate traduction).
And I can only press on "Yes" and when I did it, I have an error.
I hope this will help.
I just had the same problem and after some digging it looks like the front-end sends an empty JSON object to the back-end, although the back-end expects a name property. I will look around a bit more, see if I find anything.
Edit: The culprit is in this Function, I think. The code in there does not correspond to the current format of Google Takeout, which looks like this:
Video ID,Playlist Video Creation Timestamp
xxxxxxxxxxx,2024-04-13T16:42:44+00:00
As a workaround for Takeout playlists, you can add this to the beginning of the CSV:
,,,,<playlist name>
<rest of the original file>
Thanks, that workaround did the trick for now.
The blank lines are indeed needed as well.