diff --git a/core/include/music_manager.h b/core/include/music_manager.h index 44379c4..357c960 100644 --- a/core/include/music_manager.h +++ b/core/include/music_manager.h @@ -38,7 +38,7 @@ class MusicManager : public QObject * * @param Copy of the server musiclist generated by ConfigManager::musiclist(); */ - MusicManager(QStringList f_root_ordered, QStringList f_cdns, QMap> f_root_list, QObject *parent = nullptr); + MusicManager(QStringList f_cdns, MusicList f_root_list, QStringList f_root_ordered, QObject *parent = nullptr); /** * @brief Destructor for the server-wide musiclist manager. diff --git a/core/src/music_manager.cpp b/core/src/music_manager.cpp index 310d35a..ad6c40e 100644 --- a/core/src/music_manager.cpp +++ b/core/src/music_manager.cpp @@ -3,7 +3,7 @@ #include "include/config_manager.h" #include "include/packet/packet_factory.h" -MusicManager::MusicManager(QStringList f_root_ordered, QStringList f_cdns, QMap> f_root_list, QObject *parent) : +MusicManager::MusicManager(QStringList f_cdns, MusicList f_root_list, QStringList f_root_ordered, QObject *parent) : QObject(parent), m_root_list(f_root_list), m_root_ordered(f_root_ordered) diff --git a/core/src/server.cpp b/core/src/server.cpp index 4ef9946..8fdf4d4 100644 --- a/core/src/server.cpp +++ b/core/src/server.cpp @@ -114,7 +114,7 @@ void Server::start() m_backgrounds = ConfigManager::backgrounds(); // Build our music manager. - music_manager = new MusicManager(ConfigManager::ordered_songs(), ConfigManager::cdnList(), ConfigManager::musiclist(), this); + music_manager = new MusicManager(ConfigManager::cdnList(), ConfigManager::musiclist(), ConfigManager::ordered_songs(), this); connect(music_manager, &MusicManager::sendFMPacket, this, &Server::unicast); connect(music_manager, &MusicManager::sendAreaFMPacket, this, QOverload::of(&Server::broadcast)); diff --git a/tests/unittest_music_manager/tst_unittest_music_manager.cpp b/tests/unittest_music_manager/tst_unittest_music_manager.cpp index 76a17a9..2b9e3a1 100644 --- a/tests/unittest_music_manager/tst_unittest_music_manager.cpp +++ b/tests/unittest_music_manager/tst_unittest_music_manager.cpp @@ -84,7 +84,7 @@ void MusicListManager::init() << "Announce The Truth (AJ).opus" << "Announce The Truth (JFA).opus"; - m_music_manager = new MusicManager(l_list, {"my.cdn.com", "your.cdn.com"}, l_test_list, nullptr); + m_music_manager = new MusicManager({"my.cdn.com", "your.cdn.com"}, l_test_list, l_list, nullptr); } void MusicListManager::registerArea()