mirror of
https://github.com/Radarr/Radarr
synced 2024-12-24 17:01:38 +00:00
Added hidden option to allow updating of XBMC even if video is playing.
This commit is contained in:
parent
e4985cbd66
commit
b8559ccec3
2 changed files with 29 additions and 14 deletions
|
@ -230,6 +230,13 @@ public virtual Boolean XbmcCleanLibrary
|
|||
set { SetValue("XbmcCleanLibrary", value); }
|
||||
}
|
||||
|
||||
public virtual Boolean XbmcUpdateWhenPlaying
|
||||
{
|
||||
get { return GetValueBoolean("XbmcUpdateWhenPlaying"); }
|
||||
|
||||
set { SetValue("XbmcUpdateWhenPlaying", value); }
|
||||
}
|
||||
|
||||
public virtual string XbmcHosts
|
||||
{
|
||||
get { return GetValue("XbmcHosts", "localhost:8080"); }
|
||||
|
|
|
@ -60,6 +60,9 @@ public virtual void Update(Series series)
|
|||
|
||||
//If Dharma
|
||||
if (version == 2)
|
||||
{
|
||||
//Check for active player only when we should skip updates when playing
|
||||
if (!_configProvider.XbmcUpdateWhenPlaying)
|
||||
{
|
||||
Logger.Trace("Determining if there are any active players on XBMC host: {0}", host);
|
||||
var activePlayers = GetActivePlayersDharma(host, username, password);
|
||||
|
@ -70,12 +73,16 @@ public virtual void Update(Series series)
|
|||
Logger.Debug("Video is currently playing, skipping library update");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateWithHttp(series, host, username, password);
|
||||
}
|
||||
|
||||
//If Eden or newer (attempting to make it future compatible)
|
||||
else if (version >= 3)
|
||||
{
|
||||
//Check for active player only when we should skip updates when playing
|
||||
if (!_configProvider.XbmcUpdateWhenPlaying)
|
||||
{
|
||||
Logger.Trace("Determining if there are any active players on XBMC host: {0}", host);
|
||||
var activePlayers = GetActivePlayersEden(host, username, password);
|
||||
|
@ -86,6 +93,7 @@ public virtual void Update(Series series)
|
|||
Logger.Debug("Video is currently playing, skipping library update");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateWithJson(series, password, host, username);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue