Jump to content

Json return


Marcelo

Recommended Posts

Marcelo

Guys,

 

I'm using this plugin with great success but one thing is not working for me.

 

I developed one remote control that uses Json and when I call the player.getitem function for movies it is returning the label as "stream" and type "unknown". All the rest like plot and all of it is not returning.

 

This is happening for me if I call the Movie from the widget, from the listitem or even directly from my remote.

 

This behavior doesn't happen with music. It reports back all the info correctly.

 

I know that Kodi has some limitations in returning the info of an item if it is perceived as an stream.

 

If anyone can take a look at this.

 

Thanks,

 

Marcelo.

Link to comment
Share on other sites

Marcelo

Maybe as told by Montellese the problem is this:

 

"Because if the filename you pass in through "file" to Player.Open doesn't match the real filename 100% KODI won't be able to find the file in the database and therefore won't be able to assign any metadata to it. In the GUI this can't happen because the item you play comes from the database with all the proper information."

 

If that's the case the link transformation from what is in the database to the play file that is transcoded/direct play is causing this behavior.

 

Also, the item plays and returns all the information if you play it once. On the second time that you try to play it no info is returned because the filetype in unknown.

 

And I can check this by looking at Kodi Movies DB. When I play the movie for the first time it duplicates the db entry in the path table so instead of only having the "plugin://plugin.video.emby/movies/8eb7fc2014b4f0cf746aa5af0146defa/" entry, I'm also having a new one with "http://*********.dlinkddns.com:8096/mediabrowser/Videos/8eb7fc2014b4f0cf746aa5af0146defa/" the direct path. This other one does not specify the file is a movie nor that it has metadata. And it's id is a new one also. What it does is when called from a second time to play it looks in the db for this second entry and that's why it doesn't return any metadata at all.

 

Hope that it helps.

 

Thanks,

 

Marcelo.

Edited by Marcelo
Link to comment
Share on other sites

xnappo

Have you tried this with the new option in the Git to use direct paths instead of the addon redirection?

Link to comment
Share on other sites

Marcelo

Xnappo,

 

If I use the direct path it will work since it won't duplicate the entry in the Kodi DB. That works. I also tested changing the items manually to the direct path and they don't get duplicated as played in Kodi preserving the metadata.

 

But if we force so won't you loose the capability to change paths on the fly for transcoding and everything else?

 

Don't know if there's a way to insert new paths in the DB keeping the existing metadata.

 

Thanks,

 

Marcelo.

Link to comment
Share on other sites

xnappo

Yep - you lose the transcoding ability.

 

I think you should just get the item and query the Emby server for the path.  Or are you developing something that must be Kodi only?

Link to comment
Share on other sites

Marcelo

Xnappo,

 

Your idea is really great and I can do it for shure. I was thinking about stick only with kodi but I can do that for shure.

 

But just a second idea here to avoid growing the kodi DB as files get played and trying to counter this. Isn't it possible to when a video is called by the plugin to do all the playurl manipulation (transcoding, etc) then updating this to the db in the place of the old path, then sending this to Kodi to play?

 

I know that it will change the actual methodology a litte bit but for skins that also retrieve plot nfo while the movie is paused will also benefit because the way it is today none of the metadata is returning, only what is being populated for label and thumbnail through listitem.

 

Hope to not being a pain.

 

Thanks,

 

Marcelo.

Edited by Marcelo
Link to comment
Share on other sites

xnappo

Hi Marcelo,

 

I may be misunderstanding what you are saying, but this would only work the first time.

 

1. Path points to addon

2. Playback starts on item locally, path replaced by physical path

3. Playback from local filesystem - fine

4. Playback remotely - BREAKS

 

In step 4, now the path is the physical path, and the addon gets no chance to intercept to turn on transcoding.

Edited by xnappo
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...