Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add 'Play the next video automatically' option

  • Loading branch information...
commit 160f67d053774b744bf4e0e6cb6ec11c9b682020 1 parent f35c11a
@ScudLee ScudLee authored
View
10 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"
View
1  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,
View
3  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));
View
2  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)
View
10 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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.