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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/*
* Copyright (C) 2017-2018 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.
*/
#pragma once
// LibExportSettings.h: interface for the CLibExportSettings class.
//
//////////////////////////////////////////////////////////////////////
#include "settings/lib/Setting.h"
#include <string>
// Enumeration of library export options (possibly OR'd together)
enum ELIBEXPORTOPTIONS
{
ELIBEXPORT_SINGLEFILE = 0x0000,
ELIBEXPORT_SEPARATEFILES = 0x0001,
ELIBEXPORT_TOLIBRARYFOLDER = 0x0002,
ELIBEXPORT_OVERWRITE = 0x0004,
ELIBEXPORT_UNSCRAPED = 0x0008,
ELIBEXPORT_ALBUMS = 0x0010,
ELIBEXPORT_ALBUMARTISTS = 0x0020,
ELIBEXPORT_SONGARTISTS = 0x0040,
ELIBEXPORT_OTHERARTISTS = 0x0080,
ELIBEXPORT_ARTWORK = 0x0100,
ELIBEXPORT_NFOFILES = 0x0200,
ELIBEXPORT_ACTORTHUMBS = 0x0400,
ELIBEXPORT_ARTISTFOLDERS = 0x0800,
ELIBEXPORT_SONGS = 0x1000
};
class CLibExportSettings
{
public:
CLibExportSettings();
~CLibExportSettings() = default;
bool operator!=(const CLibExportSettings &right) const;
bool IsItemExported(ELIBEXPORTOPTIONS item) const;
bool IsArtists() const;
std::vector<int> GetExportItems() const;
std::vector<int> GetLimitedItems(int items) const;
void ClearItems() { m_itemstoexport = 0; }
void AddItem(ELIBEXPORTOPTIONS item) { m_itemstoexport += item; }
unsigned int GetItemsToExport() { return m_itemstoexport; }
void SetItemsToExport(int itemstoexport) { m_itemstoexport = static_cast<unsigned int>(itemstoexport); }
unsigned int GetExportType() { return m_exporttype; }
void SetExportType(int exporttype) { m_exporttype = static_cast<unsigned int>(exporttype); }
bool IsSingleFile() const;
bool IsSeparateFiles() const;
bool IsToLibFolders() const;
bool IsArtistFoldersOnly() const;
std::string m_strPath;
bool m_overwrite;
bool m_artwork;
bool m_unscraped;
bool m_skipnfo;
private:
unsigned int m_exporttype; //singlefile, separate files, to library folder
unsigned int m_itemstoexport;
};
|