CMoviePlayerGui: Creating an possibility to block restoreNeutrino()...

...from an external plugin

 - This better play playlists with plugins
This commit is contained in:
M. Liebmann
2015-12-08 06:15:53 +01:00
parent 464f929437
commit 558fea4ec4
2 changed files with 9 additions and 2 deletions

View File

@@ -189,6 +189,7 @@ void CMoviePlayerGui::Init(void)
filelist_it = filelist.end(); filelist_it = filelist.end();
keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL; keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL;
isLuaPlay = false; isLuaPlay = false;
blockedFromPlugin = false;
} }
void CMoviePlayerGui::cutNeutrino() void CMoviePlayerGui::cutNeutrino()
@@ -766,7 +767,10 @@ void CMoviePlayerGui::PlayFile(void)
PlayFileStart(); PlayFileStart();
mutex.unlock(); mutex.unlock();
PlayFileLoop(); PlayFileLoop();
PlayFileEnd(repeat_mode == REPEAT_OFF); bool repeat = (repeat_mode == REPEAT_OFF);
if (isLuaPlay)
repeat = (!blockedFromPlugin);
PlayFileEnd(repeat);
} }
bool CMoviePlayerGui::PlayFileStart(void) bool CMoviePlayerGui::PlayFileStart(void)

View File

@@ -90,6 +90,7 @@ class CMoviePlayerGui : public CMenuTarget
CMoviePlayerGui::state playstate; CMoviePlayerGui::state playstate;
int keyPressed; int keyPressed;
bool isLuaPlay; bool isLuaPlay;
bool blockedFromPlugin;
int speed; int speed;
int startposition; int startposition;
int position; int position;
@@ -161,7 +162,6 @@ class CMoviePlayerGui : public CMenuTarget
void PlayFileLoop(); void PlayFileLoop();
void PlayFileEnd(bool restore = true); void PlayFileEnd(bool restore = true);
void cutNeutrino(); void cutNeutrino();
void restoreNeutrino();
void showHelpTS(void); void showHelpTS(void);
void callInfoViewer(); void callInfoViewer();
@@ -221,6 +221,9 @@ class CMoviePlayerGui : public CMenuTarget
int getKeyPressed() { return keyPressed; }; int getKeyPressed() { return keyPressed; };
size_t GetReadCount(); size_t GetReadCount();
std::string GetFile() { return pretty_name; } std::string GetFile() { return pretty_name; }
void restoreNeutrino();
void setBlockedFromPlugin(bool b) { blockedFromPlugin = b; };
bool getBlockedFromPlugin() { return blockedFromPlugin; };
}; };
#endif #endif