mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
unauthenticated rss
This commit is contained in:
parent
5327a0ba58
commit
f18388c828
1 changed files with 12 additions and 8 deletions
|
@ -41,7 +41,8 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
getRssUrl(_this) {
|
getRssUrl(_this) {
|
||||||
return _this.authApiUrl() + "/feed/rss?authToken=" + _this.getAuthToken();
|
if (_this.authenticated) return _this.authApiUrl() + "/feed/rss?authToken=" + _this.getAuthToken();
|
||||||
|
else return _this.authApiUrl() + "/feed/unauthenticated/rss?channels=" + _this.getUnauthenticatedChannels();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -69,14 +70,8 @@ export default {
|
||||||
authToken: this.getAuthToken(),
|
authToken: this.getAuthToken(),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const localSubscriptions = this.getLocalSubscriptions();
|
|
||||||
var channels = "";
|
|
||||||
localSubscriptions.forEach((element, index) => {
|
|
||||||
channels += element;
|
|
||||||
if (localSubscriptions.size != index) channels += ",";
|
|
||||||
});
|
|
||||||
return await this.fetchJson(this.authApiUrl() + "/feed/unauthenticated", {
|
return await this.fetchJson(this.authApiUrl() + "/feed/unauthenticated", {
|
||||||
channels: channels,
|
channels: this.getUnauthenticatedChannels(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -90,6 +85,15 @@ export default {
|
||||||
this.loadMoreVideos();
|
this.loadMoreVideos();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getUnauthenticatedChannels() {
|
||||||
|
const localSubscriptions = this.getLocalSubscriptions();
|
||||||
|
var channels = "";
|
||||||
|
localSubscriptions.forEach((element, index) => {
|
||||||
|
channels += element;
|
||||||
|
if (localSubscriptions.size != index) channels += ",";
|
||||||
|
});
|
||||||
|
return channels;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue