mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Fix formatting.
This commit is contained in:
parent
599540f5a0
commit
47bf276f7a
1 changed files with 139 additions and 139 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue