Merge branch 'music_list_update'
This commit is contained in:
commit
280abedf63
@ -64,6 +64,8 @@ public:
|
|||||||
void append_evidence(evi_type p_evi){evidence_list.append(p_evi);}
|
void append_evidence(evi_type p_evi){evidence_list.append(p_evi);}
|
||||||
void append_music(QString f_music){music_list.append(f_music);}
|
void append_music(QString f_music){music_list.append(f_music);}
|
||||||
void append_area(QString f_area){area_list.append(f_area);}
|
void append_area(QString f_area){area_list.append(f_area);}
|
||||||
|
void clear_music(){music_list.clear();}
|
||||||
|
void clear_areas(){area_list.clear();}
|
||||||
|
|
||||||
void fix_last_area()
|
void fix_last_area()
|
||||||
{
|
{
|
||||||
|
@ -981,9 +981,9 @@ void Courtroom::list_areas()
|
|||||||
for (int n_area = 0 ; n_area < area_list.size() ; ++n_area)
|
for (int n_area = 0 ; n_area < area_list.size() ; ++n_area)
|
||||||
{
|
{
|
||||||
QString i_area = "";
|
QString i_area = "";
|
||||||
i_area.append("[");
|
// i_area.append("[");
|
||||||
i_area.append(QString::number(n_area));
|
// i_area.append(QString::number(n_area));
|
||||||
i_area.append("] ");
|
// i_area.append("] ");
|
||||||
|
|
||||||
i_area.append(area_list.at(n_area));
|
i_area.append(area_list.at(n_area));
|
||||||
|
|
||||||
|
@ -525,6 +525,48 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
|
|||||||
|
|
||||||
send_server_packet(new AOPacket("RD#%"));
|
send_server_packet(new AOPacket("RD#%"));
|
||||||
}
|
}
|
||||||
|
else if (header == "FM")
|
||||||
|
{
|
||||||
|
if (!courtroom_constructed)
|
||||||
|
goto end;
|
||||||
|
|
||||||
|
w_courtroom->clear_music();
|
||||||
|
w_courtroom->clear_areas();
|
||||||
|
|
||||||
|
bool musics_time = false;
|
||||||
|
int areas = 0;
|
||||||
|
|
||||||
|
for (int n_element = 0 ; n_element < f_contents.size() ; ++n_element)
|
||||||
|
{
|
||||||
|
if (musics_time)
|
||||||
|
{
|
||||||
|
w_courtroom->append_music(f_contents.at(n_element));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (f_contents.at(n_element).endsWith(".wav") ||
|
||||||
|
f_contents.at(n_element).endsWith(".mp3") ||
|
||||||
|
f_contents.at(n_element).endsWith(".mp4") ||
|
||||||
|
f_contents.at(n_element).endsWith(".ogg") ||
|
||||||
|
f_contents.at(n_element).endsWith(".opus"))
|
||||||
|
{
|
||||||
|
musics_time = true;
|
||||||
|
w_courtroom->fix_last_area();
|
||||||
|
w_courtroom->append_music(f_contents.at(n_element));
|
||||||
|
areas--;
|
||||||
|
// qDebug() << "wtf!!" << f_contents.at(n_element);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
w_courtroom->append_area(f_contents.at(n_element));
|
||||||
|
areas++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
w_courtroom->list_music();
|
||||||
|
w_courtroom->list_areas();
|
||||||
|
}
|
||||||
else if (header == "DONE")
|
else if (header == "DONE")
|
||||||
{
|
{
|
||||||
if (!courtroom_constructed)
|
if (!courtroom_constructed)
|
||||||
|
Loading…
Reference in New Issue
Block a user