Excluded private locator URLs from JSON serialization in Azure Media Services. Fixes #4686.

This commit is contained in:
Daniel Stolt
2015-08-16 20:13:33 +01:00
parent 4b44827f2a
commit 75609bf2ce
2 changed files with 5 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ using System.Xml.Linq;
using System.Xml.XPath; using System.Xml.XPath;
using Orchard.FileSystems.Media; using Orchard.FileSystems.Media;
using Orchard.Azure.MediaServices.Helpers; using Orchard.Azure.MediaServices.Helpers;
using Newtonsoft.Json;
namespace Orchard.Azure.MediaServices.Models.Assets.EncoderMetadata { namespace Orchard.Azure.MediaServices.Models.Assets.EncoderMetadata {
public class AssetFile { public class AssetFile {
@@ -120,6 +121,7 @@ namespace Orchard.Azure.MediaServices.Models.Assets.EncoderMetadata {
/// <summary> /// <summary>
/// A direct URL to download the asset file using a private locator. /// A direct URL to download the asset file using a private locator.
/// </summary> /// </summary>
[JsonIgnore]
public string PrivateUrl { public string PrivateUrl {
get { get {
if (!String.IsNullOrEmpty(_parentMetadata.PrivateLocatorUrl)) { if (!String.IsNullOrEmpty(_parentMetadata.PrivateLocatorUrl)) {

View File

@@ -1,12 +1,11 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web;
using System.Xml; using System.Xml;
using System.Xml.Linq; using System.Xml.Linq;
using System.Xml.XPath; using System.Xml.XPath;
using Orchard.FileSystems.Media; using Orchard.FileSystems.Media;
using Orchard.Azure.MediaServices.Helpers; using Orchard.Azure.MediaServices.Helpers;
using Newtonsoft.Json;
namespace Orchard.Azure.MediaServices.Models.Assets.EncoderMetadata { namespace Orchard.Azure.MediaServices.Models.Assets.EncoderMetadata {
public class Metadata { public class Metadata {
@@ -46,6 +45,7 @@ namespace Orchard.Azure.MediaServices.Models.Assets.EncoderMetadata {
} }
} }
[JsonIgnore]
public string PrivateLocatorUrl { public string PrivateLocatorUrl {
get { get {
return _privateLocatorUrl; return _privateLocatorUrl;