Skip to content
Extraits de code Groupes Projets
Valider daf1f2e4 rédigé par Elliu's avatar Elliu
Parcourir les fichiers

Fix next kara when reaching end of file

parent 7158e7c8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #2637 réussi
Ce commit fait partie de la requête de fusion !186. Les commentaires créés ici seront créés dans le contexte de cette requête de fusion.
...@@ -134,7 +134,6 @@ MpvWidget::handle_mpv_event(mpv_event *event) ...@@ -134,7 +134,6 @@ MpvWidget::handle_mpv_event(mpv_event *event)
case MPV_EVENT_PAUSE: case MPV_EVENT_PAUSE:
lkt_queue_send(m_queue, LKT_EVENT_PLAY_TOGGLE, LKT_PLAY_PAUSE); lkt_queue_send(m_queue, LKT_EVENT_PLAY_TOGGLE, LKT_PLAY_PAUSE);
break; break;
case MPV_EVENT_UNPAUSE: case MPV_EVENT_UNPAUSE:
lkt_queue_send(m_queue, LKT_EVENT_PLAY_TOGGLE, LKT_PLAY_PLAY); lkt_queue_send(m_queue, LKT_EVENT_PLAY_TOGGLE, LKT_PLAY_PLAY);
break; break;
...@@ -145,25 +144,13 @@ MpvWidget::handle_mpv_event(mpv_event *event) ...@@ -145,25 +144,13 @@ MpvWidget::handle_mpv_event(mpv_event *event)
break; break;
case MPV_EVENT_START_FILE: case MPV_EVENT_START_FILE:
//SET_STATE_FLAG(*(arg->state), PLAY); m_inhib = false;
//*(arg->hinib) = false;
LOG_DEBUG("WINDOW", "Start of file!"); LOG_DEBUG("WINDOW", "Start of file!");
break; break;
case MPV_EVENT_END_FILE: case MPV_EVENT_END_FILE:
//LOG_DEBUG("WINDOW", "End of file!");
//if (((*(arg->state)) != STATE_STOP) && !(*(arg->hinib))) {
// LOG_DEBUG("WINDOW", "Send play_next event");
// lkt_queue_send(queue, LKT_EVENT_PLAY_NEXT, NULL);
//} else
// LOG_DEBUG("WINDOW", "Don't send play_next event, hinib is %d and state is %s",
// *(arg->hinib),
// (*(arg->state) == STATE_STOP) ? "STOP"
// : (*(arg->state) == STATE_PLAY) ? "PLAY"
// : (*(arg->state) == STATE_PAUSE) ? "PAUSE"
// : "UNKNOWN");
LOG_DEBUG("WINDOW", "End of file!"); LOG_DEBUG("WINDOW", "End of file!");
//lkt_queue_send(m_queue, LKT_EVENT_PLAY_NEXT, NULL); if (!m_inhib)
lkt_queue_send(m_queue, LKT_EVENT_PLAY_NEXT, nullptr);
break; break;
case MPV_EVENT_PROPERTY_CHANGE: { case MPV_EVENT_PROPERTY_CHANGE: {
...@@ -274,6 +261,7 @@ bool ...@@ -274,6 +261,7 @@ bool
MpvWidget::load_file(const char *filepath) MpvWidget::load_file(const char *filepath)
{ {
const bool ret = !lmpv_load_file(mpv, filepath); const bool ret = !lmpv_load_file(mpv, filepath);
m_inhib = true;
if (ret) { if (ret) {
LOG_DEBUG("WINDOW", "Loaded file: %s", filepath); LOG_DEBUG("WINDOW", "Loaded file: %s", filepath);
......
...@@ -38,6 +38,7 @@ private: ...@@ -38,6 +38,7 @@ private:
int m_position; int m_position;
int m_duration; int m_duration;
bool m_oscVisible = false; bool m_oscVisible = false;
bool m_inhib = false;
protected: protected:
void keyPressEvent(QKeyEvent* event); void keyPressEvent(QKeyEvent* event);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter