mirror of https://github.com/VueTubeApp/VueTube
make search actually work 👍
This commit is contained in:
parent
0bead8043d
commit
295a56e240
|
@ -47,7 +47,7 @@ export default {
|
|||
},
|
||||
|
||||
search(item) {
|
||||
console.log(item);
|
||||
location.href="/search?q="+item[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<v-list-item v-for="(video, index) in videos" :key="index">
|
||||
<v-card>
|
||||
<v-card class="entry">
|
||||
<v-card-title v-text="video.raw.compactVideoRenderer.title.runs[0].text" />
|
||||
<v-card-text>
|
||||
<v-img :src="video.thumbnails[video.thumbnails.length - 1].url" />
|
||||
|
@ -15,6 +15,12 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.entry {
|
||||
margin: 1em;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
|
@ -23,8 +29,10 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
const searchQuestion = this.$route.query.q
|
||||
|
||||
const vm = this;
|
||||
this.$youtube.search("TEST", (data) => {
|
||||
this.$youtube.search(searchQuestion, (data) => {
|
||||
vm.videos = data;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
<section>
|
||||
<div style="color: #999;">This is just a temporary section for messing with the tool while it's still being worked on :)</div>
|
||||
<v-btn to="/watch">Watch Page</v-btn>
|
||||
<v-btn to="/search">Search Page</v-btn>
|
||||
</section>
|
||||
</v-card>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
vidSrc: "https://rr3---sn-ab5szne7.googlevideo.com/videoplayback?expire=1645763099&ei=uwUYYtSHI4LfhwaEnZ6ABg&ip=8.21.13.5&id=o-AEmRDpMZh3cbaO01nQqiY1Q-kA-3bLYhqXdVj-cRdCF3&itag=22&source=youtube&requiressl=yes&mh=Sw&mm=31%2C26&mn=sn-ab5szne7%2Csn-5uaeznyy&ms=au%2Conr&mv=m&mvi=3&pl=24&initcwndbps=2280000&vprv=1&mime=video%2Fmp4&ns=Q5aWzxFtqjKcRjIYToDTXRIG&ratebypass=yes&dur=51.432&lmt=1644587734017831&mt=1645741264&fvip=3&fexp=24001373%2C24007246&c=WEB&txp=5532434&n=-SThIpytHrY1AZDfq&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cratebypass%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgYobPMzfuSBig1g__YwPOiKuNwDnMclv_kqfFLxXra-ACIQCcVOIHCfRcI98Wf_g1wdTCLMDBnOzdBtPL8kTsenjIIQ%3D%3D&sig=AOq0QJ8wRQIgJKQpvQMxCy-o_JsoSkirjx9cXOODoieVIXnnDugZBiMCIQDtIs-ggQJd5ZTXl6gVuAZxju9hh5dSRENbSIT6rgsfaw%3D%3D"
|
||||
vidSrc: "https://api.celeste.photos/squish.mp4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue