add user permissions for managing tv recordings

This commit is contained in:
Luke Pulverenti
2014-01-13 15:31:09 -05:00
parent c822bfc0cd
commit e206f27839
11 changed files with 81 additions and 21 deletions

View File

@@ -70,7 +70,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
}
// Without these movies that have the name season in them could cause the parent folder to be resolved as a series
if (filename.IndexOf("[boxset]", StringComparison.OrdinalIgnoreCase) != -1 || filename.IndexOf("[tmdbid=", StringComparison.OrdinalIgnoreCase) != -1)
if (filename.IndexOf("[tmdbid=", StringComparison.OrdinalIgnoreCase) != -1)
{
return null;
}

View File

@@ -1011,24 +1011,31 @@ namespace MediaBrowser.Server.Implementations.LiveTv
.FirstOrDefault();
}
private async Task<SeriesTimerInfo> GetNewTimerDefaultsInternal(CancellationToken cancellationToken, ProgramInfo program = null)
{
var info = await ActiveService.GetNewTimerDefaultsAsync(cancellationToken, program).ConfigureAwait(false);
info.Id = null;
return info;
}
public async Task<SeriesTimerInfoDto> GetNewTimerDefaults(CancellationToken cancellationToken)
{
var service = ActiveService;
var info = await GetNewTimerDefaultsInternal(cancellationToken).ConfigureAwait(false);
var info = await service.GetNewTimerDefaultsAsync(cancellationToken).ConfigureAwait(false);
var obj = _tvDtoService.GetSeriesTimerInfoDto(info, service, null);
obj.Id = obj.ExternalId = string.Empty;
var obj = _tvDtoService.GetSeriesTimerInfoDto(info, ActiveService, null);
return obj;
}
public async Task<SeriesTimerInfoDto> GetNewTimerDefaults(string programId, CancellationToken cancellationToken)
{
var info = await GetNewTimerDefaults(cancellationToken).ConfigureAwait(false);
var program = GetInternalProgram(programId).ProgramInfo;
var programDto = await GetProgram(programId, cancellationToken).ConfigureAwait(false);
var program = await GetProgram(programId, cancellationToken).ConfigureAwait(false);
var defaults = await GetNewTimerDefaultsInternal(cancellationToken, program).ConfigureAwait(false);
var info = _tvDtoService.GetSeriesTimerInfoDto(defaults, ActiveService, null);
info.Days = new List<DayOfWeek>
{
@@ -1039,13 +1046,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv
info.Name = program.Name;
info.ChannelId = program.ChannelId;
info.ChannelName = program.ChannelName;
info.ChannelName = programDto.ChannelName;
info.EndDate = program.EndDate;
info.StartDate = program.StartDate;
info.Name = program.Name;
info.Overview = program.Overview;
info.ProgramId = program.Id;
info.ExternalProgramId = program.ExternalId;
info.ExternalProgramId = programDto.ExternalId;
return info;
}