discord-jellyfin-bot/src/jellyfinclientmanager.js

25 lines
478 B
JavaScript
Raw Normal View History

2020-09-21 05:30:39 +02:00
const { ApiClient, Events } = require("jellyfin-apiclient");
const CONFIG = require("../config.json");
const os = require("os");
var jellyfinClient;
2020-09-21 05:30:39 +02:00
function init () {
jellyfinClient = new ApiClient(CONFIG["server-adress"], CONFIG["jellyfin-app-name"], "0.0.1", os.hostname(), os.hostname());
}
2020-09-21 05:30:39 +02:00
function getJellyfinClient () {
return jellyfinClient;
}
2020-09-21 05:30:39 +02:00
function getJellyfinEvents () {
return Events;
2020-09-19 09:01:09 +02:00
}
module.exports = {
2020-09-21 05:30:39 +02:00
getJellyfinClient,
getJellyfinEvents,
init
};