mirror of
https://github.com/TeamPiped/Piped.git
synced 2026-03-15 13:07:00 +00:00
feat: allow setting API, proxy, and frontend URLs at build time (#3284)
This commit is contained in:
@@ -117,7 +117,7 @@ const mixin = {
|
||||
} else return defaultVal;
|
||||
},
|
||||
apiUrl() {
|
||||
return this.getPreferenceString("instance", "https://pipedapi.kavin.rocks");
|
||||
return this.getPreferenceString("instance", import.meta.env.VITE_PIPED_API);
|
||||
},
|
||||
authApiUrl() {
|
||||
if (this.getPreferenceBoolean("authInstance", false)) {
|
||||
@@ -347,7 +347,7 @@ const mixin = {
|
||||
id: playlistId,
|
||||
name: name,
|
||||
description: "",
|
||||
thumbnail: "https://pipedproxy.kavin.rocks/?host=i.ytimg.com",
|
||||
thumbnail: import.meta.env.VITE_PIPED_PROXY + "/?host=i.ytimg.com",
|
||||
videoIds: "[]", // empty list
|
||||
});
|
||||
return { playlistId: playlistId };
|
||||
@@ -471,7 +471,7 @@ const mixin = {
|
||||
const videoIds = JSON.parse(playlist.videoIds);
|
||||
videoIds.splice(index, 1);
|
||||
playlist.videoIds = JSON.stringify(videoIds);
|
||||
if (videoIds.length == 0) playlist.thumbnail = "https://pipedproxy.kavin.rocks/?host=i.ytimg.com";
|
||||
if (videoIds.length == 0) playlist.thumbnail = import.meta.env.VITE_PIPED_PROXY + "/?host=i.ytimg.com";
|
||||
this.createOrUpdateLocalPlaylist(playlist);
|
||||
return { message: "ok" };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user