Kodi Community Forum

Full Version: how to turn a listItem with isFolder=true into playable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I'm trying to write a plugin for playing videos from a site.
Some movies have multiple parts, so I want to display them as a folder, and I would like those that have a single part to be directly playable,
However, I dont want to determine how many parts each movie has when building the listing, as this needs two additional http requests per video link.

Adding the video links with isFolder=False makes xbmc pass an invalid handle to the plugin afterwards - and I cannot turn them in folders when I discover they have multiple parts.

So I tried to add all video links as folders initially, and when the user selects a video with a single part, I can force xbmc to play the video. However, xmbc "changes directory" into them. I was hoping that if I invoked setResolvedUrl/isPlayable when the user selects the listitem for a one-part movie, xbmc would realize it's not really a folder and stay on the listing page.

Is there any workaround for this?