Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Utils
MetaData
MetaDataSorting.h
1
/* MetaDataSorting.h */
2
3
/* Copyright (C) 2011-2024 Michael Lugmair (Lucio Carreras)
4
*
5
* This file is part of sayonara player
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef METADATASORTING_H
22
#define METADATASORTING_H
23
24
#include "Utils/Library/Sortorder.h"
25
#include "Utils/globals.h"
26
#include <cstdint>
27
#include <type_traits>
28
29
class
MetaDataList
;
30
class
AlbumList
;
31
class
ArtistList
;
32
33
namespace
MetaDataSorting
34
{
35
enum class
SortMode :
36
uint16_t
37
{
38
None = 0,
39
CaseInsensitive = (1 << 0),
40
IgnoreSpecialChars = (1 << 1),
41
IgnoreDiacryticChars = (1 << 2),
42
IgnoreArticle = (1 << 3)
43
};
44
45
using
SortModeMask = std::underlying_type_t<SortMode>;
46
47
void
sortMetadata(MetaDataList& tracks, Library::TrackSortorder sortOrder, SortModeMask sortMode = +SortMode::None);
48
void
sortAlbums(AlbumList& albums, Library::AlbumSortorder sortOrder, SortModeMask sortMode = +SortMode::None);
49
void
sortArtists(ArtistList& artists, Library::ArtistSortorder sortOrder, SortModeMask sortMode = +SortMode::None);
50
}
51
52
#endif
// METADATASORTING_H
AlbumList
Definition
Album.h:91
ArtistList
Definition
Artist.h:61
MetaDataList
Definition
MetaDataList.h:34
Generated on
for Sayonara Player by
1.17.0