@@ -15,7 +15,10 @@
@@ -59,6 +62,10 @@ export default {
getRssUrl: _this => {
return _this.authApiUrl() + "/rss/playlists/" + _this.$route.query.list;
},
+ isPipedPlaylist() {
+ // FIXME: this checks whether it's a YouTube or a Piped playlist
+ return this.$route.query.list.includes("-");
+ },
},
mounted() {
this.getPlaylistData();
@@ -109,6 +116,22 @@ export default {
removeVideo(index) {
this.playlist.relatedStreams.splice(index, 1);
},
+ async clonePlaylist() {
+ const playlistId = this.$route.query.list;
+ this.fetchJson(this.authApiUrl() + "/import/playlist", null, {
+ method: "POST",
+ headers: {
+ Authorization: this.getAuthToken(),
+ },
+ body: JSON.stringify({
+ playlistId: playlistId,
+ }),
+ }).then(resp => {
+ if (!resp.error) {
+ alert(this.$t("actions.clone_playlist_success"));
+ } else alert(resp.error);
+ });
+ },
},
};
diff --git a/src/components/PreferencesPage.vue b/src/components/PreferencesPage.vue
index 7dc68ae8..a797a2ff 100644
--- a/src/components/PreferencesPage.vue
+++ b/src/components/PreferencesPage.vue
@@ -244,7 +244,7 @@
class="input w-auto"
type="password"
/>
-
+
diff --git a/src/components/SearchResults.vue b/src/components/SearchResults.vue
index 7cc1c08a..0e16f69a 100644
--- a/src/components/SearchResults.vue
+++ b/src/components/SearchResults.vue
@@ -1,5 +1,5 @@