mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
Adding metadata to folders
This commit is contained in:
parent
4b6aab6af5
commit
77e09864d9
|
@ -83,28 +83,12 @@ const std::string& FileData::getThumbnailPath() const
|
||||||
|
|
||||||
const std::string& FileData::getVideoPath() const
|
const std::string& FileData::getVideoPath() const
|
||||||
{
|
{
|
||||||
if (mType == GAME)
|
return metadata.get("video");
|
||||||
{
|
|
||||||
return metadata.get("video");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
static std::string empty;
|
|
||||||
return empty;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& FileData::getMarqueePath() const
|
const std::string& FileData::getMarqueePath() const
|
||||||
{
|
{
|
||||||
if (mType == GAME)
|
return metadata.get("marquee");
|
||||||
{
|
|
||||||
return metadata.get("marquee");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
static std::string empty;
|
|
||||||
return empty;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,18 @@ MetaDataDecl gameDecls[] = {
|
||||||
const std::vector<MetaDataDecl> gameMDD(gameDecls, gameDecls + sizeof(gameDecls) / sizeof(gameDecls[0]));
|
const std::vector<MetaDataDecl> gameMDD(gameDecls, gameDecls + sizeof(gameDecls) / sizeof(gameDecls[0]));
|
||||||
|
|
||||||
MetaDataDecl folderDecls[] = {
|
MetaDataDecl folderDecls[] = {
|
||||||
{"name", MD_STRING, "", false},
|
{"name", MD_STRING, "", false, "name", "enter game name"},
|
||||||
{"desc", MD_MULTILINE_STRING, "", false},
|
{"desc", MD_MULTILINE_STRING, "", false, "description", "enter description"},
|
||||||
{"image", MD_PATH, "", false},
|
{"image", MD_PATH, "", false, "image", "enter path to image"},
|
||||||
{"thumbnail", MD_PATH, "", false},
|
{"thumbnail", MD_PATH, "", false, "thumbnail", "enter path to thumbnail"},
|
||||||
|
{"video", MD_PATH, "", false, "video", "enter path to video"},
|
||||||
|
{"marquee", MD_PATH, "", false, "marquee", "enter path to marquee"},
|
||||||
|
{"rating", MD_RATING, "0.000000", false, "rating", "enter rating"},
|
||||||
|
{"releasedate", MD_DATE, "not-a-date-time", false, "release date", "enter release date"},
|
||||||
|
{"developer", MD_STRING, "unknown", false, "developer", "enter game developer"},
|
||||||
|
{"publisher", MD_STRING, "unknown", false, "publisher", "enter game publisher"},
|
||||||
|
{"genre", MD_STRING, "unknown", false, "genre", "enter game genre"},
|
||||||
|
{"players", MD_INT, "1", false, "players", "enter number of players"}
|
||||||
};
|
};
|
||||||
const std::vector<MetaDataDecl> folderMDD(folderDecls, folderDecls + sizeof(folderDecls) / sizeof(folderDecls[0]));
|
const std::vector<MetaDataDecl> folderMDD(folderDecls, folderDecls + sizeof(folderDecls) / sizeof(folderDecls[0]));
|
||||||
|
|
||||||
|
|
|
@ -192,14 +192,15 @@ void DetailedGameListView::updateInfoPanel()
|
||||||
mDescription.setText(file->metadata.get("desc"));
|
mDescription.setText(file->metadata.get("desc"));
|
||||||
mDescContainer.reset();
|
mDescContainer.reset();
|
||||||
|
|
||||||
|
mRating.setValue(file->metadata.get("rating"));
|
||||||
|
mReleaseDate.setValue(file->metadata.get("releasedate"));
|
||||||
|
mDeveloper.setValue(file->metadata.get("developer"));
|
||||||
|
mPublisher.setValue(file->metadata.get("publisher"));
|
||||||
|
mGenre.setValue(file->metadata.get("genre"));
|
||||||
|
mPlayers.setValue(file->metadata.get("players"));
|
||||||
|
|
||||||
if(file->getType() == GAME)
|
if(file->getType() == GAME)
|
||||||
{
|
{
|
||||||
mRating.setValue(file->metadata.get("rating"));
|
|
||||||
mReleaseDate.setValue(file->metadata.get("releasedate"));
|
|
||||||
mDeveloper.setValue(file->metadata.get("developer"));
|
|
||||||
mPublisher.setValue(file->metadata.get("publisher"));
|
|
||||||
mGenre.setValue(file->metadata.get("genre"));
|
|
||||||
mPlayers.setValue(file->metadata.get("players"));
|
|
||||||
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
||||||
mPlayCount.setValue(file->metadata.get("playcount"));
|
mPlayCount.setValue(file->metadata.get("playcount"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,14 +259,15 @@ void VideoGameListView::updateInfoPanel()
|
||||||
mDescription.setText(file->metadata.get("desc"));
|
mDescription.setText(file->metadata.get("desc"));
|
||||||
mDescContainer.reset();
|
mDescContainer.reset();
|
||||||
|
|
||||||
|
mRating.setValue(file->metadata.get("rating"));
|
||||||
|
mReleaseDate.setValue(file->metadata.get("releasedate"));
|
||||||
|
mDeveloper.setValue(file->metadata.get("developer"));
|
||||||
|
mPublisher.setValue(file->metadata.get("publisher"));
|
||||||
|
mGenre.setValue(file->metadata.get("genre"));
|
||||||
|
mPlayers.setValue(file->metadata.get("players"));
|
||||||
|
|
||||||
if(file->getType() == GAME)
|
if(file->getType() == GAME)
|
||||||
{
|
{
|
||||||
mRating.setValue(file->metadata.get("rating"));
|
|
||||||
mReleaseDate.setValue(file->metadata.get("releasedate"));
|
|
||||||
mDeveloper.setValue(file->metadata.get("developer"));
|
|
||||||
mPublisher.setValue(file->metadata.get("publisher"));
|
|
||||||
mGenre.setValue(file->metadata.get("genre"));
|
|
||||||
mPlayers.setValue(file->metadata.get("players"));
|
|
||||||
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
||||||
mPlayCount.setValue(file->metadata.get("playcount"));
|
mPlayCount.setValue(file->metadata.get("playcount"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue