mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-04 14:58:36 +01:00
Do better to make sure hls files are cleaned up
This commit is contained in:
@@ -52,14 +52,30 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
public int GetLimit(ImageType type)
|
||||
{
|
||||
ImageOption option = ImageOptions.FirstOrDefault(i => i.Type == type);
|
||||
ImageOption option = null;
|
||||
foreach (ImageOption i in ImageOptions)
|
||||
{
|
||||
if (i.Type == type)
|
||||
{
|
||||
option = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return option == null ? 1 : option.Limit;
|
||||
}
|
||||
|
||||
public int GetMinWidth(ImageType type)
|
||||
{
|
||||
ImageOption option = ImageOptions.FirstOrDefault(i => i.Type == type);
|
||||
ImageOption option = null;
|
||||
foreach (ImageOption i in ImageOptions)
|
||||
{
|
||||
if (i.Type == type)
|
||||
{
|
||||
option = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return option == null ? 0 : option.MinWidth;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,11 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
public NotificationOption GetOptions(string type)
|
||||
{
|
||||
return Options.FirstOrDefault(i => string.Equals(type, i.Type, StringComparison.OrdinalIgnoreCase));
|
||||
foreach (NotificationOption i in Options)
|
||||
{
|
||||
if (string.Equals(type, i.Type, StringComparison.OrdinalIgnoreCase)) return i;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool IsEnabled(string type)
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace MediaBrowser.Model.Configuration
|
||||
PluginUpdateInstalled,
|
||||
PluginUninstalled,
|
||||
NewLibraryContent,
|
||||
NewLibraryContentMultiple,
|
||||
ServerRestartRequired,
|
||||
TaskFailed,
|
||||
VideoPlayback
|
||||
|
||||
Reference in New Issue
Block a user