Springen naar inhoud


DimitarCC

Lid geworden: 8 dec 2008
Online Laatste activiteit: Vandaag, 21:12
-----

Onderwerpen die ik ben begonnen

Stream Relay proper handling

25 november 2023 - 12:55

So we all know there is already built in stream relay functionality in the nightly image.

 

We also know that when stream relay is active the channels in ChannelSelection screen got grayed out due to the specifics for the stream relay.

 

Also there is no frontend info due to that it handle it like a PVR channel.

 

So i made a cpp extensions and all above problems are gone. And stream relay channel have all its info.

 

We are still in testing and if not problems we will propose a PR here as well.


Proposal for flexible formatted strings in convertors

20 oktober 2023 - 08:19

Hello.

 

Few time ago @WanWizzard stated that we need more flexible way to use formatted strings in skins.

So i thought about it and i think i found a solution. so i post this as a discussion here so to discuss what can be done and everybody to give suggestions before to post a PR for that.

 

So, finally i came up to this possible definition in the skin

<convert type="EventTime">F',{StartTime:%H:%M} - {EndTime:%H:%M}  •  {DurationSign}{Duration:d} min</convert>

Let me explain the parts of the convert text definition...

 

The text/type is a comma separated list with first element " F' ". That stands for to notify the convertor that we have a format string template as a second element.

So the second element is obviously the format string.

{StartTime:%H:%M} - {EndTime:%H:%M}  •  {DurationSign}{Duration:d} min

Here you can specify what you want to render and also you can specify the format of the elements in it. For example StartTime of the event:

{StartTime:%H:%M} - %H:%M formatted as 24h time

In this way you can construct whatever sequence you want with separators of your choice or without them.

 

 

So to work all this ofcource the convertor itself have to be adapted. For example above the code in the convertor can look like this:

begin = event.getBeginTime()
end = begin + event.getDuration()
now = int(time())
duration_sign = ""
if begin <= now <= end:
   duration = end - now
   duration_sign = "+"
else:
   duration = event.getDuration()

d = {"StartTime":datetime.fromtimestamp(begin), "EndTime":datetime.fromtimestamp(end), "Duration": duration//60, "DurationSign": duration_sign}
res_str =  self.parts[1].format(**d)

The requirements is the values to be formattable and to provide in the dictionary all possible values that you may use in the format string.

 

So any thoughts?


Storing last selected audio and subtitle track for IPTV

4 oktober 2023 - 10:26

This is for remembering the last selected audio or subtitle track for IPTV services.
I know there is a plugin for AutoAudioSelection but it relies on rules only and can not remember the actual user selection.
 
Where is needed that? Well for IPTV services that are DVB compliant and have multiple audio or subtitle tracks. Now it can not behave like the real DVB service regarding audio and subtitle user selections.
 
This change fix/add that functionality.