summaryrefslogtreecommitdiffstats
path: root/xbmc/favourites/GUIViewStateFavourites.cpp
blob: 7bb5ff11950942b97343d72d90c2da30afdb88eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 *  Copyright (C) 2022 Team Kodi
 *  This file is part of Kodi - https://kodi.tv
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 *  See LICENSES/README.md for more information.
 */

#include "GUIViewStateFavourites.h"

#include "FileItem.h"
#include "guilib/WindowIDs.h"

CGUIViewStateFavourites::CGUIViewStateFavourites(const CFileItemList& items) : CGUIViewState(items)
{
  AddSortMethod(SortByUserPreference, 19349,
                LABEL_MASKS("%L", "", "%L", "")); // Label, empty | Label, empty
  AddSortMethod(SortByLabel, 551, LABEL_MASKS("%L", "", "%L", "")); // Label, empty | Label, empty

  SetSortMethod(SortByUserPreference);

  LoadViewState(items.GetPath(), WINDOW_FAVOURITES);
}

void CGUIViewStateFavourites::SaveViewState()
{
  SaveViewToDb(m_items.GetPath(), WINDOW_FAVOURITES);
}