Giter Club home page Giter Club logo

Comments (5)

mattvonrocketstein avatar mattvonrocketstein commented on August 22, 2024

Any update on this?

from play-to-xbmc-chrome.

Itja avatar Itja commented on August 22, 2024

I just investigated a bit into this issue.

There are two cases of 'Mixes' on Youtube. The 'Mix' based on an Artist or Track, and the 'My Mix', based on your personal watch (or better listening) preferences. For either, the mix is unlike a normal playlist. It's an infinite playlist that is generated as the YouTube website plays the videos.

Artist-Based Mix

This seems to be partially supported by Play to Kodi: I just tested it for one mix generated by YouTube and it only returned the first 26 Items, albeit 50 have been requested. Scrolling further down on the youtube page forcing it to generate more didn't change the output of the API though. So in this case, it needs to be investigated whether it is possible to request further entries of this infinite list, and a strategy of when to request and transmit new entries to Kodi needs to be worked out.

My Mix

In this case, requesting the API with the List ID gives a 404 with this content:

{
 "error": {
  "errors": [
   {
    "domain": "youtube.playlistItem",
    "reason": "playlistNotFound",
    "message": "The playlist identified with the requests \u003ccode\u003eplaylistId\u003c/code\u003e parameter cannot be found.",
    "locationType": "parameter",
    "location": "playlistId"
   }
  ],
  "code": 404,
  "message": "The playlist identified with the requests \u003ccode\u003eplaylistId\u003c/code\u003e parameter cannot be found."
 }
}

There also seems to be no other way to fetch the list entries from the API. A workaround would be fetching the Video IDs to play directly from the YouTube website. If we had working code for this, we still would need to figure out when to fetch new entries from YouTube and transmit them to Kodi.

from play-to-xbmc-chrome.

maciex avatar maciex commented on August 22, 2024

Why not send the ID of the playlist/mix to the Youtube addon in Kodi? It should (is it supported?) handle those kind of requests. In such case there would be no processing needed on the Play-to-xbmc addon side.

from play-to-xbmc-chrome.

Itja avatar Itja commented on August 22, 2024

From my readings yesterday, my guess is that the problem is that you can't communicate directly with the addons, only with Kodi via the JSON-RPC API. And that API surely has no idea of YouTube playlists (since they're addon-specific). I don't know if when the YouTube-addon would cooperate, maybe it would be possible giving Kodi a playlist URI to play, and the YouTube-addon itself would then expand the playlist URI on Kodi's playlist. (But then again, I'm very new to the Kodi RPC and YT addon, so maybe there is another less-hacky way.)

from play-to-xbmc-chrome.

maciex avatar maciex commented on August 22, 2024

You can send JSON-RPC to play a video in Kodi's Youtube Plugin, ex.:
curl --user USER:PASSWORD --header "Content-Type: application/json" --data '{"id":1,"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"file":"plugin://plugin.video.youtube/play/?playlist_id=RDEMHk07TM01OFpLd0Sok9_H2w&order=default&play=1"}}}' "http://192.168.0.XX:8080/jsonrpc"

from play-to-xbmc-chrome.

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.