discord-jellyfin-bot/src/jellyfinclientmanager.js

24 lines
490 B
JavaScript
Raw Normal View History

2020-09-19 09:01:09 +02:00
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;
}
2020-09-19 09:01:09 +02:00
function getJellyfinEvents(){
return Events;
}
module.exports = {
getJellyfinClient,
2020-09-19 09:01:09 +02:00
getJellyfinEvents,
init
}