remove dead code

This commit is contained in:
Luke Pulverenti 2017-01-26 23:15:05 -05:00
parent 338d5ee993
commit 8a252c8ad6
5 changed files with 20 additions and 42 deletions

View File

@ -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; return path;
} }

View File

@ -2704,21 +2704,25 @@ namespace MediaBrowser.Api.Playback
//inputModifier += " -noaccurate_seek"; //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(stream.Codec) && stream.Index != -1)
if (!string.IsNullOrWhiteSpace(decoder))
{ {
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; //var videoStream = state.VideoStream;
//if (videoStream != null && !string.IsNullOrWhiteSpace(videoStream.Codec)) //if (videoStream != null && !string.IsNullOrWhiteSpace(videoStream.Codec))
//{ //{
@ -2737,18 +2741,16 @@ namespace MediaBrowser.Api.Playback
private string GetDecoderFromCodec(string codec) 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 codec;
//{
// return null;
//}
//if (string.Equals(codec, "aac_latm", StringComparison.OrdinalIgnoreCase))
//{
// return null;
//}
//return codec;
} }
/// <summary> /// <summary>

View File

@ -1,8 +0,0 @@
namespace MediaBrowser.Model.Configuration
{
public class PathSubstitution
{
public string From { get; set; }
public string To { get; set; }
}
}

View File

@ -163,8 +163,6 @@ namespace MediaBrowser.Model.Configuration
public bool SkipDeserializationForPrograms { get; set; } public bool SkipDeserializationForPrograms { get; set; }
public bool SkipDeserializationForAudio { get; set; } public bool SkipDeserializationForAudio { get; set; }
public PathSubstitution[] PathSubstitutions { get; set; }
public string ServerName { get; set; } public string ServerName { get; set; }
public string WanDdns { get; set; } public string WanDdns { get; set; }
@ -229,7 +227,6 @@ namespace MediaBrowser.Model.Configuration
LibraryMonitorDelay = 60; LibraryMonitorDelay = 60;
PathSubstitutions = new PathSubstitution[] { };
ContentTypes = new NameValuePair[] { }; ContentTypes = new NameValuePair[] { };
PreferredMetadataLanguage = "en"; PreferredMetadataLanguage = "en";

View File

@ -198,7 +198,6 @@
<Compile Include="Notifications\NotificationOption.cs" /> <Compile Include="Notifications\NotificationOption.cs" />
<Compile Include="Notifications\NotificationOptions.cs" /> <Compile Include="Notifications\NotificationOptions.cs" />
<Compile Include="Notifications\NotificationType.cs" /> <Compile Include="Notifications\NotificationType.cs" />
<Compile Include="Configuration\PathSubstitution.cs" />
<Compile Include="Notifications\SendToUserType.cs" /> <Compile Include="Notifications\SendToUserType.cs" />
<Compile Include="Configuration\ServerConfiguration.cs" /> <Compile Include="Configuration\ServerConfiguration.cs" />
<Compile Include="Playlists\PlaylistCreationRequest.cs" /> <Compile Include="Playlists\PlaylistCreationRequest.cs" />