diff --git a/client/dotNET/Rss.cs b/client/dotNET/Rss.cs index 2345a3a..0a78bcc 100644 --- a/client/dotNET/Rss.cs +++ b/client/dotNET/Rss.cs @@ -216,6 +216,7 @@ namespace XiboClient headContent += " type: 'ticker',"; headContent += " direction: '" + _direction + "',"; headContent += " duration: " + _duration + ","; + // Note the boolean test is backwards here! But luckily it's backwards in the JavaScript that uses it too. Phew! headContent += " durationIsPerItem: " + ((_durationIsPerItem == 0) ? "true" : "false") + ","; headContent += " numItems: 0,"; headContent += " width: " + _width + ","; @@ -405,6 +406,9 @@ namespace XiboClient // No matter what, start the timer now (passing our calculated duration instead of the provided one) Duration = _duration; + // Override the duration if necessary + if (_durationIsPerItem == 1) + Duration = Duration * _numItems; // Start the timer base.StartTimer(); @@ -495,7 +499,10 @@ namespace XiboClient try { - _wc.Dispose(); + // Wasn't created if RSS cache was fresh (RefreshLocalRss not called then). + if (_wc != null) { + _wc.Dispose(); + } } catch {