Duration per item is broken

Bug #1171157 reported by Dan Garner
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Xibo
Won't Fix
Undecided
Dan Garner

Bug Description

We have setup two RSS tickers and show them in one region after each other. Until and including version 1.4.1 this worked great, but now we are seeing a strange effect. Only one item per feed is shown and then the next feed is shown for one item...

On server in the layout and region the Duration per Item is set for both feeds, as well as the following settings: Duration 25 ; Direction Single ; Scroll Speed 2 (should have no influence or?) ; Update interval 360 ; Number of items 5 ; From start of feed.

When I look at the source code on a client for these feeds, then I see the following:
............
        <script type='text/javascript'> function init() { $('#text').xiboRender({ type: 'ticker', direction: 'single', duration: 25, durationIsPerItem: false, numItems: 0, width: 1224, height: 945, originalWidth: 510, originalHeight: 394, scrollSpeed: 2, fitText: false, scaleText: true, scaleFactor: 2.4 }); } </script><style type='text/css'>body { background-color:#FFFFFF ; } </style>

        <script type="text/javascript">
        // Init - do we need to call any of our substituted functions
        $(document).ready(function()
............

Over there you see that durationIsPerItem is set to false....

I already tried to switch off Duration per item, save it and switch it on again and save it, but without any result.

Could you help me out?

Regards, Tiedo

Dan Garner (dangarner)
Changed in xibo:
milestone: none → 1.4.3
assignee: nobody → Dan Garner (dangarner)
Revision history for this message
Tiedo Boerema (tiedo-boerema) wrote :

As an additional info regarding this bug:

Today I just did not select the Duration per item, so no checkmark placed before this option (which would imply in my point of view that duration per item is not selected) and to my surprise at once all items are shown! I also have checked the source code on a client and overthere I see that durationIsPerItem is now set to true....

It looks like that the checkmark value True leads to False on the client, but also the reverse (checkmark value False leads to True).

Revision history for this message
Tiedo Boerema (tiedo-boerema) wrote :

In the meantime we are two months further... Any idea when this (and other bugs) will be solved and version 1.4.3 will be released? This functionality is really missed...

Thanx for any reply!

Revision history for this message
Mondlicht (mond-licht) wrote :

Hi,
Now it's September.
Any update?

Revision history for this message
Tiedo Boerema (tiedo-boerema) wrote :

It's November already!

Any update???

Revision history for this message
Alan McFarlane (alanjmcf) wrote :

We're using the Windows exe version 1.4.2, with hosted server. We are affected by this bug.

For example with Direction set to Single, Duration at 20s, and seven items in our feed we thus expect our feed time to be multiplied[1] to become 140secs i.e. 7*20secs. What we see though is:
* DurationIsPerItem=True -> time_Item=20s time_Feed=20s
* (BTW With DurationIsPerItem=False -> time_Item=~2.8s time_Feed=20s)

Looking at Rss.cs we see no code to multiply the duration.

Can anyone confirm that we are understanding correctly?

We've add a few lines of C# to that class and now it then works as expected (tFeed=140s). We will attach our patch soon.

Notes
[1] We're understanding "Duration is per item" as described at Answer 227239.
(https://answers.launchpad.net/xibo/+question/227239
"What does "Duration is per item" mean under the RSS feed items ?"
->"In single mode, the total duration of a ticker [is] the duration per item multiplied by the number of items in the feed.")

[2] Note also that the logic of the durationIsPerItem boolean in the HTML options is reversed when written to the HTML by the C# code, but luckily the JavaScript code which reads that boolean is backwards too and thus the flag operates as intended true(1)->"false"->true and false(0)->"true"->false.

Revision history for this message
Alan McFarlane (alanjmcf) wrote :

Patch against branch 1.4. "client/dotNET/Rss.cs"

Commentary
 1. Delete _duration (/replace by _durationTotal). It can be read from _options.duration.
 2. Create _durationTotal to store whole life time, i.e. multiplied for Per-Item or not.
 3. Calculate _durationTotal after we've parsed the feed and know how many items we're displaying.
 4. Use _durationTotal when setting the timer.
Also
 5. Add comment that the boolean is reversed creating the HTML but that the JavaScript in the HTML reverses it back!
 6. Don't try to dispose WebClient if it was never created (feed cache was fresh).

Revision history for this message
Tiedo Boerema (tiedo-boerema) wrote :

Hi Alan, that is exactly what we are aiming at in this bug!

But where could I adapt this in the client?

Revision history for this message
Alan McFarlane (alanjmcf) wrote :

Patch re-done based on http://bazaar.launchpad.net/~xibo-maintainers/xibo/head-14-fix/revision/268#client/dotNET/Rss.cs And thus _much_ less wide ranging. Can be applied either to 14 or Trunk with patch tool.

Revision history for this message
Alan McFarlane (alanjmcf) wrote :

@Tiedo Don't know what the plans are for a 1.4.3 but it would help all of us using RSS if it came soon. If not, I guess you could compile the .NET client for yourself after adding this patch.

Revision history for this message
Mondlicht (mond-licht) wrote :

May I ask when the correction will be in the software?

Revision history for this message
Alex Harrington (alexharrington) wrote : Re: [Bug 1171157] Re: Duration per item is broken

It's already fixed in 1.6 series

Changed in xibo:
status: New → Won't Fix
Revision history for this message
Alex Harrington (alexharrington) wrote :

This is already fixed in the 1.6 series. 1.4 is now "old stable" so won't receive further updates.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.