2020-09-08 13:17:55 +02:00
|
|
|
|
2020-09-19 09:01:09 +02:00
|
|
|
const { ApiClient , Events } = require('jellyfin-apiclient');
|
2020-09-08 13:17:55 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2020-09-08 13:17:55 +02:00
|
|
|
module.exports = {
|
|
|
|
getJellyfinClient,
|
2020-09-19 09:01:09 +02:00
|
|
|
getJellyfinEvents,
|
2020-09-08 13:17:55 +02:00
|
|
|
init
|
|
|
|
}
|