Merge pull request #320 from AttorneyOnline/Fix-Musiclist-Loading-Order
Fix empty musiclist due to incorrect loading order
This commit is contained in:
commit
81da1db622
@ -38,7 +38,7 @@ class MusicManager : public QObject
|
|||||||
*
|
*
|
||||||
* @param Copy of the server musiclist generated by ConfigManager::musiclist();
|
* @param Copy of the server musiclist generated by ConfigManager::musiclist();
|
||||||
*/
|
*/
|
||||||
MusicManager(QStringList f_root_ordered, QStringList f_cdns, QMap<QString, QPair<QString, int>> 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.
|
* @brief Destructor for the server-wide musiclist manager.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "include/config_manager.h"
|
#include "include/config_manager.h"
|
||||||
#include "include/packet/packet_factory.h"
|
#include "include/packet/packet_factory.h"
|
||||||
|
|
||||||
MusicManager::MusicManager(QStringList f_root_ordered, QStringList f_cdns, QMap<QString, QPair<QString, int>> f_root_list, QObject *parent) :
|
MusicManager::MusicManager(QStringList f_cdns, MusicList f_root_list, QStringList f_root_ordered, QObject *parent) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
m_root_list(f_root_list),
|
m_root_list(f_root_list),
|
||||||
m_root_ordered(f_root_ordered)
|
m_root_ordered(f_root_ordered)
|
||||||
|
@ -114,7 +114,7 @@ void Server::start()
|
|||||||
m_backgrounds = ConfigManager::backgrounds();
|
m_backgrounds = ConfigManager::backgrounds();
|
||||||
|
|
||||||
// Build our music manager.
|
// 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::sendFMPacket, this, &Server::unicast);
|
||||||
connect(music_manager, &MusicManager::sendAreaFMPacket, this, QOverload<AOPacket *, int>::of(&Server::broadcast));
|
connect(music_manager, &MusicManager::sendAreaFMPacket, this, QOverload<AOPacket *, int>::of(&Server::broadcast));
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ void MusicListManager::init()
|
|||||||
<< "Announce The Truth (AJ).opus"
|
<< "Announce The Truth (AJ).opus"
|
||||||
<< "Announce The Truth (JFA).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()
|
void MusicListManager::registerArea()
|
||||||
|
Loading…
Reference in New Issue
Block a user