Rename group.ini back to pack.ini to avoid conflict with the existing waiei standard.See: https://github.com/waiei/Group.ini-lua
This commit is contained in:
+9
-9
@@ -22,7 +22,7 @@ Group::Group() {
|
|||||||
m_sTranslitTitle = "";
|
m_sTranslitTitle = "";
|
||||||
m_sSeries = "";
|
m_sSeries = "";
|
||||||
m_fSyncOffset = 0;
|
m_fSyncOffset = 0;
|
||||||
m_bHasGroupIni = false;
|
m_bHasPackIni = false;
|
||||||
m_iYearReleased = 0;
|
m_iYearReleased = 0;
|
||||||
m_sBannerPath = "";
|
m_sBannerPath = "";
|
||||||
m_sCredits.clear();
|
m_sCredits.clear();
|
||||||
@@ -35,7 +35,7 @@ Group::~Group() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Group::Group(const RString& sDir, const RString& sGroupDirName) {
|
Group::Group(const RString& sDir, const RString& sGroupDirName) {
|
||||||
RString sGroupIniPath = sDir + sGroupDirName + "/Group.ini";
|
RString sPackIniPath = sDir + sGroupDirName + "/pack.ini";
|
||||||
RString credits = "";
|
RString credits = "";
|
||||||
RString sDisplayTitle = sGroupDirName;
|
RString sDisplayTitle = sGroupDirName;
|
||||||
RString SortTitle = sGroupDirName;
|
RString SortTitle = sGroupDirName;
|
||||||
@@ -45,9 +45,9 @@ Group::Group(const RString& sDir, const RString& sGroupDirName) {
|
|||||||
RString authorsNotes = "";
|
RString authorsNotes = "";
|
||||||
float fOffset = PREFSMAN->m_fDefaultGroupOffsetSeconds;
|
float fOffset = PREFSMAN->m_fDefaultGroupOffsetSeconds;
|
||||||
|
|
||||||
if (FILEMAN->DoesFileExist(sGroupIniPath)) {
|
if (FILEMAN->DoesFileExist(sPackIniPath)) {
|
||||||
IniFile ini;
|
IniFile ini;
|
||||||
ini.ReadFile(sGroupIniPath);
|
ini.ReadFile(sPackIniPath);
|
||||||
ini.GetValue("Group", "DisplayTitle", sDisplayTitle);
|
ini.GetValue("Group", "DisplayTitle", sDisplayTitle);
|
||||||
Trim(sDisplayTitle);
|
Trim(sDisplayTitle);
|
||||||
if (sDisplayTitle.empty()) {
|
if (sDisplayTitle.empty()) {
|
||||||
@@ -82,13 +82,13 @@ Group::Group(const RString& sDir, const RString& sGroupDirName) {
|
|||||||
ini.GetValue("Group", "Credits", credits);
|
ini.GetValue("Group", "Credits", credits);
|
||||||
ini.GetValue("Group", "AuthorsNotes", authorsNotes);
|
ini.GetValue("Group", "AuthorsNotes", authorsNotes);
|
||||||
} else {
|
} else {
|
||||||
m_bHasGroupIni = false;
|
m_bHasPackIni = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look for a group banner in this group folder
|
// Look for a group banner in this group folder
|
||||||
std::vector<RString> arrayGroupBanners;
|
std::vector<RString> arrayGroupBanners;
|
||||||
|
|
||||||
// First check if there is a banner provided in group.ini
|
// First check if there is a banner provided in pack.ini
|
||||||
if(!bannerPath.empty())
|
if(!bannerPath.empty())
|
||||||
{
|
{
|
||||||
GetDirListing(sDir + sGroupDirName + "/" + bannerPath, arrayGroupBanners);
|
GetDirListing(sDir + sGroupDirName + "/" + bannerPath, arrayGroupBanners);
|
||||||
@@ -205,9 +205,9 @@ public:
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int HasGroupIni(T* p, lua_State *L)
|
static int HasPackIni(T* p, lua_State *L)
|
||||||
{
|
{
|
||||||
lua_pushboolean(L, p->HasGroupIni());
|
lua_pushboolean(L, p->HasPackIni());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ public:
|
|||||||
ADD_METHOD(GetTranslitTitle);
|
ADD_METHOD(GetTranslitTitle);
|
||||||
ADD_METHOD(GetSeries);
|
ADD_METHOD(GetSeries);
|
||||||
ADD_METHOD(GetSyncOffset);
|
ADD_METHOD(GetSyncOffset);
|
||||||
ADD_METHOD(HasGroupIni);
|
ADD_METHOD(HasPackIni);
|
||||||
ADD_METHOD(GetBannerPath);
|
ADD_METHOD(GetBannerPath);
|
||||||
ADD_METHOD(GetStepArtistCredits);
|
ADD_METHOD(GetStepArtistCredits);
|
||||||
ADD_METHOD(GetAuthorsNotes);
|
ADD_METHOD(GetAuthorsNotes);
|
||||||
|
|||||||
+5
-5
@@ -78,11 +78,11 @@ public:
|
|||||||
float GetSyncOffset() const { return m_fSyncOffset; };
|
float GetSyncOffset() const { return m_fSyncOffset; };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Whether the group has a group.ini file.
|
* @brief Whether the group has a pack.ini file.
|
||||||
*
|
*
|
||||||
* @return true if the group has a group.ini file, false otherwise.
|
* @return true if the group has a pack.ini file, false otherwise.
|
||||||
*/
|
*/
|
||||||
bool HasGroupIni() const { return m_bHasGroupIni; };
|
bool HasPackIni() const { return m_bHasPackIni; };
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -142,8 +142,8 @@ public:
|
|||||||
/** @brief Defines the offset applied to all songs within the group. */
|
/** @brief Defines the offset applied to all songs within the group. */
|
||||||
float m_fSyncOffset;
|
float m_fSyncOffset;
|
||||||
|
|
||||||
/** @brief Whether the group has a group.ini file. */
|
/** @brief Whether the group has a pack.ini file. */
|
||||||
bool m_bHasGroupIni;
|
bool m_bHasPackIni;
|
||||||
|
|
||||||
/** @brief The path to the group's banner. */
|
/** @brief The path to the group's banner. */
|
||||||
RString m_sBannerPath;
|
RString m_sBannerPath;
|
||||||
|
|||||||
Reference in New Issue
Block a user