mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
fix video folderplay
This commit is contained in:
@@ -1266,7 +1266,7 @@ void CMoviePlayerGui::quickZap(neutrino_msg_t msg)
|
|||||||
if ((msg == CRCInput::RC_right) || msg == (neutrino_msg_t) g_settings.key_quickzap_up)
|
if ((msg == CRCInput::RC_right) || msg == (neutrino_msg_t) g_settings.key_quickzap_up)
|
||||||
{
|
{
|
||||||
//printf("CMoviePlayerGui::%s: CRCInput::RC_right or g_settings.key_quickzap_up\n", __func__);
|
//printf("CMoviePlayerGui::%s: CRCInput::RC_right or g_settings.key_quickzap_up\n", __func__);
|
||||||
if (isLuaPlay)
|
if (isLuaPlay || isUPNP)
|
||||||
{
|
{
|
||||||
playstate = CMoviePlayerGui::STOPPED;
|
playstate = CMoviePlayerGui::STOPPED;
|
||||||
keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NEXT;
|
keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NEXT;
|
||||||
@@ -1293,7 +1293,7 @@ void CMoviePlayerGui::quickZap(neutrino_msg_t msg)
|
|||||||
else if ((msg == CRCInput::RC_left) || msg == (neutrino_msg_t) g_settings.key_quickzap_down)
|
else if ((msg == CRCInput::RC_left) || msg == (neutrino_msg_t) g_settings.key_quickzap_down)
|
||||||
{
|
{
|
||||||
//printf("CMoviePlayerGui::%s: CRCInput::RC_left or g_settings.key_quickzap_down\n", __func__);
|
//printf("CMoviePlayerGui::%s: CRCInput::RC_left or g_settings.key_quickzap_down\n", __func__);
|
||||||
if (isLuaPlay)
|
if (isLuaPlay || isUPNP)
|
||||||
{
|
{
|
||||||
playstate = CMoviePlayerGui::STOPPED;
|
playstate = CMoviePlayerGui::STOPPED;
|
||||||
keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_PREV;
|
keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_PREV;
|
||||||
|
@@ -155,6 +155,8 @@ void CUpnpBrowserGui::Init()
|
|||||||
m_item_y = m_header_y + m_header_height;
|
m_item_y = m_header_y + m_header_height;
|
||||||
m_footer_y = m_item_y + (m_listmaxshow * m_item_height);
|
m_footer_y = m_item_y + (m_listmaxshow * m_item_height);
|
||||||
m_infobox_y = m_footer_y + m_footer_height + OFFSET_SHADOW + OFFSET_INTER;
|
m_infobox_y = m_footer_y + m_footer_height + OFFSET_SHADOW + OFFSET_INTER;
|
||||||
|
video_key_msg = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CUpnpBrowserGui::~CUpnpBrowserGui()
|
CUpnpBrowserGui::~CUpnpBrowserGui()
|
||||||
@@ -633,8 +635,8 @@ void CUpnpBrowserGui::playnext(void)
|
|||||||
}
|
}
|
||||||
else if (mime.substr(0,6) == "video/") {
|
else if (mime.substr(0,6) == "video/") {
|
||||||
m_frameBuffer->Clear();
|
m_frameBuffer->Clear();
|
||||||
|
m_folderplay = true;
|
||||||
playVideo((*entries)[0].title, (*entries)[0].resources[preferred].url);
|
playVideo((*entries)[0].title, (*entries)[0].resources[preferred].url);
|
||||||
m_folderplay = false; // FIXME else no way to stop in video folder
|
|
||||||
}
|
}
|
||||||
else if (mime.substr(0,6) == "image/") {
|
else if (mime.substr(0,6) == "image/") {
|
||||||
if (m_folderplay)
|
if (m_folderplay)
|
||||||
@@ -727,6 +729,7 @@ bool CUpnpBrowserGui::selectItem(std::string id)
|
|||||||
unsigned int liststart = 0;
|
unsigned int liststart = 0;
|
||||||
unsigned int selected = 0;
|
unsigned int selected = 0;
|
||||||
unsigned int total = 0;
|
unsigned int total = 0;
|
||||||
|
video_key_msg = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL;
|
||||||
|
|
||||||
printf("selectItem: [%s]\n", id.c_str());
|
printf("selectItem: [%s]\n", id.c_str());
|
||||||
if (!getItems(id, liststart, entries, total))
|
if (!getItems(id, liststart, entries, total))
|
||||||
@@ -858,19 +861,23 @@ bool CUpnpBrowserGui::selectItem(std::string id)
|
|||||||
m_folderplay = false;
|
m_folderplay = false;
|
||||||
stopAudio();
|
stopAudio();
|
||||||
}
|
}
|
||||||
else if (m_folderplay && msg == (neutrino_msg_t) CRCInput::RC_stop) {
|
else if (m_folderplay && (msg == (neutrino_msg_t) CRCInput::RC_stop
|
||||||
|
|| video_key_msg == CMoviePlayerGui::PLUGIN_PLAYSTATE_STOP
|
||||||
|
|| video_key_msg == CMoviePlayerGui::PLUGIN_PLAYSTATE_LEAVE_ALL)){
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
m_folderplay = false;
|
m_folderplay = false;
|
||||||
m_frameBuffer->Clear();
|
m_frameBuffer->Clear();
|
||||||
refresh = true;
|
refresh = true;
|
||||||
}
|
}
|
||||||
else if (m_folderplay && msg == (neutrino_msg_t) CRCInput::RC_prev) {
|
else if (m_folderplay && (msg == (neutrino_msg_t) CRCInput::RC_prev)
|
||||||
|
|| video_key_msg == CMoviePlayerGui::PLUGIN_PLAYSTATE_PREV){
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
m_playid -= 2;
|
m_playid -= 2;
|
||||||
if (m_playid < 0)
|
if (m_playid < 0)
|
||||||
m_playid = 0;
|
m_playid = 0;
|
||||||
}
|
}
|
||||||
else if (m_folderplay && msg == (neutrino_msg_t) CRCInput::RC_next) {
|
else if (m_folderplay && (msg == (neutrino_msg_t) CRCInput::RC_next
|
||||||
|
|| video_key_msg == CMoviePlayerGui::PLUGIN_PLAYSTATE_NEXT)){
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
stopAudio();
|
stopAudio();
|
||||||
}
|
}
|
||||||
@@ -1322,6 +1329,7 @@ void CUpnpBrowserGui::playVideo(std::string name, std::string url)
|
|||||||
m_frameBuffer->stopFrame();
|
m_frameBuffer->stopFrame();
|
||||||
CMoviePlayerGui::getInstance().SetFile(name, url);
|
CMoviePlayerGui::getInstance().SetFile(name, url);
|
||||||
CMoviePlayerGui::getInstance().exec(NULL, "upnp");
|
CMoviePlayerGui::getInstance().exec(NULL, "upnp");
|
||||||
|
video_key_msg = CMoviePlayerGui::getInstance().getKeyPressed();
|
||||||
|
|
||||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_upnp | NeutrinoMessages::norezap);
|
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_upnp | NeutrinoMessages::norezap);
|
||||||
}
|
}
|
||||||
|
@@ -96,6 +96,7 @@ class CUpnpBrowserGui : public CMenuTarget, public CListHelpers
|
|||||||
time_t m_time_played;
|
time_t m_time_played;
|
||||||
bool m_playing_entry_is_shown;
|
bool m_playing_entry_is_shown;
|
||||||
time_t timeout;
|
time_t timeout;
|
||||||
|
int video_key_msg;
|
||||||
CComponentsDetailsLine * dline;
|
CComponentsDetailsLine * dline;
|
||||||
CComponentsFooter footer;
|
CComponentsFooter footer;
|
||||||
CComponentsInfoBox topbox, infobox, timebox;
|
CComponentsInfoBox topbox, infobox, timebox;
|
||||||
|
Reference in New Issue
Block a user