diff --git a/src/MenuLayer.cpp b/src/MenuLayer.cpp index 6d9cc16..64f28f0 100644 --- a/src/MenuLayer.cpp +++ b/src/MenuLayer.cpp @@ -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())); } }; \ No newline at end of file