diff --git a/src/assets/bg_music.svg b/public/bg_music.svg
similarity index 100%
rename from src/assets/bg_music.svg
rename to public/bg_music.svg
diff --git a/src/assets/bg_playlist.svg b/public/bg_playlist.svg
similarity index 100%
rename from src/assets/bg_playlist.svg
rename to public/bg_playlist.svg
diff --git a/src/App.vue b/src/App.vue
index ac2da55..7373531 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -160,8 +160,15 @@ export default {
timeUpdate(t) {
this.time = Math.floor((t / this.duration) * 100);
},
- getJson(url) {
- return fetch(url).then((res) => res.json());
+ async getJson(url) {
+ const res = await fetch(url).then((res) => res.json());
+
+ if (!res.error) {
+ return res;
+ } else {
+ alert(res.message.replaceAll('Video', 'Audio').replaceAll('video', 'audio').replaceAll('watched', 'heard'));
+ console.error(res.message);
+ }
},
setSong(s) {
this.urls = [s];
@@ -255,7 +262,7 @@ export default {
console.log(e);
const json = await this.getJson(
- 'https://hypipeapi.onrender.com/browse/' + e,
+ 'https://hyperpipeapi.onrender.com/channel/' + e,
);
console.log(json);
@@ -485,17 +492,12 @@ button {
}
@media (min-width: 1024px) {
- #app {
- display: flex;
- place-items: center;
- flex-direction: column;
- }
-
main .grid {
display: grid;
grid-template-columns: 1fr 1fr;
}
header {
+ margin: auto;
display: flex;
place-items: center;
}
diff --git a/src/assets/base.css b/src/assets/base.css
index ebd0815..7f87d60 100644
--- a/src/assets/base.css
+++ b/src/assets/base.css
@@ -81,7 +81,7 @@ body {
-moz-osx-font-smoothing: grayscale;
}
.placeholder:empty:before {
- --url: url('./bg_music.svg');
+ --url: url('/bg_music.svg');
content: '';
background-image: var(--url);
background-size: contain;
diff --git a/src/assets/logo.svg b/src/assets/logo.svg
deleted file mode 100644
index bc826fe..0000000
--- a/src/assets/logo.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/Playlists.vue b/src/components/Playlists.vue
index 016fcd4..72751ce 100644
--- a/src/components/Playlists.vue
+++ b/src/components/Playlists.vue
@@ -38,7 +38,7 @@ defineEmits(['playthis']);
overflow-y: auto;
}
.placeholder:empty:before {
- --url: url('../assets/bg_playlist.svg');
+ --url: url('/bg_playlist.svg');
}
.placeholder:empty:after {
--text: 'Add Songs to Your Playlist...';
diff --git a/src/components/Search.vue b/src/components/Search.vue
index f50335a..fbdad5b 100644
--- a/src/components/Search.vue
+++ b/src/components/Search.vue
@@ -29,11 +29,11 @@ defineEmits([
:author="song.uploaderName || ''"
:title="song.title || song.name"
:channel="song.uploaderUrl || ''"
- :play="song.url || song.watchId"
+ :play="song.url || '/watch?v=' + song.videoId"
@open-song="
$emit('get-song', {
- url: song.url || song.watchId,
- title: song.title,
+ url: song.url || '/watch?v=' + song.id,
+ title: song.title || song.name,
})
"
@get-artist="
@@ -72,7 +72,7 @@ defineEmits([
@open-album="
$emit(
'get-album',
- album.url || '/playlist?list=' + album.playlistId,
+ album.url || '/playlist?list=' + album.id,
)
" />
@@ -89,7 +89,7 @@ defineEmits([
:author="artist.subtitle"
:name="artist.title"
:art="'--art: url(' + artist.thumbnails[0].url + ');'"
- @open-album="$emit('get-artist', artist.artistId)" />
+ @open-album="$emit('get-artist', artist.id)" />
diff --git a/src/components/SongItem.vue b/src/components/SongItem.vue
index 9fcc74f..02cde4e 100644
--- a/src/components/SongItem.vue
+++ b/src/components/SongItem.vue
@@ -10,15 +10,17 @@ defineEmits(['get-artist']);
+
{{ title }}
{{ author }}
+ class="ign">
+ {{ author.replaceAll(' - Topic', '') }}
+
+