aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs12
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs38
-rw-r--r--MediaBrowser.Model/Configuration/PathSubstitution.cs8
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs3
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj1
5 files changed, 20 insertions, 42 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 57c9551d5..de029cd22 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -2619,18 +2619,6 @@ namespace Emby.Server.Implementations.Library
}
}
- foreach (var map in ConfigurationManager.Configuration.PathSubstitutions)
- {
- if (!string.IsNullOrWhiteSpace(map.From))
- {
- var substitutionResult = SubstitutePathInternal(path, map.From, map.To);
- if (substitutionResult.Item2)
- {
- return substitutionResult.Item1;
- }
- }
- }
-
return path;
}
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 120c00a14..0e05c79ca 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -2704,21 +2704,25 @@ namespace MediaBrowser.Api.Playback
//inputModifier += " -noaccurate_seek";
}
- foreach (var stream in state.MediaSource.MediaStreams)
+ if (state.RunTimeTicks.HasValue)
{
- if (!stream.IsExternal && stream.Type != MediaStreamType.Subtitle)
+ foreach (var stream in state.MediaSource.MediaStreams)
{
- if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1)
+ if (!stream.IsExternal && stream.Type != MediaStreamType.Subtitle)
{
- var decoder = GetDecoderFromCodec(stream.Codec);
-
- if (!string.IsNullOrWhiteSpace(decoder))
+ if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1)
{
- inputModifier += " -codec:" + stream.Index.ToString(UsCulture) + " " + decoder;
+ var decoder = GetDecoderFromCodec(stream.Codec);
+
+ if (!string.IsNullOrWhiteSpace(decoder))
+ {
+ inputModifier += " -codec:" + stream.Index.ToString(UsCulture) + " " + decoder;
+ }
}
}
}
}
+
//var videoStream = state.VideoStream;
//if (videoStream != null && !string.IsNullOrWhiteSpace(videoStream.Codec))
//{
@@ -2737,18 +2741,16 @@ namespace MediaBrowser.Api.Playback
private string GetDecoderFromCodec(string codec)
{
- return null;
-
- //if (string.Equals(codec, "mp2", StringComparison.OrdinalIgnoreCase))
- //{
- // return null;
- //}
- //if (string.Equals(codec, "aac_latm", StringComparison.OrdinalIgnoreCase))
- //{
- // return null;
- //}
+ if (string.Equals(codec, "mp2", StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
+ if (string.Equals(codec, "aac_latm", StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
- //return codec;
+ return codec;
}
/// <summary>
diff --git a/MediaBrowser.Model/Configuration/PathSubstitution.cs b/MediaBrowser.Model/Configuration/PathSubstitution.cs
deleted file mode 100644
index 576dd2d5a..000000000
--- a/MediaBrowser.Model/Configuration/PathSubstitution.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace MediaBrowser.Model.Configuration
-{
- public class PathSubstitution
- {
- public string From { get; set; }
- public string To { get; set; }
- }
-} \ No newline at end of file
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index 50837292d..3144e8469 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -163,8 +163,6 @@ namespace MediaBrowser.Model.Configuration
public bool SkipDeserializationForPrograms { get; set; }
public bool SkipDeserializationForAudio { get; set; }
- public PathSubstitution[] PathSubstitutions { get; set; }
-
public string ServerName { get; set; }
public string WanDdns { get; set; }
@@ -229,7 +227,6 @@ namespace MediaBrowser.Model.Configuration
LibraryMonitorDelay = 60;
- PathSubstitutions = new PathSubstitution[] { };
ContentTypes = new NameValuePair[] { };
PreferredMetadataLanguage = "en";
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 4457c6dc2..c50ee984e 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -198,7 +198,6 @@
<Compile Include="Notifications\NotificationOption.cs" />
<Compile Include="Notifications\NotificationOptions.cs" />
<Compile Include="Notifications\NotificationType.cs" />
- <Compile Include="Configuration\PathSubstitution.cs" />
<Compile Include="Notifications\SendToUserType.cs" />
<Compile Include="Configuration\ServerConfiguration.cs" />
<Compile Include="Playlists\PlaylistCreationRequest.cs" />