2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
19 class CFileItem
; // forward
23 LABEL_MASKS(const std::string
& strLabelFile
="", const std::string
& strLabel2File
="", const std::string
& strLabelFolder
="", const std::string
& strLabel2Folder
="") :
24 m_strLabelFile(strLabelFile
),
25 m_strLabel2File(strLabel2File
),
26 m_strLabelFolder(strLabelFolder
),
27 m_strLabel2Folder(strLabel2Folder
)
29 std::string m_strLabelFile
;
30 std::string m_strLabel2File
;
31 std::string m_strLabelFolder
;
32 std::string m_strLabel2Folder
;
38 CLabelFormatter(const std::string
&mask
, const std::string
&mask2
);
40 void FormatLabel(CFileItem
*item
) const;
41 void FormatLabel2(CFileItem
*item
) const;
42 void FormatLabels(CFileItem
*item
) const // convenient shorthand
48 bool FillMusicTag(const std::string
&fileName
, MUSIC_INFO::CMusicInfoTag
*tag
) const;
54 CMaskString(const std::string
&prefix
, char content
, const std::string
&postfix
) :
60 std::string m_postfix
;
64 // functions for assembling the mask vectors
65 void AssembleMask(unsigned int label
, const std::string
&mask
);
66 void SplitMask(unsigned int label
, const std::string
&mask
);
68 // functions for retrieving content based on our mask vectors
69 std::string
GetContent(unsigned int label
, const CFileItem
*item
) const;
70 std::string
GetMaskContent(const CMaskString
&mask
, const CFileItem
*item
) const;
71 void FillMusicMaskContent(const char mask
, const std::string
&value
, MUSIC_INFO::CMusicInfoTag
*tag
) const;
73 std::vector
<std::string
> m_staticContent
[2];
74 std::vector
<CMaskString
> m_dynamicContent
[2];
75 bool m_hideFileExtensions
;