Kodi Community Forum
ERROR Playlist Player: skipping unplayable item (when using a custom player) - 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: ERROR Playlist Player: skipping unplayable item (when using a custom player) (/showthread.php?tid=373333)



ERROR Playlist Player: skipping unplayable item (when using a custom player) - Niccolo - 2023-05-30

I wrote a custon video add-on for Kodi 19 Matrix, which calls a custom script add-on to actually play the playable items.

Everything is working as expected, except a wrong dialog box informing that it was impossible to play the item (but actually the play succeeded). Into the log appears the error message:

Code:
ERROR <general>: Playlist Player: skipping unplayable item: 0, path [plugin://script.picture.photo-frame/?context=%2Fdata%2Fplaylist_16x9.m3u
  • The playable item has the url pointing to my custom script: 'plugin://script.picture.photo-frame/?' + urlencode({'context': playlist_path})
  • The play is actually performed by my custom script add-on called script.picture.photo-frame.
  • The scrip add-on terminates without errors.

I tried also to use the callback mechanism provided by xbmcplugin.setResolvedUrl() into the video add-on. In this case clicking the playable item actually invokes the video add-on again, but the "play failed" dialog box appears regardless any action I take: calling setResolvedUrl(succeeded=True) or setResolvedUrl(succeeded=False) does not make any difference. I tried also to not call the custom player script at all, but the video add-on still thinks that the playing failed.

Is there a way to force a video add-on into thinking that the play succeded, even if the play was performed by a custom script or not executed at all?


RE: ERROR Playlist Player: skipping unplayable item (when using a custom player) - izprtxqkft - 2023-05-30

its not clear how your addon is starting playback from what youve provided

i did something similar recently with setresolvedurl so that invoking playback would actually resolve (or redirect) a requested path to a different one

in my instance, i was able to have my addon be called as a playable item like PlayMedia(plugin://my.video.plugin/movies/Movie Name) then my addon would resolve that content and instruct kodi where the media should actually play from using setresolvedurl

here is the line that works for that functionality - xbmcplugin.setResolvedUrl(1, True, xbmcgui.ListItem(path="plugin://other.video.plugin/?_play=id123456"))

it required passing a listitem to setresolvedurl


RE: ERROR Playlist Player: skipping unplayable item (when using a custom player) - zachmorris - 2025-01-17

I'm resurrecting this thread, as I have the same problem and can't figure out how to solve it.

My situation. I have an addon that executes a custom script (launches a game) when a listitem is selected, rather than play's media.

When the user selects the listitem directly, my addon has no problem routing the selection of the listitem to execute the correct script for that listitem. As an example, here's what the logs show when the user selects the listitem directly:
xml:
debug <general>: CPythonInvoker(23): adding args:
debug <general>: CPythonInvoker(23): plugin://plugin.program.iagl/play_game/e09ca05cf0b8946dc8c4d5b544bf80d0
debug <general>: CPythonInvoker(23): -1
debug <general>: CPythonInvoker(23):
debug <general>: CPythonInvoker(23): resume:false
..
debug <general>: [plugin.program.iagl][routing] Dispatching to 'play_game_external', args: {'game_id': 'e09ca05cf0b8946dc8c4d5b544bf80d0'}
debug <general>: IAGL Route: /play_game_external/e09ca05cf0b8946dc8c4d5b544bf80d0
...
info <general>: IAGL: Playing game XYZ

However, if the user brings up the info dialog window for that listitem, and they select the 'Play' button (using Estuary as the default skin), the script still executes as before and succeeds, but now theres a dialog window stating "Playback Failed: One more items failed to play. Check log for more information about this message."

The log looks exactly the same as before, but now there are two errors regarding playlist player being unable to play an item
xml:
debug <general>: CPythonInvoker(23): adding args:
debug <general>: CPythonInvoker(23): plugin://plugin.program.iagl/play_game/e09ca05cf0b8946dc8c4d5b544bf80d0
debug <general>: CPythonInvoker(23): -1
debug <general>: CPythonInvoker(23):
debug <general>: CPythonInvoker(23): resume:false
..
**error <general>: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.program.iagl/play_game/e09ca05cf0b8946dc8c4d5b544bf80d0]
debug <general>: [plugin.program.iagl][routing] Dispatching to 'play_game_external', args: {'game_id': 'e09ca05cf0b8946dc8c4d5b544bf80d0'}
debug <general>: IAGL Route: /play_game_external/e09ca05cf0b8946dc8c4d5b544bf80d0
**debug <general>: Playlist Player: no more playable items... aborting playback
...
info <general>: IAGL: Playing game XYZ

Is there something I can do on the python side to tell Kodi either that playback did succeed, or to not add the current list item to a playlist at all?

Thanks in advance