Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jellyfin support #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added img/brands/jellyfin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions inc/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ function processExistsOther($processName, $username) {
$subsonic = processExists("subsonic",$userRunning);
$syncthing = processExists("syncthing",$userRunning);
$jackett = processExists("jackett",$userRunning);
$jellyfin = processExistsOther("jellyfin",$username);
$couchpotato = processExists("couchpotato",$userRunning);
$quassel = processExists("quassel",$userRunning);
$shellinabox = processExistsOther("shellinabox","shellinabox");
Expand Down Expand Up @@ -313,6 +314,7 @@ function isEnabled($process, $username){
$floodURL = "https://" . $_SERVER['HTTP_HOST'] . "/flood/";
$headphonesURL = "https://" . $_SERVER['HTTP_HOST'] . "/headphones/home";
$jackettURL = "https://" . $_SERVER['HTTP_HOST'] . "/jackett/";
$jellyfinURL = "https://" . $_SERVER['HTTP_HOST'] . "/jellyfin/";
$loungeURL = "https://" . $_SERVER['HTTP_HOST'] . "/irc";
$lidarrURL = "http://" . $_SERVER['HTTP_HOST'] . "/lidarr";
$medusaURL = "https://" . $_SERVER['HTTP_HOST'] . "/medusa";
Expand Down Expand Up @@ -374,6 +376,8 @@ function isEnabled($process, $username){
$cbodyhp .= $headphones;
$jackett = isEnabled("jackett", $username);
$cbodyj .= $jackett;
$jellyfin = isEnabled("jellyfin", $username);
$cbodyjellyfin .= $jellyfin;
$lidarr = isEnabled("lidarr", $username);
$cbodylidarr .= $lidarr;
$lounge = isEnabled("lounge", lounge);
Expand Down Expand Up @@ -434,6 +438,9 @@ function isEnabled($process, $username){
} elseif ($process == "emby-server"){
shell_exec("sudo systemctl enable $process");
shell_exec("sudo systemctl start $process");
} elseif ($process == "jellyfin"){
shell_exec("sudo systemctl enable $process");
shell_exec("sudo systemctl start $process");
} elseif ($process == "headphones"){
shell_exec("sudo systemctl enable $process");
shell_exec("sudo systemctl start $process");
Expand Down Expand Up @@ -501,6 +508,9 @@ function isEnabled($process, $username){
} elseif ($process == "emby-server"){
shell_exec("sudo systemctl stop $process");
shell_exec("sudo systemctl disable $process");
} elseif ($process == "jellyfin"){
shell_exec("sudo systemctl stop $process");
shell_exec("sudo systemctl disable $process");
} elseif ($process == "headphones"){
shell_exec("sudo systemctl stop $process");
shell_exec("sudo systemctl disable $process");
Expand Down Expand Up @@ -547,6 +557,9 @@ function isEnabled($process, $username){
} elseif ($process == "emby-server"){
shell_exec("sudo systemctl enable $process");
shell_exec("sudo systemctl restart $process");
} elseif ($process == "jellyfin"){
shell_exec("sudo systemctl enable $process");
shell_exec("sudo systemctl restart $process");
} elseif ($process == "headphones"){
shell_exec("sudo systemctl enable $process");
shell_exec("sudo systemctl restart $process");
Expand Down
11 changes: 10 additions & 1 deletion inc/panel.app_status.ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,16 @@ $(document).ready(function() {
}});
}
appstat_jackett();


// <<-------- JELLYFIN -------->> //
function appstat_jellyfin() {
$.ajax({url: "widgets/app_status/app_status_jellyfin.php", cache:false, success: function (result) {
$('#appstat_jellyfin').html(result);
setTimeout(function (){appstat_jellyfin()}, 5000);
}});
}
appstat_jellyfin();

// <<-------- LIDARR -------->> //
function appstat_lidarr() {
$.ajax({url: "widgets/app_status/app_status_lidarr.php", cache:false, success: function (result) {
Expand Down
3 changes: 3 additions & 0 deletions inc/panel.menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@
<?php if (file_exists('/install/.jackett.lock')) { ?>
<li><a class="grayscale" href="<?php echo "$jackettURL"; ?>" target="_blank"><img src="img/brands/jackett.png" class="brand-ico"> <span>Jackett</span></a></li>
<?php } ?>
<?php if (file_exists('/install/.jellyfin.lock')) { ?>
<li><a class="grayscale" href="<?php echo "$jellyfinURL"; ?>" target="_blank"><img src="img/brands/jellyfin.png" class="brand-ico"> <span>Jellyfin</span></a></li>
<?php } ?>
<?php if (file_exists('/install/.lidarr.lock')) { ?>
<li><a class="grayscale" href="<?php echo "$lidarrURL"; ?>" target="_blank"><img src="img/brands/lidarr.png" class="brand-ico"> <span>Lidarr</span></a></li>
<?php } ?>
Expand Down
2 changes: 2 additions & 0 deletions lang/lang_en
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ $L['EMBY'] = 'Emby Server is a client-server software package that lets consumer
$L['FILEBROWSER'] = 'filebrowser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files. It allows the creation of multiple users and each user can have its own directory.';
$L['HEADPHONES'] = 'Headphones is an automated music downloader for NZB and Torrent, written in Python. It supports SABnzbd, NZBget, Transmission, µTorrent, Deluge and Blackhole.';
$L['JACKETT'] = 'API Support for your favorite private trackers.';
$L['JELLYFIN'] = 'Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby\'s 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support.';
$L['LIDARR'] = 'Lidarr is a music collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new tracks from your favorite artists and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.';
$L['MEDUSA'] = 'Video File Manager for TV Shows, It watches for new episodes of your favorite shows and when they are posted it does its magic. Allows manual search and other exclusive features, check Medusa on <a href="https://github.com/pymedusa/Medusa" target="_blank">Github</a>.';
$L['NEXTCLOUD'] = 'Nextcloud is an open source, self-hosted file sync and share and communication app platform. Access & sync your files, contacts, calendars & communicate and collaborate across your devices. You decide what happens with your data, where it is and who can access it!';
Expand Down Expand Up @@ -322,6 +323,7 @@ $L['UNINSTALL_DELUGE_TXT'] = 'You are about to uninstall Deluge from your system
$L['UNINSTALL_EMBY_TXT'] = 'You are about to uninstall Emby from your system.<br/><br/>This will completely remove all of your configuration and shared folder settings... this action is irreversible. <br/><br/>You may reinstall Emby at any time, however, your storage path and linked folder settings will be reset to default.';
$L['UNINSTALL_HEADPHONES_TXT'] = 'You are about to uninstall Headphones from your system.<br/><br/>This will completely remove all of your configuration and shared folder settings... this action is irreversible. <br/><br/>You may reinstall Headphones at any time, however, your storage path and linked folder settings will be reset to default.';
$L['UNINSTALL_JACKETT_TXT'] = 'You are about to uninstall Jackett from your system.<br/><br/>This will completely remove all of your configurations and settings... this action is irreversible. <br/><br/>You may reinstall Jackett at any time, however, your settings will be reset to default.';
$L['UNINSTALL_JELLYFIN_TXT'] = 'You are about to uninstall Jellyfin from your system.<br/><br/>This will completely remove all of your configurations and settings... this action is irreversible. <br/><br/>You may reinstall Jellyfin at any time, however, your settings will be reset to default.';
$L['UNINSTALL_NEXTCLOUD_TXT'] = 'You are about to uninstall NextCloud from your system.<br/><br/>This will completely remove all of your configurations and settings... this action is irreversible. <br/><br/>You may reinstall NextCloud at any time, however, your settings will be reset to default.';
$L['UNINSTALL_NZBGET_TXT'] = 'You are about to uninstall NZBGet from your system.<br/><br/>This will completely remove all of your configurations and settings... this action is irreversible. <br/><br/>You may reinstall NZBGet at any time, however, your settings will be reset to default.';
$L['UNINSTALL_NZBHYDRA_TXT'] = 'You are about to uninstall NZBHydra from your system.<br/><br/>This will completely remove all of your configurations and settings... this action is irreversible. <br/><br/>You may reinstall NZBHydra at any time, however, your settings will be reset to default.';
Expand Down
7 changes: 7 additions & 0 deletions widgets/service_control.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@
</tr>
<?php } ?>

<?php if (file_exists("/install/.jellyfin.lock")) { ?>
<tr>
<td><span id="appstat_jellyfin"></span> Jellyfin</td>
<td class="text-center"><a href="javascript:;" onclick="location.href='?id=88&servicestart=jellyfin'" class="btn btn-xs btn-default"><i class="fa fa-refresh text-info"></i> <?php echo T('REFRESH'); ?></a></td>
<td class="text-center"><?php echo "$cbodyjellyfin"; ?></td>
</tr>
<?php } ?>

<?php if (file_exists("/install/.lidarr.lock")) { ?>
<tr>
Expand Down