mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 05:48:47 +01:00
removed dead db fields
This commit is contained in:
@@ -303,7 +303,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||
|
||||
try
|
||||
{
|
||||
var files = _fileSystem.GetFiles(parentPath);
|
||||
var files = _fileSystem.GetFiles(parentPath);
|
||||
|
||||
if (string.Equals(item.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
@@ -396,7 +396,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||
{
|
||||
_logger.Debug("Creating directory {0}", path);
|
||||
|
||||
_fileSystem.CreateDirectory(path);
|
||||
_fileSystem.CreateDirectory(path);
|
||||
fileInfo = new DirectoryInfo(path);
|
||||
|
||||
if (!fileInfo.Exists)
|
||||
@@ -417,16 +417,22 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||
Id = id,
|
||||
DateCreated = _fileSystem.GetCreationTimeUtc(fileInfo),
|
||||
DateModified = _fileSystem.GetLastWriteTimeUtc(fileInfo),
|
||||
Path = path
|
||||
Path = path,
|
||||
ChannelId = channelInfo.Name.GetMD5().ToString("N")
|
||||
};
|
||||
|
||||
isNew = true;
|
||||
}
|
||||
|
||||
var channelId = channelInfo.Name.GetMD5().ToString("N");
|
||||
if (!string.Equals(item.ChannelId, channelId, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
isNew = true;
|
||||
}
|
||||
|
||||
item.OfficialRating = GetOfficialRating(channelInfo.ParentalRating);
|
||||
item.Overview = channelInfo.Description;
|
||||
item.HomePageUrl = channelInfo.HomePageUrl;
|
||||
item.OriginalChannelName = channelInfo.Name;
|
||||
|
||||
if (string.IsNullOrEmpty(item.Name))
|
||||
{
|
||||
@@ -1067,7 +1073,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||
{
|
||||
try
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
_jsonSerializer.SerializeToFile(result, path);
|
||||
}
|
||||
@@ -1296,7 +1302,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||
|
||||
internal IChannel GetChannelProvider(Channel channel)
|
||||
{
|
||||
return GetAllChannels().First(i => string.Equals(i.Name, channel.OriginalChannelName, StringComparison.OrdinalIgnoreCase));
|
||||
return GetAllChannels().First(i => string.Equals(i.Name.GetMD5().ToString("N"), channel.ChannelId, StringComparison.OrdinalIgnoreCase) || string.Equals(i.Name, channel.Name, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
private IEnumerable<BaseItem> ApplyFilters(IEnumerable<BaseItem> items, IEnumerable<ItemFilter> filters, User user)
|
||||
@@ -1447,7 +1453,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||
options.RequestHeaders[header.Key] = header.Value;
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(destination));
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(destination));
|
||||
|
||||
// Determine output extension
|
||||
var response = await _httpClient.GetTempFileResponse(options).ConfigureAwait(false);
|
||||
@@ -1485,7 +1491,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||
throw new ApplicationException("Unexpected response type encountered: " + response.ContentType);
|
||||
}
|
||||
|
||||
_fileSystem.CopyFile(response.TempFilePath, destination, true);
|
||||
_fileSystem.CopyFile(response.TempFilePath, destination, true);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user