mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-23 18:21:55 +01:00
25 lines
478 B
JavaScript
25 lines
478 B
JavaScript
|
|
const { ApiClient, Events } = require("jellyfin-apiclient");
|
|
const CONFIG = require("../config.json");
|
|
const os = require("os");
|
|
|
|
var jellyfinClient;
|
|
|
|
function init () {
|
|
jellyfinClient = new ApiClient(CONFIG["server-adress"], CONFIG["jellyfin-app-name"], "0.0.1", os.hostname(), os.hostname());
|
|
}
|
|
|
|
function getJellyfinClient () {
|
|
return jellyfinClient;
|
|
}
|
|
|
|
function getJellyfinEvents () {
|
|
return Events;
|
|
}
|
|
|
|
module.exports = {
|
|
getJellyfinClient,
|
|
getJellyfinEvents,
|
|
init
|
|
};
|