let enable plugin download-counter from admin panel
Massimo Melina committed
Apr 12, 2022 at 19:46 UTC
b6668bd4b2f59552ac0ab53f6b5c27098bf3d3fc
3 files changed
+4
-1
plugins/download-counter/plugin.js
renamed
+3
@@ -1,3 +1,6 @@
1
+exports.description = "Counts downloads for each file, and displays the total in the list"
2
+exports.version = 1
3
+
4
exports.init = api => {
5
const _ = api.require('lodash')
6
const yaml = api.require('yaml')
plugins/download-counter/public/hits.js
renamed
server/src/plugins.ts
+1
-1
@@ -61,7 +61,7 @@ export function pluginsMiddleware(): Koa.Middleware {
61
}
62
}
63
64
-subscribeConfig({ k:'disable_plugins', defaultValue:[] }, () => {
64
+subscribeConfig({ k:'disable_plugins', defaultValue:['download-counter'] }, () => {
65
try { watchDir(PATH, debounceAsync(rescan, 1000)) }
66
catch {
67
console.debug('plugins not found')