Fix issue when dislike count is null. Update Dependencies
This commit is contained in:
parent
af6d4abf3a
commit
1135853e69
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
|
@ -41,7 +41,7 @@
|
||||||
"yt-channel-info": "git+https://github.com/FreeTubeApp/yt-channel-info.git",
|
"yt-channel-info": "git+https://github.com/FreeTubeApp/yt-channel-info.git",
|
||||||
"yt-xml2vtt": "^1.1.1",
|
"yt-xml2vtt": "^1.1.1",
|
||||||
"ytdl-core": "^3.1.1",
|
"ytdl-core": "^3.1.1",
|
||||||
"ytpl": "^0.1.21",
|
"ytpl": "^0.1.22",
|
||||||
"ytsr": "^0.1.15"
|
"ytsr": "^0.1.15"
|
||||||
},
|
},
|
||||||
"description": "A private YouTube client",
|
"description": "A private YouTube client",
|
||||||
|
@ -51,23 +51,23 @@
|
||||||
"@babel/plugin-proposal-object-rest-spread": "^7.10.3",
|
"@babel/plugin-proposal-object-rest-spread": "^7.10.3",
|
||||||
"@babel/preset-env": "^7.10.3",
|
"@babel/preset-env": "^7.10.3",
|
||||||
"@babel/preset-typescript": "^7.10.1",
|
"@babel/preset-typescript": "^7.10.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^3.3.0",
|
"@typescript-eslint/eslint-plugin": "^3.4.0",
|
||||||
"@typescript-eslint/parser": "^3.3.0",
|
"@typescript-eslint/parser": "^3.4.0",
|
||||||
"acorn": "^7.3.1",
|
"acorn": "^7.3.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.2",
|
"copy-webpack-plugin": "^6.0.2",
|
||||||
"css-loader": "^3.6.0",
|
"css-loader": "^3.6.0",
|
||||||
"devtron": "^1.4.0",
|
"devtron": "^1.4.0",
|
||||||
"electron": "^9.0.4",
|
"electron": "^9.0.5",
|
||||||
"electron-builder": "^22.7.0",
|
"electron-builder": "^22.7.0",
|
||||||
"electron-builder-squirrel-windows": "^22.7.0",
|
"electron-builder-squirrel-windows": "^22.7.0",
|
||||||
"electron-debug": "^3.1.0",
|
"electron-debug": "^3.1.0",
|
||||||
"electron-rebuild": "^1.11.0",
|
"electron-rebuild": "^1.11.0",
|
||||||
"eslint": "^7.3.0",
|
"eslint": "^7.3.1",
|
||||||
"eslint-config-prettier": "^6.11.0",
|
"eslint-config-prettier": "^6.11.0",
|
||||||
"eslint-config-standard": "^14.1.1",
|
"eslint-config-standard": "^14.1.1",
|
||||||
"eslint-plugin-import": "^2.21.2",
|
"eslint-plugin-import": "^2.22.0",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-prettier": "^3.1.4",
|
"eslint-plugin-prettier": "^3.1.4",
|
||||||
"eslint-plugin-promise": "^4.2.1",
|
"eslint-plugin-promise": "^4.2.1",
|
||||||
|
@ -76,13 +76,13 @@
|
||||||
"fast-glob": "^3.2.4",
|
"fast-glob": "^3.2.4",
|
||||||
"file-loader": "^6.0.0",
|
"file-loader": "^6.0.0",
|
||||||
"html-webpack-plugin": "^4.3.0",
|
"html-webpack-plugin": "^4.3.0",
|
||||||
"jest": "^26.0.1",
|
"jest": "^26.1.0",
|
||||||
"mini-css-extract-plugin": "^0.9.0",
|
"mini-css-extract-plugin": "^0.9.0",
|
||||||
"node-abi": "^2.18.0",
|
"node-abi": "^2.18.0",
|
||||||
"node-loader": "^0.6.0",
|
"node-loader": "^1.0.0",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"prettier": "^2.0.5",
|
"prettier": "^2.0.5",
|
||||||
"sass": "^1.26.8",
|
"sass": "^1.26.9",
|
||||||
"sass-loader": "^8.0.2",
|
"sass-loader": "^8.0.2",
|
||||||
"style-loader": "^1.2.1",
|
"style-loader": "^1.2.1",
|
||||||
"tree-kill": "1.2.2",
|
"tree-kill": "1.2.2",
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
"url-loader": "^4.1.0",
|
"url-loader": "^4.1.0",
|
||||||
"vue-devtools": "^5.1.3",
|
"vue-devtools": "^5.1.3",
|
||||||
"vue-eslint-parser": "^7.1.0",
|
"vue-eslint-parser": "^7.1.0",
|
||||||
"vue-loader": "^15.9.2",
|
"vue-loader": "^15.9.3",
|
||||||
"vue-style-loader": "^4.1.2",
|
"vue-style-loader": "^4.1.2",
|
||||||
"vue-template-compiler": "^2.6.11",
|
"vue-template-compiler": "^2.6.11",
|
||||||
"webpack": "^4.43.0",
|
"webpack": "^4.43.0",
|
||||||
|
|
|
@ -214,8 +214,13 @@ export default Vue.extend({
|
||||||
this.videoDislikeCount = result.videoDetails.dislikes
|
this.videoDislikeCount = result.videoDetails.dislikes
|
||||||
this.isLive = result.player_response.videoDetails.isLive
|
this.isLive = result.player_response.videoDetails.isLive
|
||||||
|
|
||||||
|
if (this.videoDislikeCount === null) {
|
||||||
|
this.videoDislikeCount = 0
|
||||||
|
}
|
||||||
|
|
||||||
const subCount = result.videoDetails.author.subscriber_count
|
const subCount = result.videoDetails.author.subscriber_count
|
||||||
|
|
||||||
|
if (typeof (subCount) !== 'undefined') {
|
||||||
if (subCount >= 1000000) {
|
if (subCount >= 1000000) {
|
||||||
this.channelSubscriptionCountText = `${subCount / 1000000}M`
|
this.channelSubscriptionCountText = `${subCount / 1000000}M`
|
||||||
} else if (subCount >= 10000) {
|
} else if (subCount >= 10000) {
|
||||||
|
@ -223,6 +228,7 @@ export default Vue.extend({
|
||||||
} else {
|
} else {
|
||||||
this.channelSubscriptionCountText = subCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
this.channelSubscriptionCountText = subCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isLive) {
|
if (this.isLive) {
|
||||||
this.showLegacyPlayer = true
|
this.showLegacyPlayer = true
|
||||||
|
|
Loading…
Reference in New Issue