Loading client/localapi.cpp +4 −0 Changes for client/localapi.cpp: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -237,6 +237,10 @@ void LocalApi::setIgnoreSslErrors(bool ignore) { _pub->setIgnoreSslErrors(ignore); } QString LocalApi::serverUrl() const { return _pub->serverUrl(); } void LocalApi::fetchAlbums() { QJsonArray cmds; QJsonObject cmd; Loading client/localapi.h +1 −0 Changes for client/localapi.h: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ public: Q_INVOKABLE void disconnectServer(); Q_INVOKABLE void abortConnection(); Q_INVOKABLE void setIgnoreSslErrors(bool ignore); Q_INVOKABLE QString serverUrl() const; /* Initial load */ Q_INVOKABLE void refresh(); Loading client/publishclient.h +1 −0 Changes for client/publishclient.h: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ public: bool isConfigured() const; void setServerUrl(const QString &url); QString serverUrl() const { return _serverUrl; } void setAuthToken(const QString &token); using Callback = std::function<void(bool ok, const QString &message)>; Loading client/qml/MediaBrowser.qml +5 −2 Changes for client/qml/MediaBrowser.qml: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -167,9 +167,12 @@ Dialog { function onMediaLoaded(json) { var resp = JSON.parse(json) var items = resp.media || [] /* Build thumb URLs with ?w=100&h=100 */ var base = localApi.serverUrl() /* Build full thumb URLs */ for (var i = 0; i < items.length; i++) { if (items[i].url && !items[i].thumb) if (items[i].url && items[i].url.charAt(0) === '/') items[i].url = base + items[i].url if (!items[i].thumb) items[i].thumb = items[i].url + "?w=100&h=100" } mediaGrid.model = items Loading Loading
client/localapi.cpp +4 −0 Changes for client/localapi.cpp: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -237,6 +237,10 @@ void LocalApi::setIgnoreSslErrors(bool ignore) { _pub->setIgnoreSslErrors(ignore); } QString LocalApi::serverUrl() const { return _pub->serverUrl(); } void LocalApi::fetchAlbums() { QJsonArray cmds; QJsonObject cmd; Loading
client/localapi.h +1 −0 Changes for client/localapi.h: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ public: Q_INVOKABLE void disconnectServer(); Q_INVOKABLE void abortConnection(); Q_INVOKABLE void setIgnoreSslErrors(bool ignore); Q_INVOKABLE QString serverUrl() const; /* Initial load */ Q_INVOKABLE void refresh(); Loading
client/publishclient.h +1 −0 Changes for client/publishclient.h: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ public: bool isConfigured() const; void setServerUrl(const QString &url); QString serverUrl() const { return _serverUrl; } void setAuthToken(const QString &token); using Callback = std::function<void(bool ok, const QString &message)>; Loading
client/qml/MediaBrowser.qml +5 −2 Changes for client/qml/MediaBrowser.qml: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -167,9 +167,12 @@ Dialog { function onMediaLoaded(json) { var resp = JSON.parse(json) var items = resp.media || [] /* Build thumb URLs with ?w=100&h=100 */ var base = localApi.serverUrl() /* Build full thumb URLs */ for (var i = 0; i < items.length; i++) { if (items[i].url && !items[i].thumb) if (items[i].url && items[i].url.charAt(0) === '/') items[i].url = base + items[i].url if (!items[i].thumb) items[i].thumb = items[i].url + "?w=100&h=100" } mediaGrid.model = items Loading