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 f33597d6b4..794a36acd7 100644 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -4816,7 +4816,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 ab2edf5b7d..269ac414a7 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 c8b8129e88..766f58598c 100644 --- a/xbmc/settings/GUISettings.cpp +++ b/xbmc/settings/GUISettings.cpp @@ -662,6 +662,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 77a775d286..3bae8ad464 100644 --- a/xbmc/video/GUIViewStateVideo.cpp +++ b/xbmc/video/GUIViewStateVideo.cpp @@ -454,7 +454,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 fea20894d6..f6b2e95c37 100644 --- a/xbmc/video/windows/GUIWindowVideoBase.cpp +++ b/xbmc/video/windows/GUIWindowVideoBase.cpp @@ -1222,10 +1222,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); @@ -1431,6 +1435,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; } |