Permalink
Browse files

Add a playback OSD menu option to cancel an in-progress playlist.

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.

Note: This adds a currently untranslated string to the Playback
submenu of the playback OSD menu when a playlist is active.

(cherry picked from commit 3bbf624)
  • Loading branch information...
stichnot committed May 20, 2012
1 parent b5b4c48 commit 71e906b9be952f738eeabcb69ee6a75704ec1fa1
Showing with 10 additions and 1 deletion.
  1. +8 −0 mythtv/libs/libmythtv/tv_play.cpp
  2. +2 −1 mythtv/programs/mythfrontend/playbackbox.cpp
@@ -10077,6 +10077,12 @@ void TV::OSDDialogEvent(int result, QString text, QString action)
PrepareToExitPlayer(actx, __LINE__, false);
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)
@@ -11339,6 +11345,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);
}
@@ -4156,7 +4156,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();
}

0 comments on commit 71e906b

Please sign in to comment.