Fix playlist user links, fix mini playlist card in watch page. Update dependencies.
This commit is contained in:
parent
80b60f6d32
commit
160eae91c5
16
package.json
16
package.json
|
@ -41,7 +41,7 @@
|
||||||
"youtube-comments-fetch": "^1.0.1",
|
"youtube-comments-fetch": "^1.0.1",
|
||||||
"youtube-comments-task": "^1.3.15",
|
"youtube-comments-task": "^1.3.15",
|
||||||
"youtube-suggest": "^1.1.0",
|
"youtube-suggest": "^1.1.0",
|
||||||
"yt-channel-info": "^1.0.3",
|
"yt-channel-info": "^1.1.0",
|
||||||
"yt-trending-scraper": "^1.0.3",
|
"yt-trending-scraper": "^1.0.3",
|
||||||
"yt-xml2vtt": "^1.1.2",
|
"yt-xml2vtt": "^1.1.2",
|
||||||
"ytdl-core": "^3.2.2",
|
"ytdl-core": "^3.2.2",
|
||||||
|
@ -55,19 +55,19 @@
|
||||||
"@babel/plugin-proposal-object-rest-spread": "^7.11.0",
|
"@babel/plugin-proposal-object-rest-spread": "^7.11.0",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-typescript": "^7.10.4",
|
"@babel/preset-typescript": "^7.10.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^3.10.0",
|
"@typescript-eslint/eslint-plugin": "^3.10.1",
|
||||||
"@typescript-eslint/parser": "^3.10.0",
|
"@typescript-eslint/parser": "^3.10.1",
|
||||||
"acorn": "^8.0.1",
|
"acorn": "^8.0.1",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"copy-webpack-plugin": "^6.0.3",
|
"copy-webpack-plugin": "^6.0.3",
|
||||||
"css-loader": "^4.2.2",
|
"css-loader": "^4.2.2",
|
||||||
"devtron": "^1.4.0",
|
"devtron": "^1.4.0",
|
||||||
"electron": "^10.0.0",
|
"electron": "^10.0.1",
|
||||||
"electron-builder": "^22.8.0",
|
"electron-builder": "^22.8.0",
|
||||||
"electron-builder-squirrel-windows": "^22.8.1",
|
"electron-builder-squirrel-windows": "^22.8.1",
|
||||||
"electron-debug": "^3.1.0",
|
"electron-debug": "^3.1.0",
|
||||||
"electron-rebuild": "^2.0.0",
|
"electron-rebuild": "^2.0.1",
|
||||||
"eslint": "^7.7.0",
|
"eslint": "^7.7.0",
|
||||||
"eslint-config-prettier": "^6.11.0",
|
"eslint-config-prettier": "^6.11.0",
|
||||||
"eslint-config-standard": "^14.1.1",
|
"eslint-config-standard": "^14.1.1",
|
||||||
|
@ -81,13 +81,13 @@
|
||||||
"file-loader": "^6.0.0",
|
"file-loader": "^6.0.0",
|
||||||
"html-webpack-plugin": "^4.3.0",
|
"html-webpack-plugin": "^4.3.0",
|
||||||
"jest": "^26.4.2",
|
"jest": "^26.4.2",
|
||||||
"mini-css-extract-plugin": "^0.10.0",
|
"mini-css-extract-plugin": "^0.11.0",
|
||||||
"node-abi": "^2.19.1",
|
"node-abi": "^2.19.1",
|
||||||
"node-loader": "^1.0.1",
|
"node-loader": "^1.0.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"prettier": "^2.1.0",
|
"prettier": "^2.1.1",
|
||||||
"sass": "^1.26.10",
|
"sass": "^1.26.10",
|
||||||
"sass-loader": "^10.0.0",
|
"sass-loader": "^10.0.1",
|
||||||
"style-loader": "^1.2.1",
|
"style-loader": "^1.2.1",
|
||||||
"tree-kill": "1.2.2",
|
"tree-kill": "1.2.2",
|
||||||
"typescript": "^4.0.2",
|
"typescript": "^4.0.2",
|
||||||
|
|
|
@ -270,7 +270,21 @@ export default Vue.extend({
|
||||||
this.channelThumbnail = result.author.avatar
|
this.channelThumbnail = result.author.avatar
|
||||||
this.channelId = result.author.id
|
this.channelId = result.author.id
|
||||||
|
|
||||||
this.playlistItems = result.items
|
this.playlistItems = result.items.map((video) => {
|
||||||
|
if (video.author.name !== null) {
|
||||||
|
const channelName = video.author.name
|
||||||
|
const channelId = video.author.ref.replace(/https:\/\/(www\.)?youtube\.com\/(user|channel)\//g, '')
|
||||||
|
video.author = channelName
|
||||||
|
video.authorId = channelId
|
||||||
|
} else {
|
||||||
|
video.author = ''
|
||||||
|
video.authorId = ''
|
||||||
|
}
|
||||||
|
video.videoId = video.id
|
||||||
|
video.lengthSeconds = video.duration
|
||||||
|
return video
|
||||||
|
})
|
||||||
|
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
|
|
@ -132,12 +132,10 @@ const actions = {
|
||||||
ytGetVideoInformation ({}, videoId) {
|
ytGetVideoInformation ({}, videoId) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
console.log('Getting video info please wait...')
|
console.log('Getting video info please wait...')
|
||||||
ytdl.getInfo(videoId).then((result, err) => {
|
ytdl.getInfo(videoId).then((result) => {
|
||||||
if (err) {
|
resolve(result)
|
||||||
reject(err)
|
}).catch((err) => {
|
||||||
} else {
|
reject(err)
|
||||||
resolve(result)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,10 +93,17 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
this.playlistItems = result.items.map((video) => {
|
this.playlistItems = result.items.map((video) => {
|
||||||
|
if (video.author.name !== null) {
|
||||||
|
const channelName = video.author.name
|
||||||
|
const channelId = video.author.ref.replace(/https:\/\/(www\.)?youtube\.com\/(user|channel)\//g, '')
|
||||||
|
video.author = channelName
|
||||||
|
video.authorId = channelId
|
||||||
|
} else {
|
||||||
|
video.author = ''
|
||||||
|
video.authorId = ''
|
||||||
|
}
|
||||||
video.videoId = video.id
|
video.videoId = video.id
|
||||||
video.lengthSeconds = video.duration
|
video.lengthSeconds = video.duration
|
||||||
video.author = video.author.name
|
|
||||||
|
|
||||||
return video
|
return video
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -342,7 +342,7 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(err)
|
console.log(err)
|
||||||
if (!this.usingElectron || (this.backendPreference === 'local' && this.backendFallback)) {
|
if (!this.usingElectron || (this.backendPreference === 'local' && this.backendFallback && !err.includes('private'))) {
|
||||||
this.showToast({
|
this.showToast({
|
||||||
message: this.$t('Falling back to Invidious API')
|
message: this.$t('Falling back to Invidious API')
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue