Skip to content

Commit

Permalink
bugs?
Browse files Browse the repository at this point in the history
  • Loading branch information
RayDeeUx committed Sep 28, 2024
1 parent cbb1da2 commit e7d95ae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/MenuLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,18 @@ class $modify(MenuLayerMLHook, MenuLayer) {
std::string songName = Utils::getSongName();
std::string songArtist = Utils::getSongArtist();
int songID = Utils::getSongID();
std::string customSong = Utils::currentCustomSong();
if (!useCustomSongs) toWriteToFile = toWriteToFile.append(fmt::format(" # Song: {} by {}", songName, songArtist));
auto test = utils::file::readString(m_fields->blacklistFile);
if (test.isErr()) return log::info("error reading blacklist file!");
auto result = geode::utils::file::writeString(m_fields->blacklistFile, test.unwrap().append(fmt::format("\n{}", toWriteToFile)));
auto result = geode::utils::file::writeString(m_fields->blacklistFile, test.unwrap().append(fmt::format("{}", toWriteToFile)));
if (result.isErr()) return log::info("error blacklisting song {}", currentSong);
if (!useCustomSongs) Utils::makeNewCard(fmt::format("Blacklisted {} by {} ({})!", songName, songArtist, songID));
else Utils::makeNewCard(fmt::format("Blacklisted {})!", Utils::currentCustomSong()));
m_fields->songManager.clearSongs();
Utils::populateVector(useCustomSongs);
if (!Utils::getBool("playlistMode")) Utils::setNewSong();
else Utils::playlistModeNewSong();
if (!Utils::getBool("enableNotification")) return;
if (!useCustomSongs) Utils::makeNewCard(fmt::format("Blacklisted {} by {} ({}), now playing {}.", songName, songArtist, songID, Utils::getSongName()));
else if (!customSong.empty()) Utils::makeNewCard(fmt::format("Blacklisted {}, now playing {}.", customSong, Utils::currentCustomSong()));
}
};

0 comments on commit e7d95ae

Please sign in to comment.