fix case sensitive file names

This commit is contained in:
Luke Pulverenti
2014-10-09 18:22:04 -04:00
parent ad6f47329f
commit 74a8ca9c38
30 changed files with 155 additions and 68 deletions

View File

@@ -145,8 +145,10 @@ namespace MediaBrowser.Model.Dlna
switch (condition.Condition)
{
case ProfileConditionType.SubstringOf:
return StringHelper.IndexOfIgnoreCase(currentValue, expected) != -1;
case ProfileConditionType.EqualsAny:
{
return ListHelper.ContainsIgnoreCase(expected.Split('|'), currentValue);
}
case ProfileConditionType.Equals:
return StringHelper.EqualsIgnoreCase(currentValue, expected);
case ProfileConditionType.NotEquals:

View File

@@ -6,6 +6,6 @@
NotEquals = 1,
LessThanEqual = 2,
GreaterThanEqual = 3,
SubstringOf = 4
EqualsAny = 4
}
}

View File

@@ -32,7 +32,7 @@ namespace MediaBrowser.Model.Dlna.Profiles
VideoCodec = "h264",
AudioCodec = "aac",
Type = DlnaProfileType.Video,
VideoProfile = "Baseline",
VideoProfile = "baseline",
Context = EncodingContext.Streaming
});
}
@@ -42,7 +42,7 @@ namespace MediaBrowser.Model.Dlna.Profiles
VideoCodec = "h264",
AudioCodec = "aac",
Type = DlnaProfileType.Video,
VideoProfile = "Baseline",
VideoProfile = "baseline",
Context = EncodingContext.Static
});
@@ -102,7 +102,7 @@ namespace MediaBrowser.Model.Dlna.Profiles
Conditions = new []
{
new ProfileCondition(ProfileConditionType.SubstringOf, ProfileConditionValue.VideoProfile, "baseline"),
new ProfileCondition(ProfileConditionType.EqualsAny, ProfileConditionValue.VideoProfile, "baseline|constrained baseline"),
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Width, "1920"),
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Height, "1080"),
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.VideoBitDepth, "8"),

View File

@@ -291,6 +291,7 @@ namespace MediaBrowser.Model.Dlna
playlistItem.VideoCodec = transcodingProfile.VideoCodec;
playlistItem.Protocol = transcodingProfile.Protocol;
playlistItem.AudioStreamIndex = audioStreamIndex;
playlistItem.VideoProfile = transcodingProfile.VideoProfile;
List<ProfileCondition> videoTranscodingConditions = new List<ProfileCondition>();
foreach (CodecProfile i in options.Profile.CodecProfiles)

View File

@@ -142,6 +142,7 @@ namespace MediaBrowser.Model.Dlna
list.Add(item.IsDirectStream ? string.Empty : DateTime.UtcNow.Ticks.ToString(CultureInfo.InvariantCulture));
list.Add(item.MaxRefFrames.HasValue ? StringHelper.ToStringCultureInvariant(item.MaxRefFrames.Value) : string.Empty);
list.Add(item.MaxVideoBitDepth.HasValue ? StringHelper.ToStringCultureInvariant(item.MaxVideoBitDepth.Value) : string.Empty);
list.Add(item.VideoProfile ?? string.Empty);
return string.Format("Params={0}", string.Join(";", list.ToArray()));
}