aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Controller/LiveTv/RecordingInfo.cs5
-rw-r--r--MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs8
-rw-r--r--MediaBrowser.Controller/LiveTv/TimerInfo.cs5
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs38
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs36
-rw-r--r--MediaBrowser.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs3
-rw-r--r--MediaBrowser.WebDashboard/Api/DashboardService.cs1
-rw-r--r--Nuget/MediaBrowser.Common.Internal.nuspec4
-rw-r--r--Nuget/MediaBrowser.Common.nuspec2
-rw-r--r--Nuget/MediaBrowser.Server.Core.nuspec4
10 files changed, 56 insertions, 50 deletions
diff --git a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs
index 2004536af..6a0d135c8 100644
--- a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs
+++ b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs
@@ -23,11 +23,6 @@ namespace MediaBrowser.Controller.LiveTv
public string ChannelId { get; set; }
/// <summary>
- /// ChannelName of the recording.
- /// </summary>
- public string ChannelName { get; set; }
-
- /// <summary>
/// Gets or sets the type of the channel.
/// </summary>
/// <value>The type of the channel.</value>
diff --git a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs
index 6801cd7f9..1be6549ff 100644
--- a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs
+++ b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs
@@ -1,5 +1,4 @@
-using MediaBrowser.Model.LiveTv;
-using System;
+using System;
using System.Collections.Generic;
namespace MediaBrowser.Controller.LiveTv
@@ -17,11 +16,6 @@ namespace MediaBrowser.Controller.LiveTv
public string ChannelId { get; set; }
/// <summary>
- /// ChannelName of the recording.
- /// </summary>
- public string ChannelName { get; set; }
-
- /// <summary>
/// Gets or sets the program identifier.
/// </summary>
/// <value>The program identifier.</value>
diff --git a/MediaBrowser.Controller/LiveTv/TimerInfo.cs b/MediaBrowser.Controller/LiveTv/TimerInfo.cs
index 499b217b5..5d92a212f 100644
--- a/MediaBrowser.Controller/LiveTv/TimerInfo.cs
+++ b/MediaBrowser.Controller/LiveTv/TimerInfo.cs
@@ -22,11 +22,6 @@ namespace MediaBrowser.Controller.LiveTv
public string ChannelId { get; set; }
/// <summary>
- /// ChannelName of the recording.
- /// </summary>
- public string ChannelName { get; set; }
-
- /// <summary>
/// Gets or sets the program identifier.
/// </summary>
/// <value>The program identifier.</value>
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs
index b493fd15a..dad0c915d 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs
@@ -30,18 +30,17 @@ namespace MediaBrowser.Server.Implementations.LiveTv
_logger = logger;
}
- public TimerInfoDto GetTimerInfoDto(TimerInfo info, ILiveTvService service, LiveTvProgram program)
+ public TimerInfoDto GetTimerInfoDto(TimerInfo info, ILiveTvService service, LiveTvProgram program, LiveTvChannel channel)
{
var dto = new TimerInfoDto
{
Id = GetInternalTimerId(service.Name, info.Id).ToString("N"),
- ChannelName = info.ChannelName,
Overview = info.Overview,
EndDate = info.EndDate,
Name = info.Name,
StartDate = info.StartDate,
ExternalId = info.Id,
- ChannelId = GetInternalChannelId(service.Name, info.ChannelId, info.ChannelName).ToString("N"),
+ ChannelId = GetInternalChannelId(service.Name, info.ChannelId).ToString("N"),
Status = info.Status,
SeriesTimerId = string.IsNullOrEmpty(info.SeriesTimerId) ? null : GetInternalSeriesTimerId(service.Name, info.SeriesTimerId).ToString("N"),
PrePaddingSeconds = info.PrePaddingSeconds,
@@ -69,15 +68,19 @@ namespace MediaBrowser.Server.Implementations.LiveTv
dto.ProgramInfo.SeriesTimerId = dto.SeriesTimerId;
}
+ if (channel != null)
+ {
+ dto.ChannelName = channel.ChannelInfo.Name;
+ }
+
return dto;
}
- public SeriesTimerInfoDto GetSeriesTimerInfoDto(SeriesTimerInfo info, ILiveTvService service)
+ public SeriesTimerInfoDto GetSeriesTimerInfoDto(SeriesTimerInfo info, ILiveTvService service, string channelName)
{
var dto = new SeriesTimerInfoDto
{
Id = GetInternalSeriesTimerId(service.Name, info.Id).ToString("N"),
- ChannelName = info.ChannelName,
Overview = info.Overview,
EndDate = info.EndDate,
Name = info.Name,
@@ -94,12 +97,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv
RecordNewOnly = info.RecordNewOnly,
ExternalChannelId = info.ChannelId,
ExternalProgramId = info.ProgramId,
- ServiceName = service.Name
+ ServiceName = service.Name,
+ ChannelName = channelName
};
if (!string.IsNullOrEmpty(info.ChannelId))
{
- dto.ChannelId = GetInternalChannelId(service.Name, info.ChannelId, info.ChannelName).ToString("N");
+ dto.ChannelId = GetInternalChannelId(service.Name, info.ChannelId).ToString("N");
}
if (!string.IsNullOrEmpty(info.ProgramId))
@@ -156,22 +160,21 @@ namespace MediaBrowser.Server.Implementations.LiveTv
return val.Value * 2;
}
- public RecordingInfoDto GetRecordingInfoDto(LiveTvRecording recording, ILiveTvService service, User user = null)
+ public RecordingInfoDto GetRecordingInfoDto(LiveTvRecording recording, LiveTvChannel channel, ILiveTvService service, User user = null)
{
var info = recording.RecordingInfo;
-
+
var dto = new RecordingInfoDto
{
Id = GetInternalRecordingId(service.Name, info.Id).ToString("N"),
SeriesTimerId = string.IsNullOrEmpty(info.SeriesTimerId) ? null : GetInternalSeriesTimerId(service.Name, info.SeriesTimerId).ToString("N"),
Type = recording.GetClientTypeName(),
- ChannelName = info.ChannelName,
Overview = info.Overview,
EndDate = info.EndDate,
Name = info.Name,
StartDate = info.StartDate,
ExternalId = info.Id,
- ChannelId = GetInternalChannelId(service.Name, info.ChannelId, info.ChannelName).ToString("N"),
+ ChannelId = GetInternalChannelId(service.Name, info.ChannelId).ToString("N"),
Status = info.Status,
Path = info.Path,
Genres = info.Genres,
@@ -212,6 +215,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv
dto.ProgramId = GetInternalProgramId(service.Name, info.ProgramId).ToString("N");
}
+ if (channel != null)
+ {
+ dto.ChannelName = channel.ChannelInfo.Name;
+ }
+
return dto;
}
@@ -259,7 +267,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
var dto = new ProgramInfoDto
{
Id = GetInternalProgramId(item.ServiceName, program.Id).ToString("N"),
- ChannelId = GetInternalChannelId(item.ServiceName, program.ChannelId, program.ChannelName).ToString("N"),
+ ChannelId = GetInternalChannelId(item.ServiceName, program.ChannelId).ToString("N"),
Overview = program.Overview,
EndDate = program.EndDate,
Genres = program.Genres,
@@ -315,9 +323,9 @@ namespace MediaBrowser.Server.Implementations.LiveTv
return null;
}
- public Guid GetInternalChannelId(string serviceName, string externalId, string channelName)
+ public Guid GetInternalChannelId(string serviceName, string externalId)
{
- var name = serviceName + externalId + channelName;
+ var name = serviceName + externalId;
return name.ToLower().GetMBId(typeof(LiveTvChannel));
}
@@ -354,7 +362,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv
{
var info = new TimerInfo
{
- ChannelName = dto.ChannelName,
Overview = dto.Overview,
EndDate = dto.EndDate,
Name = dto.Name,
@@ -416,7 +423,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv
{
var info = new SeriesTimerInfo
{
- ChannelName = dto.ChannelName,
Overview = dto.Overview,
EndDate = dto.EndDate,
Name = dto.Name,
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
index d800b9948..281f38e87 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -184,7 +184,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
isNew = true;
}
- var id = _tvDtoService.GetInternalChannelId(serviceName, channelInfo.Id, channelInfo.Name);
+ var id = _tvDtoService.GetInternalChannelId(serviceName, channelInfo.Id);
var item = _itemRepo.RetrieveItem(id) as LiveTvChannel;
@@ -295,8 +295,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
programs = programs.Where(i =>
{
var programChannelId = i.ProgramInfo.ChannelId;
-
- var internalProgramChannelId = _tvDtoService.GetInternalChannelId(serviceName, programChannelId, i.ProgramInfo.ChannelName);
+
+ var internalProgramChannelId = _tvDtoService.GetInternalChannelId(serviceName, programChannelId);
return guids.Contains(internalProgramChannelId);
});
@@ -426,7 +426,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
if (!string.IsNullOrEmpty(query.ChannelId))
{
list = list
- .Where(i => _tvDtoService.GetInternalChannelId(service.Name, i.ChannelId, i.ChannelName) == new Guid(query.ChannelId))
+ .Where(i => _tvDtoService.GetInternalChannelId(service.Name, i.ChannelId) == new Guid(query.ChannelId))
.ToList();
}
@@ -445,7 +445,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv
}
var returnArray = entities
- .Select(i => _tvDtoService.GetRecordingInfoDto(i, service, user))
+ .Select(i =>
+ {
+ var channel = string.IsNullOrEmpty(i.RecordingInfo.ChannelId) ? null : GetInternalChannel(_tvDtoService.GetInternalChannelId(service.Name, i.RecordingInfo.ChannelId).ToString("N"));
+ return _tvDtoService.GetRecordingInfoDto(i, channel, service, user);
+ })
.OrderByDescending(i => i.StartDate)
.ToArray();
@@ -493,15 +497,16 @@ namespace MediaBrowser.Server.Implementations.LiveTv
if (!string.IsNullOrEmpty(query.ChannelId))
{
var guid = new Guid(query.ChannelId);
- timers = timers.Where(i => guid == _tvDtoService.GetInternalChannelId(service.Name, i.ChannelId, i.ChannelName));
+ timers = timers.Where(i => guid == _tvDtoService.GetInternalChannelId(service.Name, i.ChannelId));
}
var returnArray = timers
.Select(i =>
{
var program = string.IsNullOrEmpty(i.ProgramId) ? null : GetInternalProgram(_tvDtoService.GetInternalProgramId(service.Name, i.ProgramId).ToString("N"));
+ var channel = string.IsNullOrEmpty(i.ChannelId) ? null : GetInternalChannel(_tvDtoService.GetInternalChannelId(service.Name, i.ChannelId).ToString("N"));
- return _tvDtoService.GetTimerInfoDto(i, service, program);
+ return _tvDtoService.GetTimerInfoDto(i, service, program, channel);
})
.OrderBy(i => i.StartDate)
.ToArray();
@@ -591,7 +596,20 @@ namespace MediaBrowser.Server.Implementations.LiveTv
var timers = await service.GetSeriesTimersAsync(cancellationToken).ConfigureAwait(false);
var returnArray = timers
- .Select(i => _tvDtoService.GetSeriesTimerInfoDto(i, service))
+ .Select(i =>
+ {
+ string channelName = null;
+
+ if (!string.IsNullOrEmpty(i.ChannelId))
+ {
+ var internalChannelId = _tvDtoService.GetInternalChannelId(service.Name, i.ChannelId);
+ var channel = GetInternalChannel(internalChannelId.ToString("N"));
+ channelName = channel == null ? null : channel.ChannelInfo.Name;
+ }
+
+ return _tvDtoService.GetSeriesTimerInfoDto(i, service, channelName);
+
+ })
.OrderByDescending(i => i.StartDate)
.ToArray();
@@ -617,7 +635,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
var info = await service.GetNewTimerDefaultsAsync(cancellationToken).ConfigureAwait(false);
- var obj = _tvDtoService.GetSeriesTimerInfoDto(info, service);
+ var obj = _tvDtoService.GetSeriesTimerInfoDto(info, service, null);
obj.Id = obj.ExternalId = string.Empty;
diff --git a/MediaBrowser.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs b/MediaBrowser.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs
index 32df5fe13..2608ac172 100644
--- a/MediaBrowser.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs
+++ b/MediaBrowser.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs
@@ -117,8 +117,6 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
public IEnumerable<ITaskTrigger> GetDefaultTriggers()
{
- // IMPORTANT: Make sure to update the dashboard "wizardsettings" page if this default ever changes
-
return new ITaskTrigger[]
{
new DailyTrigger { TimeOfDay = TimeSpan.FromHours(4) }
@@ -197,7 +195,6 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
{
get
{
- // IMPORTANT: Make sure to update the dashboard "wizardsettings" page if this name ever changes
return "Chapter image extraction";
}
}
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs
index d3850017c..dafa63f9a 100644
--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs
+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs
@@ -547,6 +547,7 @@ namespace MediaBrowser.WebDashboard.Api
"userprofilespage.js",
"usersettings.js",
"wizardfinishpage.js",
+ "wizardimagesettings.js",
"wizardservice.js",
"wizardstartpage.js",
"wizardsettings.js",
diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec
index bdf347607..c6177969d 100644
--- a/Nuget/MediaBrowser.Common.Internal.nuspec
+++ b/Nuget/MediaBrowser.Common.Internal.nuspec
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common.Internal</id>
- <version>3.0.289</version>
+ <version>3.0.290</version>
<title>MediaBrowser.Common.Internal</title>
<authors>Luke</authors>
<owners>ebr,Luke,scottisafool</owners>
@@ -12,7 +12,7 @@
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
- <dependency id="MediaBrowser.Common" version="3.0.289" />
+ <dependency id="MediaBrowser.Common" version="3.0.290" />
<dependency id="NLog" version="2.1.0" />
<dependency id="SimpleInjector" version="2.4.0" />
<dependency id="sharpcompress" version="0.10.2" />
diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec
index 7f5f64904..87411f959 100644
--- a/Nuget/MediaBrowser.Common.nuspec
+++ b/Nuget/MediaBrowser.Common.nuspec
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common</id>
- <version>3.0.289</version>
+ <version>3.0.290</version>
<title>MediaBrowser.Common</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec
index d99d6be97..fc944e2f2 100644
--- a/Nuget/MediaBrowser.Server.Core.nuspec
+++ b/Nuget/MediaBrowser.Server.Core.nuspec
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MediaBrowser.Server.Core</id>
- <version>3.0.289</version>
+ <version>3.0.290</version>
<title>Media Browser.Server.Core</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
@@ -12,7 +12,7 @@
<description>Contains core components required to build plugins for Media Browser Server.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
- <dependency id="MediaBrowser.Common" version="3.0.289" />
+ <dependency id="MediaBrowser.Common" version="3.0.290" />
</dependencies>
</metadata>
<files>