Skip to content

Commit 975c8df

Browse files
committed
kill big jason just like rb4
1 parent 8683091 commit 975c8df

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

Encore/src/song/songlist.cpp

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -225,50 +225,6 @@ void SongList::ScanFolder(const std::filesystem::path &folder) {
225225
song.songDir = folder.string();
226226
song.LoadSongIni(folder);
227227
song.ini = true;
228-
if (std::filesystem::exists(infoPath)) {
229-
try {
230-
json infoData;
231-
std::ifstream infoFile(infoPath);
232-
infoFile >> infoData;
233-
infoFile.close();
234-
235-
if (infoData.contains("source") && infoData["source"].is_string()) {
236-
song.source = infoData["source"].get<std::string>();
237-
if (song.source.empty()) {
238-
song.source = "Unknown Source";
239-
}
240-
} else {
241-
song.source = "Unknown Source";
242-
}
243-
244-
if (infoData.contains("release_year") && infoData["release_year"].is_string()) {
245-
song.releaseYear = infoData["release_year"].get<std::string>();
246-
if (song.releaseYear.empty()) {
247-
song.releaseYear = "Unknown Year";
248-
}
249-
} else {
250-
song.releaseYear = "Unknown Year";
251-
}
252-
253-
if (infoData.contains("preview_start_time") && infoData["preview_start_time"].is_number_integer()) {
254-
song.previewStartTime = infoData["preview_start_time"].get<int>();
255-
} else {
256-
song.previewStartTime = 500;
257-
}
258-
259-
Encore::EncoreLog(LOG_INFO, TextFormat("CACHE: Read metadata for INI song %s - %s from %s", song.title.c_str(), song.artist.c_str(), infoPath.string().c_str()));
260-
} catch (const std::exception& e) {
261-
Encore::EncoreLog(LOG_ERROR, TextFormat("CACHE: Failed to read metadata for INI song %s - %s from %s: %s", song.title.c_str(), song.artist.c_str(), infoPath.string().c_str(), e.what()));
262-
song.source = "Unknown Source";
263-
song.releaseYear = "Unknown Year";
264-
song.previewStartTime = 500;
265-
}
266-
} else {
267-
song.source = "Unknown Source";
268-
song.releaseYear = "Unknown Year";
269-
song.previewStartTime = 500;
270-
Encore::EncoreLog(LOG_INFO, TextFormat("CACHE: No info.json for INI song %s - %s, using default metadata", song.title.c_str(), song.artist.c_str()));
271-
}
272228
} else {
273229
// If this folder doesn't have song.ini or song.json, this must be a organizational folder; continue scanning.
274230
for (const auto &entry : std::filesystem::directory_iterator(folder)) {

0 commit comments

Comments
 (0)