v17 Still Confused about setResolvedUrl, IsPlayable & IsFolder for ListItems - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: v17 Still Confused about setResolvedUrl, IsPlayable & IsFolder for ListItems (/showthread.php?tid=316042) |
Still Confused about setResolvedUrl, IsPlayable & IsFolder for ListItems - CaffeinatedMike - 2017-06-08 I've seen the posts (here and here) about how setResolvedUrl should be used, but I'm still having issues getting it to work correctly in my plugin. I've read the xbmcplugin module documentation (here - This is an outdated documentation, but couldn't find Krypton version) and for all of my menu items I'm setting `IsFolder` to False and the listitem property `IsPlayable` to true and providing the plugin callback as the url. That bit of code is as follows Code: list_item = xbmcgui.ListItem(label=label_text) Then, in my routing I pass the link in the `resolve` param to the following procedure Code: def play_video(link): This is only way I've been able to get the links to play when selected in the directory listing. However, after stopping the video I noticed the following errors/warnings in the debug log Code: 12:10:57.424 T:2384 DEBUG: CVideoDatabase::RunQuery took 2 ms for 31 items query: SELECT files.strFilename, files.playCount, bookmark.timeInSeconds, bookmark.totalTimeInSeconds FROM files LEFT JOIN bookmark ON files.idFile = bookmark.idFile AND bookmark.type = 1 WHERE files.idPath=2 I thought that by following the above links instructions in setting the list_items as IsFolder=False & IsPlayable=True that only the link that is selected will be processed, but from the above debug log it appears all of the list items are trying to be evaluated after stopping a video. What am I doing wrong? I'd really appreciate some input as for some reason I still cannot wrap my head around the correct usage of setResolvedUrl. RE: Still Confused about setResolvedUrl, IsPlayable & IsFolder for ListItems - Roman_V_M - 2017-06-08 You can safely ignore the above warnings. RE: Still Confused about setResolvedUrl, IsPlayable & IsFolder for ListItems - CaffeinatedMike - 2017-06-08 (2017-06-08, 21:20)Roman_V_M Wrote: You can safely ignore the above warnings. Ok, thank you for confirming that Roman. So, my usage/implementation is correct (finally)? Why are those warnings raised if the implementation is correct? Also, am I handling invalid links correctly in the following portion? Code: else: RE: Still Confused about setResolvedUrl, IsPlayable & IsFolder for ListItems - Roman_V_M - 2017-06-08 Kodi tries to extract thubnails and mediainfo for list items which does not make much sense for a virtual path. |