commit
67b589ba3f
|
@ -69,6 +69,7 @@ namespace MediaBrowser.Api
|
|||
_config.Configuration.EnableCustomPathSubFolders = true;
|
||||
_config.Configuration.EnableDateLastRefresh = true;
|
||||
_config.Configuration.EnableStandaloneMusicKeys = true;
|
||||
_config.Configuration.EnableCaseSensitiveItemIds = true;
|
||||
_config.SaveConfiguration();
|
||||
}
|
||||
|
||||
|
|
|
@ -62,6 +62,12 @@ namespace MediaBrowser.Model.Configuration
|
|||
/// <value><c>true</c> if this instance is port authorized; otherwise, <c>false</c>.</value>
|
||||
public bool IsPortAuthorized { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [enable case sensitive item ids].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [enable case sensitive item ids]; otherwise, <c>false</c>.</value>
|
||||
public bool EnableCaseSensitiveItemIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the metadata path.
|
||||
/// </summary>
|
||||
|
|
|
@ -60,6 +60,7 @@ namespace MediaBrowser.Model.Configuration
|
|||
EnableNextEpisodeAutoPlay = true;
|
||||
RememberAudioSelections = true;
|
||||
RememberSubtitleSelections = true;
|
||||
DisplayChannelsInline = true;
|
||||
|
||||
HidePlayedInLatest = true;
|
||||
PlayDefaultAudioTrack = true;
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace MediaBrowser.Providers.TV
|
|||
{
|
||||
Name = seasonName,
|
||||
IndexNumber = seasonNumber,
|
||||
Id = (series.Id + (seasonNumber ?? -1).ToString(_usCulture) + seasonName).GetMBId(typeof(Season))
|
||||
Id = _libraryManager.GetNewItemId((series.Id + (seasonNumber ?? -1).ToString(_usCulture) + seasonName), typeof(Season))
|
||||
};
|
||||
|
||||
season.SetParent(series);
|
||||
|
|
|
@ -422,7 +422,7 @@ namespace MediaBrowser.Providers.TV
|
|||
Name = name,
|
||||
IndexNumber = episodeNumber,
|
||||
ParentIndexNumber = seasonNumber,
|
||||
Id = (series.Id + seasonNumber.ToString(_usCulture) + name).GetMBId(typeof(Episode))
|
||||
Id = _libraryManager.GetNewItemId((series.Id + seasonNumber.ToString(_usCulture) + name), typeof(Episode))
|
||||
};
|
||||
|
||||
episode.SetParent(season);
|
||||
|
|
|
@ -28,9 +28,36 @@ namespace MediaBrowser.Providers.TV
|
|||
: base(httpClient, configurationManager, jsonSerializer, fileSystem, localization, logManager)
|
||||
{ }
|
||||
|
||||
public Task<IEnumerable<RemoteSearchResult>> GetSearchResults(EpisodeInfo searchInfo, CancellationToken cancellationToken)
|
||||
public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(EpisodeInfo searchInfo, CancellationToken cancellationToken)
|
||||
{
|
||||
return Task.FromResult<IEnumerable<RemoteSearchResult>>(new List<RemoteSearchResult>());
|
||||
var list = new List<RemoteSearchResult>();
|
||||
|
||||
// The search query must either provide an episode number or date
|
||||
if (!searchInfo.IndexNumber.HasValue || !searchInfo.ParentIndexNumber.HasValue)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
|
||||
var metadataResult = await GetMetadata(searchInfo, cancellationToken);
|
||||
|
||||
if (metadataResult.HasMetadata)
|
||||
{
|
||||
var item = metadataResult.Item;
|
||||
|
||||
list.Add(new RemoteSearchResult
|
||||
{
|
||||
IndexNumber = item.IndexNumber,
|
||||
Name = item.Name,
|
||||
ParentIndexNumber = item.ParentIndexNumber,
|
||||
PremiereDate = item.PremiereDate,
|
||||
ProductionYear = item.ProductionYear,
|
||||
ProviderIds = item.ProviderIds,
|
||||
SearchProviderName = Name,
|
||||
IndexNumberEnd = item.IndexNumberEnd
|
||||
});
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public async Task<MetadataResult<Episode>> GetMetadata(EpisodeInfo info, CancellationToken cancellationToken)
|
||||
|
|
|
@ -561,8 +561,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
|||
{
|
||||
throw new ArgumentNullException("name");
|
||||
}
|
||||
|
||||
return ("Channel " + name).GetMBId(typeof(Channel));
|
||||
return _libraryManager.GetNewItemId("Channel " + name, typeof(Channel));
|
||||
}
|
||||
|
||||
public async Task<QueryResult<BaseItemDto>> GetLatestChannelItems(AllChannelMediaQuery query, CancellationToken cancellationToken)
|
||||
|
|
|
@ -508,7 +508,12 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||
.Replace("/", "\\");
|
||||
}
|
||||
|
||||
key = type.FullName + key.ToLower();
|
||||
if (!ConfigurationManager.Configuration.EnableCaseSensitiveItemIds)
|
||||
{
|
||||
key = key.ToLower();
|
||||
}
|
||||
|
||||
key = type.FullName + key;
|
||||
|
||||
return key.GetMD5();
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||
|
||||
var channels = channelResult.Items;
|
||||
|
||||
if (user.Configuration.DisplayChannelsInline && channels.Length > 0)
|
||||
if (!user.Configuration.DisplayChannelsInline && channels.Length > 0)
|
||||
{
|
||||
list.Add(await _channelManager.GetInternalChannelFolder(cancellationToken).ConfigureAwait(false));
|
||||
}
|
||||
|
|
|
@ -25,14 +25,16 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||
private readonly IUserDataManager _userDataManager;
|
||||
private readonly IDtoService _dtoService;
|
||||
private readonly IApplicationHost _appHost;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
|
||||
public LiveTvDtoService(IDtoService dtoService, IUserDataManager userDataManager, IImageProcessor imageProcessor, ILogger logger, IApplicationHost appHost)
|
||||
public LiveTvDtoService(IDtoService dtoService, IUserDataManager userDataManager, IImageProcessor imageProcessor, ILogger logger, IApplicationHost appHost, ILibraryManager libraryManager)
|
||||
{
|
||||
_dtoService = dtoService;
|
||||
_userDataManager = userDataManager;
|
||||
_imageProcessor = imageProcessor;
|
||||
_logger = logger;
|
||||
_appHost = appHost;
|
||||
_libraryManager = libraryManager;
|
||||
}
|
||||
|
||||
public TimerInfoDto GetTimerInfoDto(TimerInfo info, ILiveTvService service, LiveTvProgram program, LiveTvChannel channel)
|
||||
|
@ -200,7 +202,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||
{
|
||||
var name = serviceName + externalId + InternalVersionNumber;
|
||||
|
||||
return name.ToLower().GetMBId(typeof(LiveTvChannel));
|
||||
return _libraryManager.GetNewItemId(name.ToLower(), typeof(LiveTvChannel));
|
||||
}
|
||||
|
||||
public Guid GetInternalTimerId(string serviceName, string externalId)
|
||||
|
@ -221,14 +223,14 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||
{
|
||||
var name = serviceName + externalId + InternalVersionNumber;
|
||||
|
||||
return name.ToLower().GetMBId(typeof(LiveTvProgram));
|
||||
return _libraryManager.GetNewItemId(name.ToLower(), typeof(LiveTvProgram));
|
||||
}
|
||||
|
||||
public Guid GetInternalRecordingId(string serviceName, string externalId)
|
||||
{
|
||||
var name = serviceName + externalId + InternalVersionNumber + "0";
|
||||
|
||||
return name.ToLower().GetMBId(typeof(ILiveTvRecording));
|
||||
return _libraryManager.GetNewItemId(name.ToLower(), typeof(ILiveTvRecording));
|
||||
}
|
||||
|
||||
public async Task<TimerInfo> GetTimerInfo(TimerInfoDto dto, bool isNew, LiveTvManager liveTv, CancellationToken cancellationToken)
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||
_dtoService = dtoService;
|
||||
_userDataManager = userDataManager;
|
||||
|
||||
_tvDtoService = new LiveTvDtoService(dtoService, userDataManager, imageProcessor, logger, appHost);
|
||||
_tvDtoService = new LiveTvDtoService(dtoService, userDataManager, imageProcessor, logger, appHost, _libraryManager);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -141,8 +141,8 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
var connectionstr = new SQLiteConnectionStringBuilder
|
||||
{
|
||||
PageSize = 4096,
|
||||
CacheSize = 4096,
|
||||
SyncMode = SynchronizationModes.Normal,
|
||||
CacheSize = 2000,
|
||||
SyncMode = SynchronizationModes.Full,
|
||||
DataSource = dbPath,
|
||||
JournalMode = SQLiteJournalModeEnum.Wal
|
||||
};
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
|
||||
private IDbCommand _updateInheritedRatingCommand;
|
||||
|
||||
private const int LatestSchemaVersion = 48;
|
||||
private const int LatestSchemaVersion = 49;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
|
||||
|
|
Loading…
Reference in New Issue
Block a user