Permalink
Browse files

change sorting inside sets to sort by year, and don't save to the gen…

…eral movie titles default sort when user changes (i.e. save only for the current set)
  • Loading branch information...
1 parent e3df840 commit 1f246324cabedf0453ad06ee076b083b8ecabdc2 Jonathan Marshall committed Feb 15, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 xbmc/video/GUIViewStateVideo.cpp
@@ -278,7 +278,10 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it
if (g_settings.GetWatchMode(items.GetContent()) == VIDEO_SHOW_ALL)
AddSortMethod(SORT_METHOD_PLAYCOUNT, 576, LABEL_MASKS("%T", "%V"));
- SetSortMethod(g_settings.m_viewStateVideoNavTitles.m_sortMethod);
+ if (params.GetSetId() > -1)
+ SetSortMethod(SORT_METHOD_YEAR);
+ else
+ SetSortMethod(g_settings.m_viewStateVideoNavTitles.m_sortMethod);
SetViewAsControl(g_settings.m_viewStateVideoNavTitles.m_viewMode);
@@ -364,6 +367,8 @@ void CGUIViewStateWindowVideoNav::SaveViewState()
if (m_items.IsVideoDb())
{
NODE_TYPE NodeType = CVideoDatabaseDirectory::GetDirectoryChildType(m_items.GetPath());
+ CQueryParams params;
+ CVideoDatabaseDirectory::GetQueryParams(m_items.GetPath(),params);
switch (NodeType)
{
case NODE_TYPE_ACTOR:
@@ -376,7 +381,7 @@ void CGUIViewStateWindowVideoNav::SaveViewState()
SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavGenres);
break;
case NODE_TYPE_TITLE_MOVIES:
- SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavTitles);
+ SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, params.GetSetId() > -1 ? NULL : &g_settings.m_viewStateVideoNavTitles);
break;
case NODE_TYPE_EPISODES:
SaveViewToDb(m_items.GetPath(), WINDOW_VIDEO_NAV, &g_settings.m_viewStateVideoNavEpisodes);

0 comments on commit 1f24632

Please sign in to comment.