support head requests for images

This commit is contained in:
Luke Pulverenti
2014-09-25 23:47:46 -04:00
parent 8e2d244749
commit 0246ea8a63
73 changed files with 7167 additions and 4904 deletions

View File

@@ -194,7 +194,32 @@ namespace MediaBrowser.Server.Implementations.LiveTv
}
}
var enableFavoriteSorting = query.EnableFavoriteSorting;
channels = channels.OrderBy(i =>
{
if (enableFavoriteSorting)
{
var userData = _userDataManager.GetUserData(user.Id, i.GetUserDataKey());
if (userData.IsFavorite)
{
return 0;
}
if (userData.Likes.HasValue)
{
if (!userData.Likes.Value)
{
return 3;
}
return 1;
}
}
return 2;
})
.ThenBy(i =>
{
double number = 0;