Skip to content

Commit

Permalink
Merge pull request #307 from xibosignage/develop
Browse files Browse the repository at this point in the history
Release v3 R310
  • Loading branch information
dasgarner authored Jul 18, 2023
2 parents 59e3991 + b3d5cf5 commit a6fa473
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 22 deletions.
8 changes: 6 additions & 2 deletions Adspace/ExchangeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,11 @@ private List<Ad> Request(Url url, Ad wrappedAd)

if (string.IsNullOrEmpty(body))
{
throw new Exception("Empty body");
if (wrappedAd != null && wrappedAd.IsWrapper)
{
ReportError(wrappedAd.ErrorUrls, 303);
}
return buffet;
}

// If we are a wrapped ad, then we should attempt to resolve that ad.
Expand Down Expand Up @@ -706,7 +710,7 @@ private List<Ad> Request(Url url, Ad wrappedAd)
XmlNode creativeNode = inlineNode.SelectSingleNode("./Creatives/Creative");
if (creativeNode != null)
{
ad.CreativeId = creativeNode.Attributes["id"].Value;
ad.CreativeId = creativeNode.Attributes["id"] != null ? creativeNode.Attributes["id"].Value : "";

// Get the duration.
XmlNode creativeDurationNode = creativeNode.SelectSingleNode("./Linear/Duration");
Expand Down
5 changes: 3 additions & 2 deletions Logic/ApplicationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ private static readonly Lazy<ApplicationSettings>
/// </summary>
private List<string> ExcludedProperties;

public string ClientVersion { get; } = "3 R309.1";
public string ClientVersion { get; } = "3 R310.1";
public string Version { get; } = "6";
public int ClientCodeVersion { get; } = 309;
public int ClientCodeVersion { get; } = 310;

private ApplicationSettings()
{
Expand Down Expand Up @@ -588,6 +588,7 @@ public bool InDownloadWindow
public bool PreventSleep { get; set; }
public bool ScreenShotRequested { get; set; }
public bool FallbackToInternetExplorer { get; set; }
public bool FallbackToEdge { get; set; }
public bool IsRecordGeoLocationOnProofOfPlay { get; set; }
public bool IsAdspaceEnabled { get; set; }

Expand Down
10 changes: 5 additions & 5 deletions Logic/ScheduleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -779,12 +779,12 @@ private List<ScheduleItem> ResolveNormalAndInterrupts(List<ScheduleItem> schedul
LogMessage.Audit("ScheduleManager", "ResolveNormalAndInterrupts", "Reducing AXE SOV by total interrupt SOV: " + totalInterruptSov);

axeScheduleItem.ShareOfVoice -= totalInterruptSov;
}

// If we still have some, then add that into our interrupt schedule
if (axeScheduleItem.ShareOfVoice > 0)
{
interrupt.Add(axeScheduleItem);
}
// If we still have some, then add that into our interrupt schedule
if (axeScheduleItem.ShareOfVoice > 0)
{
interrupt.Add(axeScheduleItem);
}
}

Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.309.1.0")]
[assembly: AssemblyFileVersion("3.309.1.0")]
[assembly: AssemblyVersion("3.310.1.0")]
[assembly: AssemblyFileVersion("3.310.1.0")]
[assembly: Guid("3bd467a4-4ef9-466a-b156-a79c13a863f7")]
8 changes: 4 additions & 4 deletions Rendering/Media.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -661,12 +661,12 @@ public static Media Create(MediaOptions options)
case "datasetview":
case "ticker":
case "text":
media = new WebCef(options);
media = WebMedia.GetConfiguredWebMedia(options, true);
break;

case "webpage":
options.IsPinchToZoomEnabled = true;
media = WebMedia.GetConfiguredWebMedia(options);
media = WebMedia.GetConfiguredWebMedia(options, false);
break;

case "flash":
Expand All @@ -680,7 +680,7 @@ public static Media Create(MediaOptions options)

case "htmlpackage":
options.IsPinchToZoomEnabled = true;
media = WebMedia.GetConfiguredWebMedia(options);
media = WebMedia.GetConfiguredWebMedia(options, false);
((WebMedia)media).ConfigureForHtmlPackage();
break;

Expand All @@ -695,7 +695,7 @@ public static Media Create(MediaOptions options)
default:
if (options.render == "html")
{
media = WebMedia.GetConfiguredWebMedia(options);
media = WebMedia.GetConfiguredWebMedia(options, true);
}
else
{
Expand Down
12 changes: 10 additions & 2 deletions Rendering/WebIe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,16 @@ private void _webBrowser_Navigated(object sender, System.Windows.Navigation.Navi
activeX.Silent = true;

// Initialise Interactive Control
_webBrowser.InvokeScript("xiboIC.config({hostname:\"localhost\", port: "
+ ApplicationSettings.Default.EmbeddedServerPort + "})");
try
{
_webBrowser.InvokeScript("xiboIC.config({hostname:\"localhost\", port: "
+ ApplicationSettings.Default.EmbeddedServerPort + "})");
}
catch
{
// Likely xiboIC doesn't exist.
LogMessage.Audit("WebIe", "_webBrowser_Navigated", "Cannot invoke script");
}
}

private void IeWebMedia_HtmlUpdatedEvent(string url)
Expand Down
20 changes: 17 additions & 3 deletions Rendering/WebMedia.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,28 @@ public static string ReadBrowserType(string template)
/// Get the configured web media engine
/// </summary>
/// <param name="options"></param>
/// <param name="isHtmlWidget">Is this for a html widget?</param>
/// <returns></returns>
public static WebMedia GetConfiguredWebMedia(MediaOptions options)
public static WebMedia GetConfiguredWebMedia(MediaOptions options, bool isHtmlWidget)
{
// IE fallback for legacy players where overlapping regions are not supported
if (ApplicationSettings.Default.FallbackToInternetExplorer)
{
return new WebIe(options);
}
else if (!string.IsNullOrEmpty(options.uri) && !string.IsNullOrEmpty(ApplicationSettings.Default.EdgeBrowserWhitelist))

// If this is a HTML widget, then always return with CEF
if (isHtmlWidget)
{
return new WebCef(options);
}

// If we have an edge fallback, use it, otherwise see if the URL provided is in the white list.
if (ApplicationSettings.Default.FallbackToEdge)
{
return new WebEdge(options);
}
else if (!string.IsNullOrEmpty(options.uri) && !string.IsNullOrEmpty(ApplicationSettings.Default.EdgeBrowserWhitelist))
{
// Decode the URL
string url = Uri.UnescapeDataString(options.uri);
Expand Down Expand Up @@ -518,7 +532,7 @@ public static WebMedia GetConfiguredWebMedia(MediaOptions options, string type)
}
else
{
media = GetConfiguredWebMedia(options);
media = GetConfiguredWebMedia(options, false);
}
return media;
}
Expand Down
4 changes: 2 additions & 2 deletions XiboClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
<Version>1.8.9</Version>
</PackageReference>
<PackageReference Include="CefSharp.Wpf">
<Version>114.2.100</Version>
<Version>114.2.120</Version>
</PackageReference>
<PackageReference Include="Crc32.NET">
<Version>1.2.0</Version>
Expand All @@ -322,7 +322,7 @@
<Version>0.3.6</Version>
</PackageReference>
<PackageReference Include="Microsoft.Data.Sqlite">
<Version>7.0.5</Version>
<Version>7.0.8</Version>
</PackageReference>
<PackageReference Include="Microsoft.SqlServer.Types">
<Version>14.0.1016.290</Version>
Expand Down
1 change: 1 addition & 0 deletions default.config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<EmbeddedServerPort>9696</EmbeddedServerPort>
<EmbeddedServerAllowWan>false</EmbeddedServerAllowWan>
<ScreenShotSize>0</ScreenShotSize>
<FallbackToEdge>false</FallbackToEdge>
<FallbackToInternetExplorer>false</FallbackToInternetExplorer>
<AggregationLevel>individual</AggregationLevel>
<IsRecordGeoLocationOnProofOfPlay>false</IsRecordGeoLocationOnProofOfPlay>
Expand Down

0 comments on commit a6fa473

Please sign in to comment.