Code Monkey home page Code Monkey logo

Comments (3)

iBicha avatar iBicha commented on June 12, 2024 1

@Bnyro thanks for the help, that's all I needed for now - the tool officially supports Piped, I tired it and it works. There are some issues on the official instance, and there's definitely some user feedback missing during import, but it looks like the generated subscription/playlist files are consumed correctly.
Cheers

from piped.

Bnyro avatar Bnyro commented on June 12, 2024
* Piped does not handle user data on the backend, and user data is in indexed db

That's false. Piped saves data on server side if you are logged in, which you can do on on the login/register page, it can be reached by using the navigation bar.

* Piped does not have an API for importing/exporting data, it's done in the browser

That's right, we're fetching the needed data from the Piped backend/API and then use it to generate the backup file via JavaScript.

* Piped has this file format for subscriptions:
{
    "app_version": "", // empty string?
    "app_version_int": 0, // keep at zero?
    "subscriptions": [
        {
            "url": "https://www.youtube.com/channel/UCID", // UCID
            "name": "SomeChannel", // channel handle without the @?
            "service_id": 0 // keep at zero?
        }
    ]
}

Yes, that's right. It's the format NewPipe uses too. service_id is the index of the service used, as NewPipe supports multiple (0 = YouTube).

* Playlists have this format:
{
    "format": "Piped",
    "version": 1,
    "playlists": [
        {
            // note: description is not included?
            "name": "playlistName",
            "type": "playlist",
            "visibility": "private", // private/public/unlisted?
            "videos": [
                "https://youtube.com/watch?v=VIDEO_ID" // videoId
            ]
        }
    ]
}

Yes, that's right, and the description is currently not included. That's because it hasn't yet been supported when I've added support for exporting playlists, but it certainly will be added to the backup file in the future.

If this is correct, then the tool should produce two files, one for subscriptions, and one for playlists, like so:

* Subscriptions -> subscriptions file

* Watch history -> ignored

* Liked videos -> as a playlist, playlists file

* Watch later -> as a playlist, playlists file

* Recommended videos -> as a playlist, playlists file

* Playlists -> playlists file

For subscriptions, that's right. We don't have any way to import or export the watch history or watch later videos, so pushing that into a playlist is certainly the best idea in that case.

Please feel free to ask remaining questions via Matrix: https://matrix.to/#/#piped:matrix.org.

from piped.

Bnyro avatar Bnyro commented on June 12, 2024

Addition: There's no API for importing backup files. We're parsing them client side and then create the necessary playlists and add the subscriptions needed via separate API calls.

from piped.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.