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