From e867ab25e9ee157770b3f7b72d0ee91c673550ce Mon Sep 17 00:00:00 2001 From: Shiny Nematoda Date: Sun, 5 Jun 2022 20:35:58 +0530 Subject: [PATCH] Added Sync for Playlists --- README.md | 12 +++ index.html | 5 +- src/App.vue | 14 ++- src/assets/base.css | 2 +- src/components/Modal.vue | 2 +- src/components/NewPlaylist.vue | 178 ++++++++++++++++++++++++++++++--- src/components/Playlists.vue | 17 ++-- src/components/Prefs.vue | 70 ++++++++++++- src/components/StatusBar.vue | 11 +- src/scripts/colors.js | 6 +- src/scripts/fetch.js | 11 +- 11 files changed, 287 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 6f084e1..43e4279 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ A Privacy Respecting Frontend for YouTube Music inspired and built with the help _But if you see any of the following, Please open an issue_ +PS: Please don't forget to support your favorite artists :) + ## Usage ```sh @@ -70,16 +72,26 @@ You can reach out to me personally on: - VueJS -> [MIT][vue] - ViteJS -> [MIT][vite] - hls.js -> [APACHE][hls] +- PeerJS -> [MIT][peer] - Bootstrap Icons -> [MIT][bi] - VueJS theme -> [MIT][vuetheme] - Nord theme -> [MIT][nord] +### Similar Projects + +*Hyperpipe is not affiliated with any of these projects* + +- [Beatbump](https://github.com/snuffyDev/Beatbump) -> Alternative YouTube Music frontend built with Svelte/SvelteKit + +- [Cider](https://github.com/ciderapp/Cider) -> Cross-platform Apple Music experience based on Electron and Vue.js + [hypipe]: https://hyperpipe.surge.sh [piped]: https://piped.kavin.rocks [license]: https://codeberg.org/Hyperpipe/Hyperpipe/src/branch/main/LICENSE.txt [vue]: https://github.com/vuejs/core/blob/main/LICENSE [vite]: https://github.com/vitejs/vite/blob/main/LICENSE [bi]: https://github.com/twbs/icons/blob/main/LICENSE.md +[peer]: https://github.com/peers/peerjs/blob/master/LICENSE [hls]: https://github.com/video-dev/hls.js/blob/master/LICENSE [nord]: https://github.com/arcticicestudio/nord/blob/develop/LICENSE.md [vuetheme]: https://github.com/vuejs/theme/blob/main/LICENSE diff --git a/index.html b/index.html index fa62400..6d4cbd8 100644 --- a/index.html +++ b/index.html @@ -23,6 +23,9 @@ rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css" /> - + + diff --git a/src/App.vue b/src/App.vue index 098bdcf..63a372f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -220,6 +220,17 @@ async function getNext(hash) { !data.urls.filter(s => s.url == data.url)[0] || data.urls.length == 1 ) { + if (useStore().getItem('next') == 'false') { + data.urls = [ + { + title: data.nowtitle, + url: '/watch?v=' + hash, + }, + ]; + setMetadata(); + return; + } + const json = await getJson( 'https://hyperpipeapi.onrender.com/next/' + hash, ); @@ -347,9 +358,8 @@ onBeforeMount(() => { }); onMounted(() => { - if (window.hls) { - window.hls.destroy() + window.hls.destroy(); } useLazyLoad(); diff --git a/src/assets/base.css b/src/assets/base.css index 5ace6aa..4006f0e 100644 --- a/src/assets/base.css +++ b/src/assets/base.css @@ -234,7 +234,7 @@ button { } .bars-wrap { - left: .75rem; + left: 0.75rem; position: absolute; height: 1.5rem; width: 2rem; diff --git a/src/components/Modal.vue b/src/components/Modal.vue index 80ed56e..61799eb 100644 --- a/src/components/Modal.vue +++ b/src/components/Modal.vue @@ -62,7 +62,7 @@ watch(show, n => { } .modal-content * { width: 100%; - padding: .5rem 1rem; + padding: 0.5rem 1rem; } .modal-close { color: var(--color-background); diff --git a/src/components/NewPlaylist.vue b/src/components/NewPlaylist.vue index b165d01..4d21d07 100644 --- a/src/components/NewPlaylist.vue +++ b/src/components/NewPlaylist.vue @@ -1,5 +1,5 @@