Skip to content

Commit

Permalink
Add a playback OSD menu option to cancel an in-progress playlist.
Browse files Browse the repository at this point in the history
Previously, the only way to stop playlist playback was to execute a
jump point, as EXIT simply moves to the next playlist item.  Now, the
playback OSD menu, "Playback" submenu, has a "Cancel Playlist" entry,
with the effect that when playback ends, it returns to the Watch
Recordings screen instead of the next playlist entry.
  • Loading branch information
stichnot committed May 20, 2012
1 parent 3bdc0d1 commit 3bbf624
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions mythtv/libs/libmythtv/tv_play.cpp
Expand Up @@ -10182,6 +10182,12 @@ void TV::OSDDialogEvent(int result, QString text, QString action)
PrepareToExitPlayer(actx, __LINE__);
SetExitPlayer(true, true);
}
else if (action == "CANCELPLAYLIST")
{
setInPlayList(false);
MythEvent xe("CANCEL_PLAYLIST");
gCoreContext->dispatch(xe);
}
else if (action == ACTION_JUMPFFWD)
DoJumpFFWD(actx);
else if (action == ACTION_JUMPRWND)
Expand Down Expand Up @@ -11449,6 +11455,8 @@ void TV::FillOSDMenuPlayback(const PlayerContext *ctx, OSD *osd,
}
if (!db_browse_always)
osd->DialogAddButton(tr("Toggle Browse Mode"), "TOGGLEBROWSE");
if (inPlaylist)
osd->DialogAddButton(tr("Cancel Playlist"), "CANCELPLAYLIST");
osd->DialogAddButton(tr("Playback data"),
ACTION_TOGGLEOSDDEBUG, false, false);
}
Expand Down
3 changes: 2 additions & 1 deletion mythtv/programs/mythfrontend/playbackbox.cpp
Expand Up @@ -4177,7 +4177,8 @@ void PlaybackBox::customEvent(QEvent *event)
m_artTimer[(uint)type]->start(s_artDelay[(uint)type]);
}
}
else if (message == "EXIT_TO_MENU")
else if (message == "EXIT_TO_MENU" ||
message == "CANCEL_PLAYLIST")
{
m_playListPlay.clear();
}
Expand Down

0 comments on commit 3bbf624

Please sign in to comment.