diff options
Diffstat (limited to 'xbmc/favourites/GUIViewStateFavourites.cpp')
-rw-r--r-- | xbmc/favourites/GUIViewStateFavourites.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/xbmc/favourites/GUIViewStateFavourites.cpp b/xbmc/favourites/GUIViewStateFavourites.cpp new file mode 100644 index 0000000..7bb5ff1 --- /dev/null +++ b/xbmc/favourites/GUIViewStateFavourites.cpp @@ -0,0 +1,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); +} |