Fix formatting.

This commit is contained in:
Kavin 2022-11-11 21:28:34 +00:00
parent 599540f5a0
commit 47bf276f7a
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -63,10 +63,10 @@
};
},
computed: {
getRssUrl: (_this) => {
getRssUrl: _this => {
return _this.authApiUrl() + "/rss/playlists/" + _this.$route.query.list;
},
isPipedPlaylist: (_this) => {
isPipedPlaylist: _this => {
// regex to determine whether it's a Piped plalylist
return /[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}/.test(
_this.$route.query.list,
@ -81,9 +81,9 @@
headers: {
Authorization: this.getAuthToken(),
},
}).then((json) => {
}).then(json => {
if (json.error) alert(json.error);
else if (json.filter((playlist) => playlist.id === playlistId).length > 0) this.admin = true;
else if (json.filter(playlist => playlist.id === playlistId).length > 0) this.admin = true;
});
},
activated() {
@ -99,7 +99,7 @@
},
async getPlaylistData() {
this.fetchPlaylist()
.then((data) => (this.playlist = data))
.then(data => (this.playlist = data))
.then(() => this.updateTitle());
},
async updateTitle() {
@ -111,11 +111,11 @@
this.loading = true;
this.fetchJson(this.authApiUrl() + "/nextpage/playlists/" + this.$route.query.list, {
nextpage: this.playlist.nextpage,
}).then((json) => {
}).then(json => {
this.playlist.relatedStreams.concat(json.relatedStreams);
this.playlist.nextpage = json.nextpage;
this.loading = false;
json.relatedStreams.map((stream) => this.playlist.relatedStreams.push(stream));
json.relatedStreams.map(stream => this.playlist.relatedStreams.push(stream));
});
}
},
@ -131,7 +131,7 @@
body: JSON.stringify({
playlistId: this.$route.query.list,
}),
}).then((resp) => {
}).then(resp => {
if (!resp.error) {
alert(this.$t("actions.clone_playlist_success"));
} else alert(resp.error);
@ -139,7 +139,7 @@
},
downloadPlaylistAsTxt() {
var data = "";
this.playlist.relatedStreams.forEach((element) => {
this.playlist.relatedStreams.forEach(element => {
data += "https://piped.video" + element.url + "\n";
});
this.download(data, this.playlist.name + ".txt", "text/plain");