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