aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/Dto/DtoService.cs8
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/ArtistsValidator.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/PeoplePostScanTask.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs2
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/ChannelImageProvider.cs2
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs25
-rw-r--r--MediaBrowser.Server.Implementations/Sorting/AlbumCountComparer.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Sorting/EpisodeCountComparer.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Sorting/MovieCountComparer.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Sorting/MusicVideoCountComparer.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Sorting/SeriesCountComparer.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Sorting/SongCountComparer.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Sorting/TrailerCountComparer.cs2
16 files changed, 24 insertions, 37 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
index 90ca64058d..f6291cf36b 100644
--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs
+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
@@ -129,17 +129,13 @@ namespace MediaBrowser.Server.Implementations.Dto
/// <param name="user">The user.</param>
private void AttachItemByNameCounts(BaseItemDto dto, IItemByName item, User user)
{
- ItemByNameCounts counts;
-
if (user == null)
{
//counts = item.ItemCounts;
return;
}
- if (!item.UserItemCounts.TryGetValue(user.Id, out counts))
- {
- counts = new ItemByNameCounts();
- }
+
+ ItemByNameCounts counts = item.GetItemByNameCounts(user.Id) ?? new ItemByNameCounts();
dto.ChildCount = counts.TotalCount;
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/ArtistsValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/ArtistsValidator.cs
index 1984a24209..40ef5304c6 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/ArtistsValidator.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/ArtistsValidator.cs
@@ -137,7 +137,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
if (userId.HasValue)
{
- artist.UserItemCounts[userId.Value] = counts;
+ artist.SetItemByNameCounts(userId.Value, counts);
}
}
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs
index d21a123c07..c7af7a238f 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs
@@ -106,7 +106,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
{
var itemCounts = CountHelpers.GetCounts(counts[libraryId]);
- itemByName.UserItemCounts[libraryId] = itemCounts;
+ itemByName.SetItemByNameCounts(libraryId, itemCounts);
}
await itemByName.RefreshMetadata(cancellationToken).ConfigureAwait(false);
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs
index 0670e1a851..cb1253df07 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs
@@ -107,7 +107,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
{
var itemCounts = CountHelpers.GetCounts(counts[libraryId]);
- itemByName.UserItemCounts[libraryId] = itemCounts;
+ itemByName.SetItemByNameCounts(libraryId, itemCounts);
}
await itemByName.RefreshMetadata(cancellationToken).ConfigureAwait(false);
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs
index 166f557cf0..57a6a612bc 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs
@@ -107,7 +107,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
{
var itemCounts = CountHelpers.GetCounts(counts[libraryId]);
- itemByName.UserItemCounts[libraryId] = itemCounts;
+ itemByName.SetItemByNameCounts(libraryId, itemCounts);
}
await itemByName.RefreshMetadata(cancellationToken).ConfigureAwait(false);
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/PeoplePostScanTask.cs b/MediaBrowser.Server.Implementations/Library/Validators/PeoplePostScanTask.cs
index cfc7f4310d..0104b2b7ec 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/PeoplePostScanTask.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/PeoplePostScanTask.cs
@@ -94,7 +94,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
{
var itemCounts = CountHelpers.GetCounts(counts[libraryId]);
- itemByName.UserItemCounts[libraryId] = itemCounts;
+ itemByName.SetItemByNameCounts(libraryId, itemCounts);
}
}
catch (Exception ex)
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs
index 02c7a94b4b..0f4ff562ef 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs
@@ -106,7 +106,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
{
var itemCounts = CountHelpers.GetCounts(counts[libraryId]);
- itemByName.UserItemCounts[libraryId] = itemCounts;
+ itemByName.SetItemByNameCounts(libraryId, itemCounts);
}
await itemByName.RefreshMetadata(cancellationToken).ConfigureAwait(false);
diff --git a/MediaBrowser.Server.Implementations/LiveTv/ChannelImageProvider.cs b/MediaBrowser.Server.Implementations/LiveTv/ChannelImageProvider.cs
index e1a918fd2e..322948bade 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/ChannelImageProvider.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/ChannelImageProvider.cs
@@ -75,7 +75,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
// Dummy up the original url
var url = channel.ServiceName + channel.ChannelId;
- await _providerManager.SaveImage(channel, response.Content, response.ContentType, ImageType.Primary, null, url, cancellationToken).ConfigureAwait(false);
+ await _providerManager.SaveImage(channel, response.Stream, response.MimeType, ImageType.Primary, null, url, cancellationToken).ConfigureAwait(false);
}
}
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
index 261c915cb2..704d1ea59c 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -209,7 +209,9 @@ namespace MediaBrowser.Server.Implementations.LiveTv
OriginalAirDate = program.OriginalAirDate,
Audio = program.Audio,
CommunityRating = program.CommunityRating,
- AspectRatio = program.AspectRatio
+ AspectRatio = program.AspectRatio,
+ IsRepeat = program.IsRepeat,
+ EpisodeTitle = program.EpisodeTitle
};
}
@@ -297,21 +299,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv
var returnArray = programs.ToArray();
- var recordings = await GetRecordings(new RecordingQuery
- {
-
-
- }, cancellationToken).ConfigureAwait(false);
-
- foreach (var program in returnArray)
- {
- var recording = recordings.Items
- .FirstOrDefault(i => string.Equals(i.ProgramId, program.Id));
-
- program.RecordingId = recording == null ? null : recording.Id;
- program.RecordingStatus = recording == null ? (RecordingStatus?)null : recording.Status;
- }
-
return new QueryResult<ProgramInfoDto>
{
Items = returnArray,
@@ -400,7 +387,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv
Id = id,
ExternalId = info.Id,
ChannelId = GetInternalChannelId(service.Name, info.ChannelId, info.ChannelName).ToString("N"),
- Status = info.Status
+ Status = info.Status,
+ Path = info.Path,
+ Genres = info.Genres,
+ IsRepeat = info.IsRepeat,
+ EpisodeTitle = info.EpisodeTitle
};
if (!string.IsNullOrEmpty(info.ProgramId))
diff --git a/MediaBrowser.Server.Implementations/Sorting/AlbumCountComparer.cs b/MediaBrowser.Server.Implementations/Sorting/AlbumCountComparer.cs
index 8e24bc52d6..e35ba00f2e 100644
--- a/MediaBrowser.Server.Implementations/Sorting/AlbumCountComparer.cs
+++ b/MediaBrowser.Server.Implementations/Sorting/AlbumCountComparer.cs
@@ -48,7 +48,7 @@ namespace MediaBrowser.Server.Implementations.Sorting
if (itemByName != null)
{
- var counts = itemByName.GetItemByNameCounts(User);
+ var counts = itemByName.GetItemByNameCounts(User.Id);
if (counts != null)
{
diff --git a/MediaBrowser.Server.Implementations/Sorting/EpisodeCountComparer.cs b/MediaBrowser.Server.Implementations/Sorting/EpisodeCountComparer.cs
index 7731e59d2b..b3fd8a023d 100644
--- a/MediaBrowser.Server.Implementations/Sorting/EpisodeCountComparer.cs
+++ b/MediaBrowser.Server.Implementations/Sorting/EpisodeCountComparer.cs
@@ -48,7 +48,7 @@ namespace MediaBrowser.Server.Implementations.Sorting
if (itemByName != null)
{
- var counts = itemByName.GetItemByNameCounts(User);
+ var counts = itemByName.GetItemByNameCounts(User.Id);
if (counts != null)
{
diff --git a/MediaBrowser.Server.Implementations/Sorting/MovieCountComparer.cs b/MediaBrowser.Server.Implementations/Sorting/MovieCountComparer.cs
index 51f39a02f2..605f4d1af4 100644
--- a/MediaBrowser.Server.Implementations/Sorting/MovieCountComparer.cs
+++ b/MediaBrowser.Server.Implementations/Sorting/MovieCountComparer.cs
@@ -48,7 +48,7 @@ namespace MediaBrowser.Server.Implementations.Sorting
if (itemByName != null)
{
- var counts = itemByName.GetItemByNameCounts(User);
+ var counts = itemByName.GetItemByNameCounts(User.Id);
if (counts != null)
{
diff --git a/MediaBrowser.Server.Implementations/Sorting/MusicVideoCountComparer.cs b/MediaBrowser.Server.Implementations/Sorting/MusicVideoCountComparer.cs
index 889658459c..6c9c5534d6 100644
--- a/MediaBrowser.Server.Implementations/Sorting/MusicVideoCountComparer.cs
+++ b/MediaBrowser.Server.Implementations/Sorting/MusicVideoCountComparer.cs
@@ -48,7 +48,7 @@ namespace MediaBrowser.Server.Implementations.Sorting
if (itemByName != null)
{
- var counts = itemByName.GetItemByNameCounts(User);
+ var counts = itemByName.GetItemByNameCounts(User.Id);
if (counts != null)
{
diff --git a/MediaBrowser.Server.Implementations/Sorting/SeriesCountComparer.cs b/MediaBrowser.Server.Implementations/Sorting/SeriesCountComparer.cs
index 13d2932cbc..8567e400cd 100644
--- a/MediaBrowser.Server.Implementations/Sorting/SeriesCountComparer.cs
+++ b/MediaBrowser.Server.Implementations/Sorting/SeriesCountComparer.cs
@@ -48,7 +48,7 @@ namespace MediaBrowser.Server.Implementations.Sorting
if (itemByName != null)
{
- var counts = itemByName.GetItemByNameCounts(User);
+ var counts = itemByName.GetItemByNameCounts(User.Id);
if (counts != null)
{
diff --git a/MediaBrowser.Server.Implementations/Sorting/SongCountComparer.cs b/MediaBrowser.Server.Implementations/Sorting/SongCountComparer.cs
index b12e1322a0..85b849a217 100644
--- a/MediaBrowser.Server.Implementations/Sorting/SongCountComparer.cs
+++ b/MediaBrowser.Server.Implementations/Sorting/SongCountComparer.cs
@@ -48,7 +48,7 @@ namespace MediaBrowser.Server.Implementations.Sorting
if (itemByName != null)
{
- var counts = itemByName.GetItemByNameCounts(User);
+ var counts = itemByName.GetItemByNameCounts(User.Id);
if (counts != null)
{
diff --git a/MediaBrowser.Server.Implementations/Sorting/TrailerCountComparer.cs b/MediaBrowser.Server.Implementations/Sorting/TrailerCountComparer.cs
index b6f67410a0..a13875674d 100644
--- a/MediaBrowser.Server.Implementations/Sorting/TrailerCountComparer.cs
+++ b/MediaBrowser.Server.Implementations/Sorting/TrailerCountComparer.cs
@@ -48,7 +48,7 @@ namespace MediaBrowser.Server.Implementations.Sorting
if (itemByName != null)
{
- var counts = itemByName.GetItemByNameCounts(User);
+ var counts = itemByName.GetItemByNameCounts(User.Id);
if (counts != null)
{