aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/aoapplication.h10
-rw-r--r--src/packet_distribution.cpp10
2 files changed, 20 insertions, 0 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h
index 7f7f3e12..835c7fd9 100644
--- a/include/aoapplication.h
+++ b/include/aoapplication.h
@@ -501,6 +501,16 @@ public:
// The file name of the log file in base/logs.
QString log_filename;
+ /**
+ * @brief A QString of an URL that defines the content repository
+ * send by the server.
+ *
+ * @details Introduced in Version 2.9.2.
+ * Addresses the issue of contenturl devlivery for WebAO
+ * without relying on someone adding the link manually.
+ */
+ QString asset_url;
+
void initBASS();
static void load_bass_opus_plugin();
static void CALLBACK BASSreset(HSTREAM handle, DWORD channel, DWORD data,
diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp
index dc76ec1a..28607207 100644
--- a/src/packet_distribution.cpp
+++ b/src/packet_distribution.cpp
@@ -703,6 +703,16 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
w_courtroom->on_authentication_state_received(authenticated);
}
+ //AssetURL Packet
+ else if (header == "ASS") {
+ if (f_contents.size() > 1) { // This can never be more than one link.
+ goto end;
+ }
+ QUrl t_asset_url = QUrl::fromPercentEncoding(f_contents.at(0).toUtf8());
+ if (t_asset_url.isValid())
+ asset_url = t_asset_url.toString();
+ }
+
end:
delete p_packet;