diff --git a/MediaBrowser.Controller/Providers/MediaInfo/BaseFFProbeProvider.cs b/MediaBrowser.Controller/Providers/MediaInfo/BaseFFProbeProvider.cs
index 7232b6379c..4c86e909ba 100644
--- a/MediaBrowser.Controller/Providers/MediaInfo/BaseFFProbeProvider.cs
+++ b/MediaBrowser.Controller/Providers/MediaInfo/BaseFFProbeProvider.cs
@@ -277,11 +277,7 @@ namespace MediaBrowser.Controller.Providers.MediaInfo
{
stream.Type = MediaStreamType.Subtitle;
}
- else if (streamInfo.codec_type.Equals("data", StringComparison.OrdinalIgnoreCase))
- {
- stream.Type = MediaStreamType.Data;
- }
- else
+ else if (streamInfo.codec_type.Equals("video", StringComparison.OrdinalIgnoreCase))
{
stream.Type = MediaStreamType.Video;
@@ -293,6 +289,10 @@ namespace MediaBrowser.Controller.Providers.MediaInfo
stream.AverageFrameRate = GetFrameRate(streamInfo.avg_frame_rate);
stream.RealFrameRate = GetFrameRate(streamInfo.r_frame_rate);
}
+ else
+ {
+ return null;
+ }
// Get stream bitrate
if (stream.Type != MediaStreamType.Subtitle)
diff --git a/MediaBrowser.Controller/Providers/MediaInfo/FFProbeAudioInfoProvider.cs b/MediaBrowser.Controller/Providers/MediaInfo/FFProbeAudioInfoProvider.cs
index d55388acc1..1747f3003f 100644
--- a/MediaBrowser.Controller/Providers/MediaInfo/FFProbeAudioInfoProvider.cs
+++ b/MediaBrowser.Controller/Providers/MediaInfo/FFProbeAudioInfoProvider.cs
@@ -51,7 +51,9 @@ namespace MediaBrowser.Controller.Providers.MediaInfo
return;
}
- audio.MediaStreams = data.streams.Select(s => GetMediaStream(s, data.format)).ToList();
+ audio.MediaStreams = data.streams.Select(s => GetMediaStream(s, data.format))
+ .Where(i => i != null)
+ .ToList();
// Get the first audio stream
var stream = data.streams.First(s => s.codec_type.Equals("audio", StringComparison.OrdinalIgnoreCase));
@@ -146,7 +148,7 @@ namespace MediaBrowser.Controller.Providers.MediaInfo
///
/// The val.
/// System.String[][].
- private string[] Split(string val)
+ private string[] Split(string val)
{
// Only use the comma as a delimeter if there are no slashes or pipes.
// We want to be careful not to split names that have commas in them
@@ -168,7 +170,7 @@ namespace MediaBrowser.Controller.Providers.MediaInfo
if (!string.IsNullOrEmpty(val))
{
var studios =
- val.Split(new[] {'/', '|'}, StringSplitOptions.RemoveEmptyEntries)
+ val.Split(new[] { '/', '|' }, StringSplitOptions.RemoveEmptyEntries)
.Where(i => !string.Equals(i, audio.Artist, StringComparison.OrdinalIgnoreCase) && !string.Equals(i, audio.AlbumArtist, StringComparison.OrdinalIgnoreCase));
audio.Studios.Clear();
diff --git a/MediaBrowser.Controller/Providers/MediaInfo/FFProbeVideoInfoProvider.cs b/MediaBrowser.Controller/Providers/MediaInfo/FFProbeVideoInfoProvider.cs
index 0fb3c853ad..93533b4f06 100644
--- a/MediaBrowser.Controller/Providers/MediaInfo/FFProbeVideoInfoProvider.cs
+++ b/MediaBrowser.Controller/Providers/MediaInfo/FFProbeVideoInfoProvider.cs
@@ -213,7 +213,9 @@ namespace MediaBrowser.Controller.Providers.MediaInfo
if (data.streams != null)
{
- video.MediaStreams = data.streams.Select(s => GetMediaStream(s, data.format)).ToList();
+ video.MediaStreams = data.streams.Select(s => GetMediaStream(s, data.format))
+ .Where(i => i != null)
+ .ToList();
}
if (data.Chapters != null)
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index 657a20b8dd..170a8db68c 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -143,10 +143,6 @@ namespace MediaBrowser.Model.Entities
///
/// The subtitle
///
- Subtitle,
- ///
- /// The data
- ///
- Data
+ Subtitle
}
}
diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js
index 3c53077836..05f814034f 100644
--- a/MediaBrowser.WebDashboard/ApiClient.js
+++ b/MediaBrowser.WebDashboard/ApiClient.js
@@ -95,9 +95,11 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
return name;
}());
- function encodeName(name) {
- return encodeURIComponent(name).replace("'", '%27');
- }
+ self.encodeName = function (name) {
+
+ var val = $.param({ name: name });
+ return val.substring(val.indexOf('=') + 1).replace("'", '%27');
+ };
/**
* Wraps around jQuery ajax methods to add additional info to the request.
@@ -874,7 +876,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
options.userId = userId;
}
- var url = self.getUrl("Studios/" + encodeName(name), options);
+ var url = self.getUrl("Studios/" + self.encodeName(name), options);
return self.ajax({
type: "GET",
@@ -898,7 +900,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
options.userId = userId;
}
- var url = self.getUrl("Genres/" + encodeName(name), options);
+ var url = self.getUrl("Genres/" + self.encodeName(name), options);
return self.ajax({
type: "GET",
@@ -922,7 +924,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
options.userId = userId;
}
- var url = self.getUrl("Artists/" + encodeName(name), options);
+ var url = self.getUrl("Artists/" + self.encodeName(name), options);
return self.ajax({
type: "GET",
@@ -946,7 +948,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
options.userId = userId;
}
- var url = self.getUrl("Years/" + encodeName(name), options);
+ var url = self.getUrl("Years/" + self.encodeName(name), options);
return self.ajax({
type: "GET",
@@ -970,7 +972,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
options.userId = userId;
}
- var url = self.getUrl("Persons/" + encodeName(name), options);
+ var url = self.getUrl("Persons/" + self.encodeName(name), options);
return self.ajax({
type: "GET",
@@ -1096,7 +1098,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
};
- var url = "Persons/" + encodeName(name) + "/Images/" + options.type;
+ var url = "Persons/" + self.encodeName(name) + "/Images/" + options.type;
if (options.index != null) {
url += "/" + options.index;
@@ -1166,7 +1168,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
};
- var url = "Genres/" + encodeName(name) + "/Images/" + options.type;
+ var url = "Genres/" + self.encodeName(name) + "/Images/" + options.type;
if (options.index != null) {
url += "/" + options.index;
@@ -1201,7 +1203,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
};
- var url = "Artists/" + encodeName(name) + "/Images/" + options.type;
+ var url = "Artists/" + self.encodeName(name) + "/Images/" + options.type;
if (options.index != null) {
url += "/" + options.index;
@@ -1236,7 +1238,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
};
- var url = "Studios/" + encodeName(name) + "/Images/" + options.type;
+ var url = "Studios/" + self.encodeName(name) + "/Images/" + options.type;
if (options.index != null) {
url += "/" + options.index;
@@ -1880,7 +1882,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Users/" + userId + "/Favorites/Artists/" + encodeName(name));
+ var url = self.getUrl("Users/" + userId + "/Favorites/Artists/" + self.encodeName(name));
var method = isFavorite ? "POST" : "DELETE";
@@ -1900,7 +1902,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Users/" + userId + "/Favorites/Persons/" + encodeName(name));
+ var url = self.getUrl("Users/" + userId + "/Favorites/Persons/" + self.encodeName(name));
var method = isFavorite ? "POST" : "DELETE";
@@ -1920,7 +1922,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Users/" + userId + "/Favorites/Studios/" + encodeName(name));
+ var url = self.getUrl("Users/" + userId + "/Favorites/Studios/" + self.encodeName(name));
var method = isFavorite ? "POST" : "DELETE";
@@ -1940,7 +1942,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Users/" + userId + "/Favorites/Genres/" + encodeName(name));
+ var url = self.getUrl("Users/" + userId + "/Favorites/Genres/" + self.encodeName(name));
var method = isFavorite ? "POST" : "DELETE";
@@ -1966,7 +1968,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Users/" + userId + "/Ratings/Artists/" + encodeName(name), {
+ var url = self.getUrl("Users/" + userId + "/Ratings/Artists/" + self.encodeName(name), {
likes: likes
});
@@ -1986,7 +1988,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Users/" + userId + "/Ratings/Persons/" + encodeName(name), {
+ var url = self.getUrl("Users/" + userId + "/Ratings/Persons/" + self.encodeName(name), {
likes: likes
});
@@ -2006,7 +2008,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Users/" + userId + "/Ratings/Studios/" + encodeName(name), {
+ var url = self.getUrl("Users/" + userId + "/Ratings/Studios/" + self.encodeName(name), {
likes: likes
});
@@ -2026,7 +2028,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Users/" + userId + "/Ratings/Genres/" + encodeName(name), {
+ var url = self.getUrl("Users/" + userId + "/Ratings/Genres/" + self.encodeName(name), {
likes: likes
});
@@ -2051,7 +2053,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Users/" + userId + "/Ratings/Artists/" + encodeName(name));
+ var url = self.getUrl("Users/" + userId + "/Ratings/Artists/" + self.encodeName(name));
return self.ajax({
type: "DELETE",
@@ -2069,7 +2071,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Users/" + userId + "/Ratings/Persons/" + encodeName(name));
+ var url = self.getUrl("Users/" + userId + "/Ratings/Persons/" + self.encodeName(name));
return self.ajax({
type: "DELETE",
@@ -2087,7 +2089,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Users/" + userId + "/Ratings/Studios/" + encodeName(name));
+ var url = self.getUrl("Users/" + userId + "/Ratings/Studios/" + self.encodeName(name));
return self.ajax({
type: "DELETE",
@@ -2105,7 +2107,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Users/" + userId + "/Ratings/Genres/" + encodeName(name));
+ var url = self.getUrl("Users/" + userId + "/Ratings/Genres/" + self.encodeName(name));
return self.ajax({
type: "DELETE",
@@ -2126,7 +2128,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Persons/" + encodeName(name) + "/Counts", {
+ var url = self.getUrl("Persons/" + self.encodeName(name) + "/Counts", {
userId: userId
});
@@ -2150,7 +2152,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Genres/" + encodeName(name) + "/Counts", {
+ var url = self.getUrl("Genres/" + self.encodeName(name) + "/Counts", {
userId: userId
});
@@ -2174,7 +2176,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Artists/" + encodeName(name) + "/Counts", {
+ var url = self.getUrl("Artists/" + self.encodeName(name) + "/Counts", {
userId: userId
});
@@ -2198,7 +2200,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("null name");
}
- var url = self.getUrl("Studios/" + encodeName(name) + "/Counts", {
+ var url = self.getUrl("Studios/" + self.encodeName(name) + "/Counts", {
userId: userId
});
diff --git a/MediaBrowser.WebDashboard/packages.config b/MediaBrowser.WebDashboard/packages.config
index ef2a6b2f1d..e5db452949 100644
--- a/MediaBrowser.WebDashboard/packages.config
+++ b/MediaBrowser.WebDashboard/packages.config
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file