2009-07-16, 20:55
As I was not able to use the external player to watch anime in the animefreak.tv plugin, I made a small patch to add the external player as a player type usable in libpython.
I tested with animefreak.tv plugin and it works.
I tested with animefreak.tv plugin and it works.
Code:
Index: xbmc/lib/libPython/xbmcmodule/player.cpp
===================================================================
--- xbmc/lib/libPython/xbmcmodule/player.cpp (revision 21711)
+++ xbmc/lib/libPython/xbmcmodule/player.cpp (working copy)
@@ -65,7 +65,8 @@
if (playerCore == EPC_DVDPLAYER ||
playerCore == EPC_MPLAYER ||
- playerCore == EPC_PAPLAYER)
+ playerCore == EPC_PAPLAYER ||
+ playerCore == EPC_EXTPLAYER)
{
self->playerCore = (EPLAYERCORES)playerCore;
}
@@ -490,7 +491,8 @@
" : - xbmc.PLAYER_CORE_AUTO\n"
" : - xbmc.PLAYER_CORE_DVDPLAYER\n"
" : - xbmc.PLAYER_CORE_MPLAYER\n"
- " : - xbmc.PLAYER_CORE_PAPLAYER\n");
+ " : - xbmc.PLAYER_CORE_PAPLAYER\n"
+ " : - xbmc.PLAYER_CORE_EXTPLAYER\n");
// Restore code and data sections to normal.
#ifndef __GNUC__
Index: xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp
===================================================================
--- xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp (revision 21711)
+++ xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp (working copy)
@@ -964,6 +964,7 @@
PyModule_AddIntConstant(pXbmcModule, (char*)"PLAYER_CORE_DVDPLAYER", EPC_DVDPLAYER);
PyModule_AddIntConstant(pXbmcModule, (char*)"PLAYER_CORE_MPLAYER", EPC_MPLAYER);
PyModule_AddIntConstant(pXbmcModule, (char*)"PLAYER_CORE_PAPLAYER", EPC_PAPLAYER);
+ PyModule_AddIntConstant(pXbmcModule, (char*)"PLAYER_CORE_EXTPLAYER", EPC_EXTPLAYER);
// dvd state constants
PyModule_AddIntConstant(pXbmcModule, (char*)"TRAY_OPEN", TRAY_OPEN);