Youtube plugin updated to follow api changes. Updated packages
This commit is contained in:
parent
912ba3b711
commit
0dccf16727
1
.hgignore → .gitignore
vendored
1
.hgignore → .gitignore
vendored
|
@ -13,3 +13,4 @@ backup/
|
|||
config.js
|
||||
.swp
|
||||
.orig
|
||||
log/
|
7030
package-lock.json
generated
7030
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -19,14 +19,14 @@
|
|||
"cron": "=1.7.1",
|
||||
"file-stream-rotator": "=0.4.1",
|
||||
"finalhandler": "=1.1.2",
|
||||
"googleapis": "=42.0.0",
|
||||
"googleapis": "^91.0.0",
|
||||
"html-to-text": "=5.1.1",
|
||||
"irc": "=0.5.2",
|
||||
"lokijs": "=1.5.7",
|
||||
"mkdirp": "=0.5.1",
|
||||
"mkdirp": "=0.5.5",
|
||||
"morgan": "=1.9.1",
|
||||
"node-cron": "^2.0.3",
|
||||
"node-dev": "=4.0.0",
|
||||
"node-dev": "^7.1.0",
|
||||
"node-uuid": "=1.4.8",
|
||||
"promise": "=8.0.3",
|
||||
"request": "=2.88.0",
|
||||
|
@ -36,6 +36,6 @@
|
|||
"winston-daily-rotate-file": "^3.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nodemon": "^1.18.5"
|
||||
"nodemon": "^2.0.15"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ class Youtube extends BasePlugin {
|
|||
resultString += result.title
|
||||
resultString += ', esittäjänä ' + result.channelTitle
|
||||
if (typeof result.statistics !== 'undefined') {
|
||||
var rotten = (Number(result.statistics.likeCount) / (Number(result.statistics.likeCount) + Number(result.statistics.dislikeCount))).toFixed(2)
|
||||
resultString += ' (' + result.duration + ', ' + result.statistics.viewCount + ' katselukertaa, ' + rotten * 100 + '% tykätty, ' + result.url + ' )'
|
||||
var likeCount = Number(result.statistics.likeCount)
|
||||
resultString += ' (' + result.duration + ', ' + result.statistics.viewCount + ' katselukertaa, ' + likeCount + ' 👍)'
|
||||
}
|
||||
resolve(resultString)
|
||||
}, function (err) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user