Kodi Community Forum
[RELEASE] TV Show Next Aired (Script) Addon - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] TV Show Next Aired (Script) Addon (/showthread.php?tid=79493)



- deanmv - 2012-01-03

ronie Wrote:there either are no upcoming shows listed at tvrage for those (An Idiot Abroad / Weeds),
or for some (Dexter), the airdate/time is not provided.

Would that also not return the series status and last showed episode then?


- ronie - 2012-01-04

deanmv Wrote:Would that also not return the status and last showed episode then?

it does, but it's up to the skin whether to show info for those tv shows or not.

most skins will check if there's a next airdate for a tv show and hide all info if it's unavailable.


- deanmv - 2012-01-04

ronie Wrote:it does, but it's up to the skin whether to show info for those tv shows or not.

most skins will check if there's a next airdate for a tv show and hide all info if it's unavailable.

I've added in those bits myself so will take a look as to if I could change that. Thanks for the info!

Fixed it! There was a
Code:
<visible>!IsEmpty(Window(Home).Property(NextAired.NextDate))</visible>
which I took out and now it displays on all shows. Thanks again!


- ronie - 2012-01-04

deanmv Wrote:I've added in those bits myself so will take a look as to if I could change that. Thanks for the info!

check if you use something like:
Code:
<visible>!IsEmpty(Window(Home).Property(NextAired.NextDate))</visible>
and remove it.


- deanmv - 2012-01-04

ronie Wrote:check if you use something like:
Code:
<visible>!IsEmpty(Window(Home).Property(NextAired.NextDate))</visible>
and remove it.

Haha just edited it to say i've found that as you posted it. I can now delete the list of all the days my TV shows come out from my laptop. Cheers!


- zpanderson - 2012-01-04

Nvm. Looks like I'm figuring things out pretty easily.

Great work on the script.

edit: pm'd instead...


- deluxesandwich - 2012-01-11

I have spent a few hours banging my head against the wall with two problems I've been having with this script on Eden Beta 1, and this is what I've come up with.

I have used two computers, my regular HTPC, as well as a clean install of XBMC on my desktop. Only thing in common between them is that they both run Windows 7 with Swedish language. On the HTPC I have tested all versions of TSNA back to the 2.0-versions, and the desktop have only been running the one currently on the repo. Made no difference either way.

First problem was that, in the TV-Series section and with Next Aired enabled (on Xperience1080) each show with coming airings looked like this: d.m.12. Both day and month numbers were not showing, only the d and m-letters. I recognized that this did not happen when I changed language to English from Swedish so I edited the Swedish langinfo.xml from:

original langinfo.xml Wrote:-<region locale="SE" name="Sweden">
<dateshort>D.M.YYYY</dateshort>
<datelong>'den 'D MMMM YYYY</datelong>
<time symbolPM="" symbolAM="">HH:mmConfuseds</time> <tempunit>C</tempunit> <speedunit>mps</speedunit> <timezone>CEST</timezone>
</region>

to
edit Wrote:-<region locale="SE" name="Sweden">
<dateshort>DD.MM.YYYY</dateshort>
<datelong>'den 'DD MMMM YYYY</datelong>
<time symbolPM="" symbolAM="">HH:mmConfuseds</time> <tempunit>C</tempunit> <speedunit>mps</speedunit> <timezone>CEST</timezone>
</region>

Apparently TSNA doesn't like single dates.

After this edit the presentation of the next air date in the TV-Shows section works like it's supposed to, showing for example 16/04/12.

The next problem I was having (and still is) is this:

If I launch the script from Applications, it looks like this on both xperience and Confluence.
Image Image

The only way to remove the big white "OPTIONS" box and the left pane with the script logo is to move the mouse. If I disable mouse, I am unable to leave that view using any of the arrow keys or any other key except ESC.

Moving the mouse and removing the overlays, my schedule is as you can see blank. By adding in a show that airs this week, the problem goes away. However, I don't have any shows that air this week (added in fake folder called Cops).

Shouldnt it be possible to launch the Guide, without the options menu/pane stealing focus and requiring mouse, and look at next weeks or months airings and so forth?


- ronie - 2012-01-12

deluxesandwich Wrote:Apparently TSNA doesn't like single dates.

correct. the script only checks <dateshort> though.

if you're comfortable with hacking scripts,
feel free to test this fix:
Code:
# Get localized date format
DATE_FORMAT = xbmc.getRegion('dateshort').lower()
[b]if DATE_FORMAT[0] == 'd':
    DATE_FORMAT = '%d-%m-%y'
elif DATE_FORMAT[0] == 'm':
    DATE_FORMAT = '%m-%d-%y'[/b]

the TV Guide will only display shows airing this week.

if no shows are available, we can't put the focus on any of the lists since they're all empty.
thus our only option is to set focus on the options panel.

both 'esc' and 'back' will get you out of the tv guide window.
this is standard xbmc behaviour, so i don't see any problem there?


- deluxesandwich - 2012-01-12

Thanks for your reply ronie, I will try your code snippet Smile

The problem I had with the "Options-box" taking focus was that I couldnt remove it as I had a system with mouse disabled, and the actual Guide was almost completely dark in Xperience (as you can see on the screenshot). That annoyed me, I wanted to see the guide window, even if it was empty. If I press ESC then I back out of the guide, with the Options-box still in the way. I wanted to get rid of it Wink

It was by accident that I found out that moving the mouse disabled the pop-over menu. I don't understand that part, the keys enable and disable those options dialogues everywhere else, but not in TSNA.


- ronie - 2012-01-12

deluxesandwich Wrote:It was by accident that I found out that moving the mouse disabled the pop-over menu. I don't understand that part, the keys enable and disable those options dialogues everywhere else, but not in TSNA.

although it looks like a seperate popup dialog, it is in fact a part of the same window, so you can not close it without actually closing the tv guide.

it will auto-hide when it does not have focus.
this will work if you use a mouse, but not with a keyboard/remote.

there's a diffrence in how these input devices are handled in xbmc.


- deluxesandwich - 2012-01-12

Aha, I understand. Anyways your code snippet works excellent on the D.M-short date format and it also renders my dates with proper dashes inbetween instead of dots! Nod

In return I offer you a swedish translation of TSNA. A good one I might add Wink

Quote: <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
<string id="450">TV-tablå</string>
<string id="32101">TV Show - Next Aired</string>
<string id="32102">Hämtar information...</string>
<string id="32103">AVBRUTEN</string>
<string id="32104">Hämtning avbruten av användaren.</string>
<string id="45000">Visa</string>
<string id="45001">Miniatyrtyp</string>
<string id="45002">Ladda ned banners (kräver Artwork Downloader)</string>
<string id="45003">Ladda ned logotyper (kräver Artwork Downloader)</string>
<string id="45004">Aktivera bakgrundsfanart</string>
<string id="45005">Aktivera 16:9-miniatyrer</string>
<string id="45006">Ladda ned 16:9-miniatyrer (kräver Artwork Downloader)</string>
<string id="45007">Uppdatera tablå</string>
</strings>



- ronie - 2012-01-12

deluxesandwich Wrote:Aha, I understand. Anyways your code snippet works excellent on the D.M-short date format and it also renders my dates with proper dashes inbetween instead of dots! Nod

In return I offer you a swedish translation of TSNA. A good one I might add Wink

cheers!

will add the fix + your translation in the next release.


- nessus - 2012-01-12

Ronie... is this will be included in the next release too ?

Cheers
Nessus


- ronie - 2012-01-12

nessus Wrote:Ronie... is this will be included in the next release too ?

that's a xbmc issue and has been fixed:
https://github.com/xbmc/xbmc/commit/cf3715091a42aa5f52b60c3858f9e2a67160dda9


- zpanderson - 2012-01-13

I would really like to mod the script to be able to scroll through 3 weeks worth of data (ie last weeks shows, the current weeks shows, and next weeks shows). Do you think this is possible?