aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Channels
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-05-06 16:20:25 -0400
committerGitHub <noreply@github.com>2017-05-06 16:20:25 -0400
commit21edff3ac2175190e0bca98c9a2f967c79ee57c2 (patch)
tree6beddce4dffa97eb199da99867f6b493ce197e64 /Emby.Server.Implementations/Channels
parent3e29d73d0c77c682e161c413703d5e36a8466885 (diff)
parent90452d2faf5e0f34698873707e9e505df3c52f9c (diff)
Merge pull request #2618 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Implementations/Channels')
-rw-r--r--Emby.Server.Implementations/Channels/ChannelManager.cs19
1 files changed, 4 insertions, 15 deletions
diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs
index 8f03fa7a4..0cdd934b7 100644
--- a/Emby.Server.Implementations/Channels/ChannelManager.cs
+++ b/Emby.Server.Implementations/Channels/ChannelManager.cs
@@ -268,24 +268,14 @@ namespace Emby.Server.Implementations.Channels
return;
}
- _fileSystem.CreateDirectory(Path.GetDirectoryName(path));
+ _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(path));
_jsonSerializer.SerializeToFile(mediaSources, path);
}
public async Task<IEnumerable<MediaSourceInfo>> GetStaticMediaSources(BaseItem item, CancellationToken cancellationToken)
{
- IEnumerable<ChannelMediaInfo> results = new List<ChannelMediaInfo>();
- var video = item as Video;
- if (video != null)
- {
- results = video.ChannelMediaSources;
- }
- var audio = item as Audio;
- if (audio != null)
- {
- results = audio.ChannelMediaSources ?? GetSavedMediaSources(audio);
- }
+ IEnumerable<ChannelMediaInfo> results = GetSavedMediaSources(item);
return SortMediaInfoResults(results)
.Select(i => GetMediaSource(item, i))
@@ -1115,7 +1105,7 @@ namespace Emby.Server.Implementations.Channels
{
try
{
- _fileSystem.CreateDirectory(Path.GetDirectoryName(path));
+ _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(path));
_jsonSerializer.SerializeToFile(result, path);
}
@@ -1378,7 +1368,6 @@ namespace Emby.Server.Implementations.Channels
if (channelVideoItem != null)
{
channelVideoItem.ExtraType = info.ExtraType;
- channelVideoItem.ChannelMediaSources = info.MediaSources;
var mediaSource = info.MediaSources.FirstOrDefault();
item.Path = mediaSource == null ? null : mediaSource.Path;
@@ -1427,7 +1416,7 @@ namespace Emby.Server.Implementations.Channels
if (!_refreshedItems.ContainsKey(program.Id))
{
_refreshedItems.TryAdd(program.Id, true);
- _providerManager.QueueRefresh(program.Id, new MetadataRefreshOptions(_fileSystem));
+ _providerManager.QueueRefresh(program.Id, new MetadataRefreshOptions(_fileSystem), RefreshPriority.Low);
}
}