Do better to make sure hls files are cleaned up

This commit is contained in:
Luke Pulverenti
2014-05-09 00:38:12 -04:00
parent 06a11c27d9
commit 1a323767be
19 changed files with 297 additions and 85 deletions

View File

@@ -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;
}

View File

@@ -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)

View File

@@ -12,6 +12,7 @@ namespace MediaBrowser.Model.Configuration
PluginUpdateInstalled,
PluginUninstalled,
NewLibraryContent,
NewLibraryContentMultiple,
ServerRestartRequired,
TaskFailed,
VideoPlayback