diff options
-rw-r--r-- | language/English/strings.po | 10 | ||||
-rw-r--r-- | xbmc/dialogs/GUIDialogContextMenu.h | 1 | ||||
-rw-r--r-- | xbmc/settings/GUISettings.cpp | 3 | ||||
-rw-r--r-- | xbmc/video/GUIViewStateVideo.cpp | 2 | ||||
-rw-r--r-- | xbmc/video/windows/GUIWindowVideoBase.cpp | 10 |
5 files changed, 22 insertions, 4 deletions
diff --git a/language/English/strings.po b/language/English/strings.po index a7687de29f..fb5abf8327 100644 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -4831,7 +4831,15 @@ msgctxt "#13432" msgid "Allow hardware acceleration (VideoToolbox)" msgstr "" -#empty strings from id 13433 to 13499 +msgctxt "#13433" +msgid "Play the next video automatically" +msgstr "" + +msgctxt "#13434" +msgid "Play only this" +msgstr "" + +#empty strings from id 13435 to 13499 msgctxt "#13500" msgid "A/V sync method" diff --git a/xbmc/dialogs/GUIDialogContextMenu.h b/xbmc/dialogs/GUIDialogContextMenu.h index a901bd0160..282d7ecb40 100644 --- a/xbmc/dialogs/GUIDialogContextMenu.h +++ b/xbmc/dialogs/GUIDialogContextMenu.h @@ -122,6 +122,7 @@ enum CONTEXT_BUTTON { CONTEXT_BUTTON_CANCELLED = 0, CONTEXT_BUTTON_SORTBY_DATE, CONTEXT_BUTTON_MENU_HOOKS, CONTEXT_BUTTON_PLAY_AND_QUEUE, + CONTEXT_BUTTON_PLAY_ONLY_THIS, CONTEXT_BUTTON_UPDATE_EPG, CONTEXT_BUTTON_RECORD_ITEM, CONTEXT_BUTTON_TAGS_ADD_ITEMS, diff --git a/xbmc/settings/GUISettings.cpp b/xbmc/settings/GUISettings.cpp index 6b2a39a9dc..83191c1dc6 100644 --- a/xbmc/settings/GUISettings.cpp +++ b/xbmc/settings/GUISettings.cpp @@ -663,6 +663,9 @@ void CGUISettings::Initialize() CSettingsCategory* vp = AddCategory(SETTINGS_VIDEOS, "videoplayer", 14086); + AddBool(vp, "videoplayer.autoplaynextitem", 13433, false); + AddSeparator(vp, "videoplayer.sep1"); + map<int, int> renderers; renderers.insert(make_pair(13416, RENDER_METHOD_AUTO)); diff --git a/xbmc/video/GUIViewStateVideo.cpp b/xbmc/video/GUIViewStateVideo.cpp index 8f6c6909f9..4ff7f9fbd1 100644 --- a/xbmc/video/GUIViewStateVideo.cpp +++ b/xbmc/video/GUIViewStateVideo.cpp @@ -453,7 +453,7 @@ bool CGUIViewStateWindowVideoNav::AutoPlayNextItem() if (params.GetContentType() == VIDEODB_CONTENT_MUSICVIDEOS || params.GetContentType() == 6) // recently added musicvideos return g_guiSettings.GetBool("musicplayer.autoplaynextitem"); - return false; + return g_guiSettings.GetBool("videoplayer.autoplaynextitem"); } CGUIViewStateWindowVideoPlaylist::CGUIViewStateWindowVideoPlaylist(const CFileItemList& items) : CGUIViewStateWindowVideo(items) diff --git a/xbmc/video/windows/GUIWindowVideoBase.cpp b/xbmc/video/windows/GUIWindowVideoBase.cpp index 0271519f0b..58657c9f58 100644 --- a/xbmc/video/windows/GUIWindowVideoBase.cpp +++ b/xbmc/video/windows/GUIWindowVideoBase.cpp @@ -1221,10 +1221,14 @@ void CGUIWindowVideoBase::GetContextButtons(int itemNumber, CContextButtons &but buttons.Add(CONTEXT_BUTTON_RESUME_ITEM, GetResumeString(*(item.get()))); // Resume Video } //if the item isn't a folder, is a member of a list rather than a single item - //and we're not on the last element of the list, then add the 'play from here' option + //and we're not on the last element of the list, + //then add add either 'play from here' or 'play only this' depending on default behaviour if (!item->m_bIsFolder && m_vecItems->Size() > 1 && itemNumber < m_vecItems->Size()-1) { - buttons.Add(CONTEXT_BUTTON_PLAY_AND_QUEUE, 13412); + if (!g_guiSettings.GetBool("videoplayer.autoplaynextitem")) + buttons.Add(CONTEXT_BUTTON_PLAY_AND_QUEUE, 13412); + else + buttons.Add(CONTEXT_BUTTON_PLAY_ONLY_THIS, 13434); } if (item->IsSmartPlayList() || m_vecItems->IsSmartPlayList()) buttons.Add(CONTEXT_BUTTON_EDIT_SMART_PLAYLIST, 586); @@ -1430,6 +1434,8 @@ bool CGUIWindowVideoBase::OnContextButton(int itemNumber, CONTEXT_BUTTON button) return true; case CONTEXT_BUTTON_PLAY_AND_QUEUE: return OnPlayAndQueueMedia(item); + case CONTEXT_BUTTON_PLAY_ONLY_THIS: + return OnPlayMedia(itemNumber); default: break; } |