commit
86d786e4b0
|
@ -906,8 +906,10 @@ namespace MediaBrowser.LocalMetadata.Parsers
|
||||||
private void FetchFromTaglinesNode(XmlReader reader, T item)
|
private void FetchFromTaglinesNode(XmlReader reader, T item)
|
||||||
{
|
{
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
while (reader.Read())
|
// Loop through each element
|
||||||
|
while (!reader.EOF)
|
||||||
{
|
{
|
||||||
if (reader.NodeType == XmlNodeType.Element)
|
if (reader.NodeType == XmlNodeType.Element)
|
||||||
{
|
{
|
||||||
|
@ -923,12 +925,15 @@ namespace MediaBrowser.LocalMetadata.Parsers
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
reader.Skip();
|
reader.Skip();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reader.Read();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -718,8 +718,10 @@ namespace MediaBrowser.LocalMetadata.Savers
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (reader.Read())
|
while (!reader.EOF)
|
||||||
{
|
{
|
||||||
if (reader.NodeType == XmlNodeType.Element)
|
if (reader.NodeType == XmlNodeType.Element)
|
||||||
{
|
{
|
||||||
|
@ -734,6 +736,10 @@ namespace MediaBrowser.LocalMetadata.Savers
|
||||||
reader.Skip();
|
reader.Skip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reader.Read();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -915,7 +915,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
var mapArg = imageStreamIndex.HasValue ? (" -map 0:v:" + imageStreamIndex.Value.ToString(CultureInfo.InvariantCulture)) : string.Empty;
|
var mapArg = imageStreamIndex.HasValue ? (" -map 0:v:" + imageStreamIndex.Value.ToString(CultureInfo.InvariantCulture)) : string.Empty;
|
||||||
|
|
||||||
var enableThumbnail = !new List<string> { "wtv" }.Contains(container ?? string.Empty, StringComparer.OrdinalIgnoreCase);
|
var enableThumbnail = !new List<string> { "wtv" }.Contains(container ?? string.Empty, StringComparer.OrdinalIgnoreCase);
|
||||||
var thumbnail = enableThumbnail ? ",thumbnail=30" : string.Empty;
|
var thumbnail = enableThumbnail ? ",thumbnail=24" : string.Empty;
|
||||||
|
|
||||||
// Use ffmpeg to sample 100 (we can drop this if required using thumbnail=50 for 50 frames) frames and pick the best thumbnail. Have a fall back just in case.
|
// Use ffmpeg to sample 100 (we can drop this if required using thumbnail=50 for 50 frames) frames and pick the best thumbnail. Have a fall back just in case.
|
||||||
var args = useIFrame ? string.Format("-i {0}{3} -threads 0 -v quiet -vframes 1 -vf \"{2}{4}\" -f image2 \"{1}\"", inputPath, tempExtractPath, vf, mapArg, thumbnail) :
|
var args = useIFrame ? string.Format("-i {0}{3} -threads 0 -v quiet -vframes 1 -vf \"{2}{4}\" -f image2 \"{1}\"", inputPath, tempExtractPath, vf, mapArg, thumbnail) :
|
||||||
|
|
|
@ -200,9 +200,10 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||||
using (var reader = XmlReader.Create(streamReader))
|
using (var reader = XmlReader.Create(streamReader))
|
||||||
{
|
{
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (reader.Read())
|
while (!reader.EOF)
|
||||||
{
|
{
|
||||||
if (reader.NodeType == XmlNodeType.Element)
|
if (reader.NodeType == XmlNodeType.Element)
|
||||||
{
|
{
|
||||||
|
@ -219,6 +220,10 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reader.Read();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -227,13 +232,14 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||||
|
|
||||||
private void ReadFromDictNode(XmlReader reader, MediaInfo info)
|
private void ReadFromDictNode(XmlReader reader, MediaInfo info)
|
||||||
{
|
{
|
||||||
reader.MoveToContent();
|
|
||||||
|
|
||||||
string currentKey = null;
|
string currentKey = null;
|
||||||
List<NameValuePair> pairs = new List<NameValuePair>();
|
List<NameValuePair> pairs = new List<NameValuePair>();
|
||||||
|
|
||||||
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (reader.Read())
|
while (!reader.EOF)
|
||||||
{
|
{
|
||||||
if (reader.NodeType == XmlNodeType.Element)
|
if (reader.NodeType == XmlNodeType.Element)
|
||||||
{
|
{
|
||||||
|
@ -272,17 +278,23 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reader.Read();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<NameValuePair> ReadValueArray(XmlReader reader)
|
private List<NameValuePair> ReadValueArray(XmlReader reader)
|
||||||
{
|
{
|
||||||
reader.MoveToContent();
|
|
||||||
|
|
||||||
List<NameValuePair> pairs = new List<NameValuePair>();
|
List<NameValuePair> pairs = new List<NameValuePair>();
|
||||||
|
|
||||||
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (reader.Read())
|
while (!reader.EOF)
|
||||||
{
|
{
|
||||||
if (reader.NodeType == XmlNodeType.Element)
|
if (reader.NodeType == XmlNodeType.Element)
|
||||||
{
|
{
|
||||||
|
@ -303,6 +315,10 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reader.Read();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return pairs;
|
return pairs;
|
||||||
|
@ -360,13 +376,14 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||||
|
|
||||||
private NameValuePair GetNameValuePair(XmlReader reader)
|
private NameValuePair GetNameValuePair(XmlReader reader)
|
||||||
{
|
{
|
||||||
reader.MoveToContent();
|
|
||||||
|
|
||||||
string name = null;
|
string name = null;
|
||||||
string value = null;
|
string value = null;
|
||||||
|
|
||||||
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (reader.Read())
|
while (!reader.EOF)
|
||||||
{
|
{
|
||||||
if (reader.NodeType == XmlNodeType.Element)
|
if (reader.NodeType == XmlNodeType.Element)
|
||||||
{
|
{
|
||||||
|
@ -383,6 +400,10 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reader.Read();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(name) ||
|
if (string.IsNullOrWhiteSpace(name) ||
|
||||||
|
|
|
@ -265,6 +265,7 @@ namespace MediaBrowser.Providers.Music
|
||||||
var list = new List<ReleaseResult>();
|
var list = new List<ReleaseResult>();
|
||||||
|
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (!reader.EOF)
|
while (!reader.EOF)
|
||||||
|
@ -302,6 +303,7 @@ namespace MediaBrowser.Providers.Music
|
||||||
var list = new List<ReleaseResult>();
|
var list = new List<ReleaseResult>();
|
||||||
|
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (!reader.EOF)
|
while (!reader.EOF)
|
||||||
|
@ -348,7 +350,6 @@ namespace MediaBrowser.Providers.Music
|
||||||
};
|
};
|
||||||
|
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
|
||||||
reader.Read();
|
reader.Read();
|
||||||
|
|
||||||
// http://stackoverflow.com/questions/2299632/why-does-xmlreader-skip-every-other-element-if-there-is-no-whitespace-separator
|
// http://stackoverflow.com/questions/2299632/why-does-xmlreader-skip-every-other-element-if-there-is-no-whitespace-separator
|
||||||
|
@ -428,6 +429,7 @@ namespace MediaBrowser.Providers.Music
|
||||||
using (var reader = XmlReader.Create(oReader, settings))
|
using (var reader = XmlReader.Create(oReader, settings))
|
||||||
{
|
{
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (!reader.EOF)
|
while (!reader.EOF)
|
||||||
|
@ -464,6 +466,7 @@ namespace MediaBrowser.Providers.Music
|
||||||
private string GetFirstReleaseGroupId(XmlReader reader)
|
private string GetFirstReleaseGroupId(XmlReader reader)
|
||||||
{
|
{
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (!reader.EOF)
|
while (!reader.EOF)
|
||||||
|
|
|
@ -86,6 +86,7 @@ namespace MediaBrowser.Providers.Music
|
||||||
using (var reader = XmlReader.Create(oReader, settings))
|
using (var reader = XmlReader.Create(oReader, settings))
|
||||||
{
|
{
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (!reader.EOF)
|
while (!reader.EOF)
|
||||||
|
@ -124,6 +125,7 @@ namespace MediaBrowser.Providers.Music
|
||||||
var list = new List<RemoteSearchResult>();
|
var list = new List<RemoteSearchResult>();
|
||||||
|
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (!reader.EOF)
|
while (!reader.EOF)
|
||||||
|
|
|
@ -195,9 +195,10 @@ namespace MediaBrowser.Providers.TV
|
||||||
using (var reader = XmlReader.Create(streamReader, settings))
|
using (var reader = XmlReader.Create(streamReader, settings))
|
||||||
{
|
{
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (reader.Read())
|
while (!reader.EOF)
|
||||||
{
|
{
|
||||||
if (reader.NodeType == XmlNodeType.Element)
|
if (reader.NodeType == XmlNodeType.Element)
|
||||||
{
|
{
|
||||||
|
@ -212,6 +213,10 @@ namespace MediaBrowser.Providers.TV
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reader.Read();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,9 +271,10 @@ namespace MediaBrowser.Providers.TV
|
||||||
using (var reader = XmlReader.Create(streamReader, settings))
|
using (var reader = XmlReader.Create(streamReader, settings))
|
||||||
{
|
{
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (reader.Read())
|
while (!reader.EOF)
|
||||||
{
|
{
|
||||||
if (reader.NodeType == XmlNodeType.Element)
|
if (reader.NodeType == XmlNodeType.Element)
|
||||||
{
|
{
|
||||||
|
@ -290,6 +296,10 @@ namespace MediaBrowser.Providers.TV
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reader.Read();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -334,9 +334,10 @@ namespace MediaBrowser.Providers.TV
|
||||||
private string FindSeriesId(XmlReader reader)
|
private string FindSeriesId(XmlReader reader)
|
||||||
{
|
{
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (reader.Read())
|
while (!reader.EOF)
|
||||||
{
|
{
|
||||||
if (reader.NodeType == XmlNodeType.Element)
|
if (reader.NodeType == XmlNodeType.Element)
|
||||||
{
|
{
|
||||||
|
@ -359,6 +360,10 @@ namespace MediaBrowser.Providers.TV
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reader.Read();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -71,9 +71,6 @@
|
||||||
<Reference Include="ServiceStack.Api.Swagger">
|
<Reference Include="ServiceStack.Api.Swagger">
|
||||||
<HintPath>..\ThirdParty\ServiceStack\ServiceStack.Api.Swagger.dll</HintPath>
|
<HintPath>..\ThirdParty\ServiceStack\ServiceStack.Api.Swagger.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ServiceStack.Common">
|
|
||||||
<HintPath>..\ThirdParty\ServiceStack\ServiceStack.Common.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="SharpCompress, Version=0.10.3.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="SharpCompress, Version=0.10.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\ThirdParty\SharpCompress\SharpCompress.dll</HintPath>
|
<HintPath>..\ThirdParty\SharpCompress\SharpCompress.dll</HintPath>
|
||||||
|
|
|
@ -1057,8 +1057,10 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
// Loop through each element
|
// Loop through each element
|
||||||
while (reader.Read())
|
while (!reader.EOF)
|
||||||
{
|
{
|
||||||
if (reader.NodeType == XmlNodeType.Element)
|
if (reader.NodeType == XmlNodeType.Element)
|
||||||
{
|
{
|
||||||
|
@ -1073,6 +1075,10 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
||||||
reader.Skip();
|
reader.Skip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reader.Read();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user