Kodi Community Forum
tv show next aired script - new features for skinners - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300)
+---- Thread: tv show next aired script - new features for skinners (/showthread.php?tid=111986)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


- `Black - 2012-01-04

The date format is correct that way, separator (dash, dot or slash) and order of day, month & year differ depending on your region settings.


- nessus - 2012-01-04

Sorry for insisting on this, but these two infolabels should give the same results ?.
My region settings are in "Central Europe".

Image


- `Black - 2012-01-04

No they should not give the same results, it's correct on your screenshot.


- ronie - 2012-01-04

`Black Wrote:No they should not give the same results, it's correct on your screenshot.

yes they should ;-)

i've traced it down to an error in the english langinfo.xml file

https://github.com/xbmc/xbmc/blob/master/language/English/langinfo.xml

Code:
<region name="Central Europe" locale="DE">
      [b]<dateshort>YYYY-MM-DD</dateshort>[/b]
      <datelong>DDDD, D MMMM YYYY</datelong>
      <time symbolAM="" symbolPM="">H:mm:ss</time>
      <tempunit>C</tempunit>
      <speedunit>kmh</speedunit>
      <timezone>CET</timezone>
    </region>

the System.Date infolabel will use the <datelong> value, so it shows up correct in the skin.

but we use <dateshort>, which is clearly incorrect at xbmc side.


- `Black - 2012-01-04

Hm what's the error there? Wrong format? The next aired label is correct, at least it's intended to have this short format. System.Date uses datelong as you said so everything is correct on nessus screenshot.


- nessus - 2012-01-04

Ideally and in my opinion would be the Next.Date infolabel to give the same result as the System.Date without the Date in front since the script has a separate infolabel (AirDay) for the day of the week only.

@ronie the code that you give me (<visible>SringCompare(Window(Home).Property(NextAi red.Status),foo)</visible>) is not working the way i want except if i am doing something wrong. I want to separate only the "Cancelled/Ended" shows from the "Returning Series", "Final Season" etc. Is that possible ?.


- ronie - 2012-01-04

`Black Wrote:Hm what's the error there? Wrong format?

yeah, dateshort and datelong should have the same day, month, year order.

imo, it should be changed to:
<dateshort>DD-MM-YYYY</dateshort>

unless i'm missing something...


- ronie - 2012-01-04

nessus Wrote:@ronie the code that you give me (<visible>SringCompare(Window(Home).Property(NextAi red.Status),foo)</visible>) is not working the way i want except if i am doing something wrong. I want to separate only the "Cancelled/Ended" shows from the "Returning Series", "Final Season" etc. Is that possible ?.
this should be all you need then:
Code:
<visible>!IsEmpty(Window(Home).Property(NextAired.NextDate))</visible>

Cancelled/Ended shows won't have a 'NextDate' so it's easiest just to check for that.


- nessus - 2012-01-04

ronie Wrote:this should be all you need then:
Code:
<visible>!IsEmpty(Window(Home).Property(NextAired.NextDate))</visible>

Cancelled/Ended shows won't have a 'NextDate' so it's easiest just to check for that.

Nope. This gives "Cancelled/Ended" shows but also "Returning Series" shows with NO next airing date. For example.. "Burn Notice" right now is reported as "Returning Series" even there isn't any info about in NextDate.

So... is not possible to separate ONLY the "Cancelled/Ended" shows ?


- Hitcher - 2012-01-04

PHP Code:
SubString(Window(Home).Property(NextAired.%d.Status),Canceled
?


- `Black - 2012-01-04

ronie Wrote:yeah, dateshort and datelong should have the same day, month, year order.

imo, it should be changed to:
<dateshort>DD-MM-YYYY</dateshort>

unless i'm missing something...

No that's correct, YYYY-MM-DD is the international standard date notation. If you look at the US format, it's MM/DD/YYYY for dateshort and DDDD, MMMM D, YYYY for datelong. My guess it's the same for every setting, dateshort is fully localized.

@nessus
Hitchers suggestion should work.


- nessus - 2012-01-04

No. Hitchers code is not working too. Actually i have not any results at all.

Any other ideas guys ?

Edit: Sorry if this is stupid question bu to clarify this, the %d stand as it is or do i have to change it with some numbers ?


- `Black - 2012-01-04

Code:
<control type="group">
  <visible>SubString(Window(Home).Property(NextAired.Status),Canceled)</visible>
  <!-- Put everything for canceled shows here -->
</control>

<control type="group">
  <visible>!SubString(Window(Home).Property(NextAired.Status),Canceled)</visible>
  <!-- Put everything for shows which are not canceled here -->
</control>

This definitely works, just tested it.


- Hitcher - 2012-01-04

nessus Wrote:No. Hitchers code is not working too. Actually i have not any results at all.

Any other ideas guys ?

Edit: Sorry if this is stupid question bu to clarify this, the %d stand as it is or do i have to change it with some numbers ?

%d needs to be changed to a number for each item.


- `Black - 2012-01-04

%d is obsolete, it's just NextAired.NextDate, NextAired.Status etc.