Kodi Community Forum
[RELEASE] myTV - TV Guide Script (with pluginsnew script) - 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] myTV - TV Guide Script (with pluginsnew script) (/showthread.php?tid=12895)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48


- ayan - 2005-10-24

hey bigbellybilly, thanks for a very good job Smile   i wonder if you can add a source for greek programs. i have found the following url (for today's prog):

http://www.nova.gr/gr/tvguide.asp?action=search&channel=81

which is the only consistent source for all greek channels. needs some html scraping, and the channel id's are as follows:

81=mega, 82=ant1, 225=star, 241=alter, 37=alpha, 586=makedonia, 83=et1, 401=net, 577=et3.  

other days are submitted by appending to the url something like: &weekday=27/10/2005 (weekday is in the format dd/mm/yyyy)

thanks for any help you can offer!


- BigBellyBilly - 2005-10-24

greek datasource to try.  let me know if its ok ?


datasource_nova.py

bbb.


- ayan - 2005-10-26

the nova datasource works great!  i even tested switching to the greek language, by uncommenting the entry. maybe you should enable it by default.

here's a zip file with all the channel logos.

thanks :thumbsup:


- BigBellyBilly - 2005-10-26

thanks for the feed back and logos. i will set greek language by default.

could i ask you to be the greek datasource gaurdian ie. just let me know when its broken cos of site html changes?

i'm considering enhancing the datasources so that they're configurable from the gui, but not sure its worth the effort?

thanks
bbb


- ayan - 2005-10-26

no problem, i will inform you if it's ever broken. for the second part, probably not worth the effort if you ask me.


- todd557 - 2005-10-27

bbb

does this script work with the following xmltv format:

<?xml version="1.0" encoding="iso-8859-1" ?>
<!-- created by tsreader from coolstf.com -->
<tv generator-info-name="tsreader">
<channel id="100-home">
<display-name lang="en">home</display-name>
<transport-stream-id>229</transport-stream-id>
<signal-info>110.0w 12.632 r 20000 5/6 qpsk</signal-info>
</channel>
<programme start="20051023140000" stop="20051023150000" channel="100-home">
<title>dish home interactive tv</title>
<desc>get what you want, when you want it! customer service, games, theater listings, sports, news, weather, shopping & more.|110.0w 12.632 r 20000 5/6 qpsk</desc>
</programme>
</tv>

thanks in advance. i am trying to use my own xmltv file in this format and can't get the guide to come up.

todd


- BigBellyBilly - 2005-10-28

no, it wont work with that format. the zap2it xmltv files are big, so the script rips out just the relevant prog info and creates much smaller daily programme files from the dl xmltv file.

look at datasource_zap2it.py

function getprogrammesxmltv

you can see it uses some regex to extract the relevant data:

Quote:matches = re.findall("<schedule program=\'(.*?)'\ station=\'"+chid+"\' time=\'(.*?)\' duration=\'(.*?)\'",listing)

so if your own xmltv file is of a reasonable size, you could write your own much simpler datasource, that would extract programmes per channel.

regex:  for your xmltv would be

Quote:matches = re.findall('<programme start=\"(\d+)\" stop=\"(\d+)\" channel=\"'+chid,listing)

it would be upto your datasource code to dl or get the data from wherever of course.

hope that helps
bbb.


- todd557 - 2005-10-28

thanks.  i think i understand.

one other question, i have attempted to start the script and it says (running) for a few seconds then nothing.  

is this because there is not any .dat files in the cache to read from?

thanks

todd

never mind....i was not running a recent xbmc. got it running. great script.

t






- HoRnEyDvL - 2005-11-01

hi bbb.
would u be able 2 fix up the two australian tv guides?
when you press a for more info instead of displaying what teh show is about etc it will eitehr display a message saying no information or just the rating.

would be great if it displayed the shows description aswel it displays shows description on the site it pulls the listing from so dont know y it doesnot work. thanks






- BigBellyBilly - 2005-11-02

horneydvl, some bad news for you.

neither the australian datasource are broken.

datasource_austv - (html based) uses javascript to pull up the additional description window. i've not figured out how to access this - *update* i have now - am working on it.

datasource_ausrss - (rss) whilst this is a more stable source of data, the supplied descriptions are particulaly poor.
example rss file to browse: ausrss sample file


todd557: i've sent you the tsreader datasource in your pm.

bbb






- enigma9o7 - 2005-11-04

well, an old problem related to time resurfaced in a new way. last weekend in the us we all set our clocks back an hour for daylight savings. my xbox updated itself just fine (internet sync). however, now when i look at the tv-guide, everything is one hour behind.

i am using mytv 1.8 with the default zap2it datasource file with the line:

gmt_offset = (time.daylight*3600-time.timezone)/3600


- BigBellyBilly - 2005-11-04

the sooner the world abandons this moving fwd and back 1 hour - i'll be the first to raise a flag to it!

what is your current gmt offset ?

what does the calculation result in for gmt_offset ?

print gmt_offset

will display it for you.

let me know.
bbb.


- enigma9o7 - 2005-11-05

i agree with the abondoning dst, it's annoying, with today's varied schedules (we're not up with the cows at dawn anymore) and our modern electric lighting, it really doesn't seem necessary.  and with the world coming together, it's just annoying.  i have family in nz, and i always check online what the time is there, can't ever keep it straight... cuz they're southern hemisephere, im northern, so we switch times in oppisote directions... and of course our dates aren't the same...  so dependingon the date, we can be 1-4 hours different from the last time.  anwyay enough ranting.


print gmt_offset results in -8
print time.daylight results in 1
print time.timezone results in 32400

i live in alaska.  according to windows xp, i'm gmt -9.  (i get this by double clicking on the time in my taskbar then selecting the timezone tab, which shows (gmt -09:00) alaska.  the time here is always one hour earlier than pacific time (bc/california/oregon/washington).

if i set gmt_offset=-9 in the datasource.py file all is good.  but it'd be nice to figure out a way to keep it set automatically for the next time dst comes around.






- Asteron - 2005-11-08

well we got off of dst and the script didnt adjust so it looks like i was wrong about that time.daylight meaning if we are in dst or not. reading the api more carefully i see it just means whether or not a dst is defined for the current timezone. it looks like there are no provisions to adjust for this in python. maybe if you have to talk to an internet timeserver?

it is probably best just to move this offset into the gui. you might was to have the timezone offset and a checkbox for dst be seperate fields....


- BigBellyBilly - 2005-11-08

what about keeping the gmt_offset calc (without the dst part) but then just adding dst on/off checkbox to gui config menu, which would adjust that offset by +1 hour if set. (or visa versa +/-1 hour - not sure which way it is now as i've confused myself with it).
it would default to off.