Jump to content

"Emby Options" does not work under certain conditions


chjohans

Recommended Posts

chjohans

I'm in general very happy with the Emby for Kodi app. For me it's the perfect solution as I'm using Kodi for my main Media Center and the iOS Emby app for streaming when "on the go". However there is one to me very annoying issue that I've "always" had. The "Emby Options" submeny does not work under certain conditions.

 

I am using Kodi v17.6 and the latest Emby plugin, I always keep bothj updated. However this issue have persisted through all releases.

 

I'm using the default Estuary skin for kodi. When I try to access the "Kodi Options" submeny on items/widgets under the Movies Kodi menu it does nothing. The same is true if I try to access this submeny for movies (or anything else) that is displayed as the result of a search in Kodi. THis makes it very difficult to for instance toggle the playstate for a movie in the Emby library.

 

If I go to my movies library in Kodi by entering by for instance Title or Genres (from the Kodi menu) things works as expected.

 

Could this please be fixed so the "Emby Options"  submeny works as it should "everywhere" in Kodi?

 

Not sure if I explained this in a way that is possible to understand, if not please let me know :)

Link to comment
Share on other sites

Angelblue05

Emby options are not available everywhere, but I will test your scenarios to see if something can be done. Thank you.

Link to comment
Share on other sites

  • 4 weeks later...
Angelblue05

Yes, the issue is Kodi is not communicating any of the expected information for us to detect what was just selected. I think I found a way to work around it but you'll have to give me a bit of time because I have more pressing things to update. For now, the menu should work except for widgets. Was there any other places now that you've switched skin?

Edited by Angelblue05
Link to comment
Share on other sites

Angelblue05

So I've look deeper into this. I don't think I'll be able to fix it. For some reason, widgets items don't have their database id assigned so it's impossible for the add-on to see what content was selected via the menu option. This seems to only work within libraries.

 

What I will do however is remove the context menu for appearing in this scenario since it's not working. If ever that changes, I will revisit then.

Edited by Angelblue05
Link to comment
Share on other sites

sualfred

@@Angelblue05

 

ListItem.DBID should be available for all widgets based on smart playlists or library nodes. And a lot of other widget provider (some sources of Marcels widgets script) provides them too.

I haven't looked into your code, but isn't it possible to check if the info value is available and filled?

Edited by sualfred
Link to comment
Share on other sites

Angelblue05

@@sualfred

 

Hey, thanks for your input.

 

Ok, the context menu visibility is set as such:

[!IsEmpty(ListItem.DBID) + !StringCompare(ListItem.DBID,-1) | !IsEmpty(ListItem.Property(embyid))] + !IsEmpty(Window(10000).Property(emby_context))

I've simplified it to the following:

!IsEmpty(ListItem.DBID)

The context menu shows on the homescreen. That must mean ListItem.DBID is filled, right? But in python, when I check using xbmc.getInfoLabel('ListItem.DBID') it returns an empty string.

I've also tried the following which does not work either. I don't get it. But the DBID is definitely not set for widgets in Estuary

!StringCompare(ListItem.DBID,"")
Edited by Angelblue05
Link to comment
Share on other sites

sualfred

Ah, I see the problem. You need to know the container ID -> eg: Container(200).ListItem.DBID

You should be able to get it by the info value of System.CurrentControlID.

 

This handling should be improved in Kodi 18

https://forum.kodi.tv/showthread.php?tid=298565&pid=2471756#pid2471756

 

Btw:

IsEmpty/StringCompare/etc. are deprecated and won't work on Leia anymore (https://forum.kodi.tv/showthread.php?tid=250862&pid=2281321#pid2281321

Edited by sualfred
  • Like 1
Link to comment
Share on other sites

Angelblue05

I will try that right now. And yes I am aware of that it is deprecated. Slowly but surely moving to Krypton syntax.

Edited by Angelblue05
Link to comment
Share on other sites

Angelblue05

@@sualfred

 

Man, thank you so much for this. I've been bashing my head for two days trying to get the DBID any which way!

Edited by Angelblue05
Link to comment
Share on other sites

sualfred

@@Angelblue05

 

With your fix it's only working for the Home window, but not for custom windows and dialogs. It's better to always ask for the focused container ID at first, because even on a library window it's possible to use more than one container. 

Embuary for example has custom hub windows with a lot of library widgets. And I also display library based content in some dialogs and next to a library window provided container.

 

This should be enough:

 

     
             container = xbmc.getInfoLabel('System.CurrentControlID')
             self.kodi_id = xbmc.getInfoLabel('Container(%s).ListItem.DBID' % container).decode('utf-8')
             self.item_type = self._get_item_type('Container(%s).ListItem.DBTYPE' % container)
Edited by sualfred
  • Like 1
Link to comment
Share on other sites

chjohans

Thanks guys for the hard work on this, it is really appreciated. Kodi with the Emby plugin is great, and even greater with the Embuary skin and now that the sometimes non-working "Emby options" context menu is being looked into it will be damn near perfect.

Link to comment
Share on other sites

  • 1 month later...
chjohans

Did any of this make it into the release version? My understanding from the above is that this issue is "fixable", is that correct?

Link to comment
Share on other sites

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