Fixed invalid timestamp video urls
This commit is contained in:
parent
796bf0e644
commit
96805f9b20
|
@ -127,6 +127,9 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
getFinalUrl(url) {
|
getFinalUrl(url) {
|
||||||
|
if (url.indexOf('?') === -1) {
|
||||||
|
return this.includeTimestamp ? `${url}?t=${this.getTimestamp()}` : url
|
||||||
|
}
|
||||||
return this.includeTimestamp ? `${url}&t=${this.getTimestamp()}` : url
|
return this.includeTimestamp ? `${url}&t=${this.getTimestamp()}` : url
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,6 @@ export default Vue.extend({
|
||||||
|
|
||||||
console.log('getting local trending')
|
console.log('getting local trending')
|
||||||
ytrend.scrape_trending_page(this.region).then((result) => {
|
ytrend.scrape_trending_page(this.region).then((result) => {
|
||||||
console.log(result)
|
|
||||||
const returnData = result.filter((item) => {
|
const returnData = result.filter((item) => {
|
||||||
return item.type === 'video' || item.type === 'channel' || item.type === 'playlist'
|
return item.type === 'video' || item.type === 'channel' || item.type === 'playlist'
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue