2015-12-05, 17:04
(2015-12-05, 16:54)Martijn Wrote: i'd say you use totally unrecommended way of calling the player. A plugin should not decide what player to use.
if you see thisQuote:AttributeError: 'module' object has no attribute 'PLAYER_CORE_DVDPLAYER'you are doing it wrong since many versions. Certainly not a Kodi problem cause that method was deprecated long time ago and now finally killed from core code.
Edit:
PHP Code:def GetPlayer(textOnly=False):
""" Get's the default player. this is only used for raspberry pi. """
try:
settingIndex = int(AddonSettings.__GetSetting(AddonSettings.__RPI_PLAYER) or 0)
if textOnly:
return ["Auto", "DVDPlayer"][settingIndex]
else:
return [xbmc.PLAYER_CORE_AUTO, xbmc.PLAYER_CORE_DVDPLAYER][settingIndex]
except Exception, e:
Logger.Warning("Error determining the Player Core in Kodi, falling back to PLAYER_CORE_AUTO:\n%s", e.message)
return xbmc.PLAYER_CORE_AUTO
Seriously this is just plain wrong and i will make sure that code dies from the Python API soon.
Don't get me wrong, you are right and I changed it in the new version. But I test with the official Kodi nightly builds and they are working just fine, so initially I thought there was no need for changes. This is just old code from the Xbox era where there was a mplayer and dvdplayer and back then some streams worked better with DVDplayer, others with Mplayer.
So it will all be fine, I just found it weird that the Milhouse removed a lot of stuff that was still in the Kodi main code. That is all.
EDIT: about the API, yes, please remove old stuff. I keep an eye out on http://kodi.wiki/view/Jarvis_API_changes (or newer one) and try to keep up with that. Besides that, I have the feeling that you are offended somewhat (taking it from the "Seriously this is just plain wrong and i will make sure that code dies from the Python API soon." ? I don't know why, did I say something, or do something wrong?