PDA

View Full Version : Half-finished TV-listings code (XMLTV-GUI)


cruent
2005-06-15, 10:56
wow, gratz with the new work mynci and thanks a lot for the half finished source on a xmltv-gui.

i want to give it a try to finish this, it looks really promissing.

anyone wanna help, let me know?

cheers

/cruent

los93sol
2005-06-15, 12:34
agreed, i would love to see someone finish this up and using xmltv it would be universal for anyone. this would be a great starting point for a my tv section in xbmc. anyone interested in this, please join us at efnet #xbmctvguide with enough interest this can take off so xbmc will be prepared when other projects like mediaportal have matured enough that we can start seriously considering some kind of interface. this has been discussed on the boards before so i won't go into it here. however, in my opinion, xbmc shouldn't rely on a backend to do everything, it should have it's own functionality to bring to the table so having its own tv guide would be great.
regards,
los93sol

Gamester17
2005-06-15, 13:10
request; as for actually getting/scraping the listing.xml for each country (and its tv-channels) i suggest that python-scripts be used (one for each country), you could then code it so the script to be used can be selected from the xmltv-gui or settings, and then so that the selected script can be runned from a button in the xmltv-gui (or set to auto-update once a day), ...that way whoever develops the xmltv-gui (in c++) don't have to worry about creating or maintaining any of the 'grabbers', and instead anyone with some python knowlage could create or help maintain the grabbers for his/her country, (a few such grabber-scripts already exist here (http://www.xboxmediaplayer.de/cgi-bin/forums/ikonboard.pl?act=st;f=21;t=4480)), another good thing using this method is the end-users don't have to use/have a computer to grab their listing.xml

ps! there are also plenty of complete tv-guide python-scripts (which display everything themself) that could probebely be converted to output a standard xmltv listing.xml instead ;)

jj5768
2005-06-15, 13:12
have you seem the mytv script on xbmcscripts ? - it does everything iteself, and is rather cool :agree:

los93sol
2005-06-15, 22:47
gamester: that's exactly what i was thinking as far as the grabbers and the gui. in my opinion though, the actual gui for the tv guide should be done in c++, but the existing python scripts would definitely be great to look at so the layout can be planned out as efficiently as possible. another thing to think about is the load on the servers that the whole thing would update from. i used to use zap2it and they had a problem with the load on the servers from all the mythtv users updating at once, but since i don't think everyone leaves their xbox on 24/7 i doubt this would be a problem for us. it seems that updating daily would be a bit overwhelming though, i would think if we just had it check to see when the last update was at xbmc start-up and set everything up to update every 7 days it should be fine. that way if everything is already up to date, then we won't put an unnecessary load on the servers. any interested dev's, please join in the irc channel so we can start making this a reality! :lol:
regards,
los93sol

Gamester17
2005-06-16, 09:14
the actual gui for the tv guide should be done in c++that's what i (and cruent) were meant, in referense to mynci's half-finished tv-listings code (xmltv-gui) (http://sourceforge.net/project/showfiles.php?group_id=87054&package_id=153914&release_id=331612), ...i too meant that only the listing.xml grabbers should be python (not the gui itself).

another thing to think about is the load on the servers that the whole thing would update from. *i used to use zap2it and they had a problem with the load on the servers from all the mythtv users updating at once, but since i don't think everyone leaves their xbox on 24/7 i doubt this would be a problem for us. *it seems that updating daily would be a bit overwhelming though, i would think if we just had it check to see when the last update was at xbmc start-up and set everything up to update every 7 days it should be fine. *that way if everything is already up to date, then we won't put an unnecessary load on the servers.i guess that depends a bit on the websites that is 'ripped' and a bit on how xbmc is set to sheduale when a script is runned; what if one site only have tv-listings for one day, a other has listings for five days and a third for a full week, best would probebely be to just allow the user to select in gui from one of many pre-sets like example: manual/once-a-day/once-every-other-day/once-a-week (xbmc could then be configured by the developer to only run the selected script at first idle-time if set to auto-update), * ...and since most xbmc-users are on different time-zones and live in different countries so will use different scripts that uses different websites plus they will not be runned at any specific time (ie. they will/should not all be set to run at example 18:00 but instead set to run at first idle-time) thus it should balance itself out.

jslawler
2005-06-18, 05:28
i'm interested in contributing to this feature.
i've done quite a bit of c++ before. i admit i haven't done any xbmc programming, but i've been looking at the half finished code and it looks like it should be ok to pick up on.

do any of you have any ideas on the gui layout for this feature?
it is going to be in a grid format? or would it be more like have lots of listboxes which go to the next window:

tvguide (shows list of channels)
-->picks a channel (once clicked it lists all days)
----->picks a day (once clicked it lists all shows for that day)
------->picks a show to see the specific details

i'd prefer to see some kind of grid view so you can get an overall picture of whats on for that day. but i'm worried the screen would be very cluttered and messy.

anyway i'll keep looking into the code and mess around with it until i understand it better.

Striker
2005-06-18, 13:15
yes, but extend it with a movies view
a whats on now view is also preferred
if possible have the time at the top in a row and make it clickable
to switch to a later time

los93sol
2005-06-18, 17:13
jslawler,
please stop by the irc channel so we can chat more about how the layout should be, but i agree that grid view is the way to go. i think if this is going to be done that it should be planned for the future...i mean we should think about the layout as if there is already a my tv section in xbmc. i have been doing some sketches of layouts and looking at other tv guide layouts quite a bit recently, and i have come up with something that would work nicely and keep as much clutter off the screen as possible. the way i see it, the tv guide should be easily laid over something playing in the background (like a live tv stream from your mediaportal box....in the future of course) anyhow, there could be two parts to the tv guide, the top 25% of the screen would display the information about the currently selected channel and show. the channel name and number would be on the left in a header and the current time would be on the right side of the header. when you have a show highlighted, a description of that episode would be displayed in this window as well. the bottom 75% of the screen would be for listing channels and what's on at what time. we can experiment to see how many channels, and how many hours of scheduling is reasonable to have on the screen at one time. i think 10 channels and 3 hours would work nicely, but like i said, we can and will need to experiment with that portion of the layout.

the other side to this project is the grabbers, we need this to be as universal as possible since people all over the world use xbmc. we should have a place in the settings to configure your parameters for the grabber. ideally, it would be nice if we could have one universal grabber and setup the settings so that your configuration customized it so there would be as little maintenance on the grabbers as possible.

regards,
los93sol

jslawler
2005-06-20, 11:37
i have managed to get the code to show the grid of current tv shows, by using the code supplied, but slightly modified.

i have removed the favourites feature for the time being. i personally don't see any need for it.

at the moment i have it showing 4 channels, and 2 hours of television. the biggest problem at the moment is fitting the information on the screen. with two hours shown, and using "font10" <-- small font, it can't fit most of the show names in the button width. and "font10" is quite difficult to read, so i don't think it would be usable. if it doesn't work out i might make it only show one hour at a time.

also, at the moment i have it set up so the bottom 75% or so is a grid vision of the xmltv data, and the top 25% will have show description on the left side, and on the right side will be space for an image (channel logo, or tv show logo)

los93sol, i will send you an email later with the code so you can organise it. i'll do a little more coding before though so browsing the tv grid works.

cruent
2005-06-20, 14:15
good work jslawler!

i'm working on a tvlisting python grabber for danish channels.

we need to get a lot of different python grabber for each country.

cheers

Gamester17
2005-06-20, 17:26
be nice if it was scalable so those with hdtv (720p and 1080i) could take advantage of the additional space (would probebely mean more channels and more hours displayed at once compared to the lower-resotion on standard tv), and remember that some with normal tvs use 4:3 while others use 16:9 (16:9 wide-screen could probebely display another hour compared to normal 4:3 and still look good).

personaly i would also love it if the grid was dynamic (instead of all squares with the same sine) when it comes to displaying the programs, maybe as much as down to 15 minutes in detail (though 30 minutes splits would be nice enough), see my poorly made mockup here (link) (https://sourceforge.net/project/screenshots.php?group_id=87054) or be inspired by freevo (link) (http://freevo.sourceforge.net/ss/noia/freevo_ss2_640.jpg), beyondtv (link) (http://www.snapstream.com/images/products/beyondtv/features/beyondtv_programguide.jpg) and mythtv (link) (http://mythtv.sourceforge.net/mc/mythweb1.png).

ps! a future thing to think of; some websites show which programs are movies and which ones are tv-series to distinguise between them, it would be nice if this is kept in mind by maybe adding separate tags for each in the xml when gabbing the listing (one tag for movies, and one for tv-series) to mark which is which, thus the tv-guide gui could later be linked with www.imdb.com and www.tv.com (once a such interface get added to xbmc) to get more information on that movie or tv-serie directly in the tv-guide by pressing 'info' on that title. this would have to be supported both in the xmltv-gui code and in each python grabber which writes the listing.xml file (though only be optional in the python grabber).

Nickman
2005-06-20, 20:33
would it not be possible to use some of mediaportals code ?

i'm not up to speed how diffrent c# is to c++ though.

looks good anyway :)

http://mediaportal.sourceforge.net/gallery/mce11.jpg

mvoosten
2005-06-20, 21:14
don't forget gbpvr (http://gbpvr.com)!!
mediaportal is nice, but too much of an overkill. gbpvr does essentialy the same thing, can run as a service background and has a full featured web interface.. and best of all... freeware.
i use xbmc for 90% of my media tasks.. the only thing that it doesn't do is tvguide and recordings and gbpvr makes it (almost perfect). only missing the remote scheduling from my xbox ;)

for screenshots:
http://gbpvr.com/screenshots.htm

it also includes 2 pics of the tvguide in action to stay on topic :)

nianhbg
2005-06-20, 23:01
be nice if it was scalable so those with hdtv (720p and 1080i) could take advantage of the additional space (would probebely mean more channels and more hours displayed at once compared to the lower-resotion on standard tv), and remember that some with normal tvs use 4:3 while others use 16:9 (16:9 wide-screen could probebely display another hour compared to normal 4:3 and still look good).

personaly i would also love it if the grid was dynamic (instead of all squares with the same sine) when it comes to displaying the programs, maybe as much as down to 15 minutes in detail (though 30 minutes splits would be nice enough), see my poorly made mockup here (link) (https://sourceforge.net/project/screenshots.php?group_id=87054) or be inspired by freevo (link) (http://freevo.sourceforge.net/ss/noia/freevo_ss2_640.jpg), beyondtv (link) (http://www.snapstream.com/images/products/beyondtv/features/beyondtv_programguide.jpg) and mythtv (link) (http://mythtv.sourceforge.net/mc/mythweb1.png).

ps! a future thing to think of; some websites show which programs are movies and which ones are tv-series to distinguise between them, it would be nice if this is kept in mind by maybe adding separate tags for each in the xml when gabbing the listing (one tag for movies, and one for tv-series) to mark which is which, thus the tv-guide gui could later be linked with www.imdb.com and www.tv.com (once a such interface get added to xbmc) to get more information on that movie or tv-serie directly in the tv-guide by pressing 'info' on that title. this would have to be supported both in the xmltv-gui code and in each python grabber which writes the listing.xml file (though only be optional in the python grabber).
i really like this idea. and it would be great if it would be hd compatible like 720p im running tv.guide.py an python script that shows channels in a grid format and it does not look any good in 720p. so lite more channels and more time frames ;)

Livin
2005-06-21, 00:59
grabber question...
i don't understand why there is not only one grabber for all countries... why not put a variable in for the country instead of writting a different grabber for each?

scaling issue...
how about allowing the user to change the timeframe displayed? so you can "scale" the grid to your liking.

porting from vb & vbscript...
someone wrote a vb & vbscript version of this for the homeseer home automation product if anyone is interested. it is free-ware since it is no longer in development. if you know vb, vbscript, and python you could probaby port the code.

it used the standard xmltv.exe to get the listings but used vbscript to create and display a web page with the grid.

los93sol
2005-06-21, 01:01
@gamester 17

you have pretty much the same idea as i do. *earlier this morning we setup a svn for the project thanks to jslawler and cruent. *for now, we just added a button next to my files to access the tv guide, but hope this will spawn an entire my tv section in xbmc. *the current layout doesn't really work at this point, but it loads up and you are able to retrieve channel data from listings.xml in root. *

i began working on a mock-up of my own, i noticed most of the grabbers issue information related to each individual program like you said, distinguishing between tv content and movie content. *one thing i noticed is that it actually goes a step further than that in most cases, also issuing information as to the genre of the program (eg. sitcom, comedy, etc.) *my plan is to have two windows, a window on the top 15% of the screen and a window on the bottom 85% of the screen. *the window on the top would have a header to display the following information, channel number, channel name, program name, time of program, and current time. *below the header it would display the genre information and a description of the program since i have not found a grabber yet that doesn't supply a short description. *the window on the bottom of the screen would display the actual guide information exactly the way you laid out in your mock-up. *i would like to plan this to be used as an overlay so it will be ready when interfacing with a backend program like mediaportal is possible. *that way if you are watching a program already, you would be able to call up the tv guide from either a button mapped to it or from an osd, as well as from wherever else you may want to make it accessible in the gui and work nicely. *i will finish my mock-up later tonight when i get back home and post it here. *bear in mind, it is somewhat generic since i am using the dialog-popup.png as windows, but it accurately displays what i have in mind.

the main focus right now is to get the gui to grab and display the information within the xml properly. *from there, i think we will most into a better gui layout and config screen so it will grab channel data for more people and make it as simple as possible to use. *it would be great if you could drop by the irc channel a bit to help manage the project and give your insight. *any dev's interested in seeing where this project goes and how everything plays out, please join us in irc on efnet #xbmctvguide

@affini

what you are thinking about the grabbers is exactly what i hope can be achieved. *the way i see it, we could have a settings screen to tv grabber and have options like:
country
-after country is selected, could narrow down by states or region information depending on how the sources for the grabbers in your country work. *

data source
-now that we have your country information, we can give options for data sources available in your country. *since some of the data sources require you to register and have a username/password, we could display a popup dialog if the source you will be directed to requires this so there is no question about which site they should be using. *at this time, username/password fields would become active if the information is required.

time
-manually set timezone
-get timezone information from time server if you use that option

service provider
-after the previous information is entered, we would be able to narrow down service providers.

lineup
-finally, we could narrow you down to just a few lineups so you would be able to select the one you need.

frequency
-this would allow the user to configure how many days of information to grab so the grabber will be able to check to see if it is up-to-date and if it is not, will be able to update itself automagically without user intervention.

save and apply

this will take some research to figure everything out, but with a proper outline of the sites, should relieve much of the pain sorting everything out. *i think we should start by analyzing the main grabbers used by xmltv to start gathering information. *if anyone can help with this, please get in contact with me or post your findings. *also note that i am not sure that this is entirely possible with the current xbmc gui, someone more knowledgable should make revisions to this plan and give their own ideas so we can come up with something user-friendly, efficient, and feasible.

regards,
los93sol

edit: alright, i just finished the mock-up...slacked off on it, but you get the idea. *sorry for my shotty photoshop skills, and the genericness of the mock-up, but it shows you what i am thinking. *if anyone would like to take this and put together a better mock-up, please do.

http://img168.echo.cx/img168/8506/mockup6zf.png

2nd edit: *i haven't included everything in the mock-up, other features would be very nice as well such as a search button that would pull up another screen similar to the search screen used by gbpvr, and the ability to jump to a specific date and time would also be nice. *if gamester17 is correct with his ideas on interfacing the tv guide with tv.com and imdb.com, those lookups could be added to the context menu. *we could go as far as to have different views that would change the way channels are arranged such as genres, normal, etc. *we could even add an option in the context menu to add a channel to your favorites so you could have a favorites view. *just some ideas that have already been discussed, but if we can get a good enough layout, it is possible to use several different options with this. *hopefully this has some people interested and thinking about it. *remember, if somebody can put together some better mock-ups, please do, it would be great to see what you can come up with. * :lol:

3rd edit: the svn is now up and ready for anonymous checkout if anyone wants to check out what is done so far. don't expect much at this point. as of now, the code mynci left us with is running and synced to xbmc cvs as of 6-20-05. it sort of works, but needs some lovin.

instructions:
to use the svn go to http://tortoisesvn.tigris.org/download.html and download tortoisesvn and install it. after that make a new directory for the source, right click it, click svn checkout, it will ask you the url of the repository, put https://opensvn.csie.org/xbmctvguide

Gamester17
2005-06-21, 09:51
i don't understand why there is not only one grabber for all countries... why not put a variable in for the country instead of writting a different grabber for each?that sounds way to complicated on both the grabber side and the gui side, one (or more) seperate grabber for each country is easy to manage for both the scripters and the gui.
....just think of the mess having to have to merge many countries code from different scripters into one .py file, and what if one persons code crash the whole script, bad idea :talktohand:

edit: a few such separate python script (which is theory should be ready to use in xbmc, or at least very port-friendly) can be found here (for belgium, new zealand and sweden) (http://)


porting from vb & vbscript: someone wrote a vb & vbscript version of this for the homeseer home automation product if anyone is interested. it is free-ware since it is no longer in development. if you know vb, vbscript, and python you could probaby port the code. it used the standard xmltv.exe to get the listings but used vbscript to create and display a web page with the grid.fyi, there are loads and loads of such programs, (code), and projects linked from *xmltv.org (http://membled.com/work/apps/xmltv/) :shifty: who's to know which one/ones is best for porting? :oops:

Gamester17
2005-06-21, 10:07
@los93sol, i think the mediaportal (http://mediaportal.sourceforge.net/gallery/mce11.jpg)/freevo (http://freevo.sourceforge.net/ss/noia/freevo_ss2_640.jpg)/beyondtv (http://www.snapstream.com/images/products/beyondtv/features/beyondtv_programguide.jpg) layout is the best look for a tv (all which seems to be very alike), with topic on top, grid layout in middle, and info at bottom :cool: ...but make it somewhat skinnable ;)


ps! another (complety other) idea; the listing.xml's probebely need to link/show where to download the logo for its channels (then xmltv-gui should cache it so not have to download it each time)

cruent
2005-06-21, 11:46
about the grabbers, i was thinking something like this:

the grabbers are stored in a seperative directory and they are called location + grabber url.

denmark(dr.dk).py

grabbers output: an xml file called tvlisting.xml (where to put it?)
<?xml version="1.0" encoding="iso-8859-1"?>
<tv source-info-url="" source-data-url="">
*<channel id="">
* *<display-name></display-name>
* *<icon src="" />
*</channel>
*<programme start="yyyymmddhhmmss +zone" stop="yyyymmddhhmmss +zone" channel="">
* *<title></title>
* *<desc></desc>
* *<credits>
* * *<director></director>
* * *<actor></actor>
* *</credits>
* *<episode-num></episode-num>
* *<previously-shown />
*</programme>
</tv>


channel listing config (grabber.xml)
run the grabber script to download the channel list and let the user pick the channels he wants and perhaps change the order they are downloaded. press next....

grabber config (grabber.xml)
then we need to configure the grabber by a gui.
the script we use, number of days to get the listings, daylight and timezone.

sample of grabber.xml:
<grabber>
*<settings>
* *<script>denmark(dr.dk).py</script>
* *<days>3</days>
* *<daylight>1</daylight>
* *<timezone>+02</timezone>
*</settings>
*<channels>
* *<entry>channel1</entry>
* *<entry>channel2</entry> *
* *<entry>channel3</entry>
*</channels>
</grabber>


more needed?

after channel config and grabber config, do the xbmc tv guide config.

set update tv listings -> xbmc startup/tvguide startup/manual
set cache icons -> on/off
set timeline -> on/off
set font/size/color perhaps
set sorted channels -> on/off

hope some will read this and make some comments ;)


cheers

/cruent

Gamester17
2005-06-21, 13:12
my 2 cents on the directory/file-structure (to stay consistant with existing layout):

\xbmc\skin\project mayhem iii\1080i\tvguide.xml (gui layout for that specific skin and resolution)
\xbmc\skin\project mayhem iii\720p\tvguide.xml (gui layout for that specific skin and resolution)
\xbmc\skin\project mayhem iii\ntsc\tvguide.xml (gui layout for that specific skin and resolution)
\xbmc\skin\project mayhem iii\ntsc16x9\tvguide.xml (gui layout for that specific skin and resolution)
\xbmc\skin\project mayhem iii\pal\tvguide.xml (gui layout for that specific skin and resolution)
\xbmc\skin\project mayhem iii\pal16x9\tvguide.xml (gui layout for that specific skin and resolution)
\xbmc\skin\project mayhem iii\media\*.png (use existing background pictures etc. as much as possible plus add nessesary additions in all correct aspect ratios and resolutions)
\xbmc\skin\project mayhem iii\skin.xml (add the tv-guide section link)
\xbmc\skin\any other skin\same as above\*.*

\xbmc\tvguide\
\xbmc\tvguide\tvguide.lib or tvguide.dll (dynamicly loadable like how the python and cd-player are)
\xbmc\tvguide\cache (only if needed by the library, if needed this should be self-cleaning, and not to be used for logos)
\xbmc\tvguide\tvguide.xml (any general tv-guide settings that should not be available in the gui, should really only be edited by developers and power-users)

\xbmc\tvguide\listings\listing.xml (listing.xml in xmltv standard, it should then be totally up to each script-writter how much info to grab in his/her script)
\xbmc\tvguide\
\xbmc\tvguide\grabbers\denmark(dr.dk).py
\xbmc\tvguide\grabbers\denmark(dr.dk).xml (user-customization for that specific grabber-script, so it can very easily be saved/backed-up by the users themselves)
\xbmc\tvguide\grabbers\denmark(dr.dk)\logos\ (logos for that specific script, again so it can very easily be saved/backed-up by the users themselves)

ps! like you can see i suggest that instead of a generic 'grabber.xml' you have individual xml files for each grabber-script with same same.
oh, and all gui settings should be saved in the xbmc's standard settings.xml so that they are kept safe when a user updates xbmc builds

jslawler
2005-06-22, 00:25
hi gamester17,

your directory structure looks good, but i dont think it really needs its own dll. it is really at the moment only one more guiwindow file.

at the moment the code is set up so the skin xml file decides exactly where everything will go. at the moment the tv grid is just buttons placed next to each other, which works really well. i've made it so the skin designer simply has to place a placeholder button with the fonts to use, etc, and then they make that button the width that the grid should be. the code that grabs the info from that button and uses it to determine how wide the grid will be, and what fonts to use, etc.

i have come across a few coding problems. one being at what looks like complete random, when trying to add a grid button it just does not add, the logs say " error exception in capplication::framemove()"
from my debugging i have found that everything seems ok, apart from the navigation values, they seem to be numbers such as (u:1811951150, d:808591360, l:13616, r:21)
i'm thinking there is a memory error somewhere and it is corrupting the integers.

one more question, is it possible to use the current button control and have multiline text ? this would work great as you could fit more of the show name into each grid item.

there is still a way to go yet, the navigation of the grid is a bit dodgy, as keeping track of lots of different coordinates is a pain and the code is falling over a bit...

i'll work on the navigation stuff when i get back from work today, and try and post back later.

Gamester17
2005-06-22, 09:24
at the moment the code is set up so the skin xml file decides exactly where everything will go. at the moment the tv grid is just buttons placed next to each other, which works really well. i've made it so the skin designer simply has to place a placeholder button with the fonts to use, etc, and then they make that button the width that the grid should be. the code that grabs the info from that button and uses it to determine how wide the grid will be, and what fonts to use, etc.k, but don't you at least need separate button sizes for 15-minutes, 30-minutes and 1-hour (plus a way or merging them graphicly when a show isn't exacly one of those ,example; auto-merge 30-button with 15-button to get 45?)?

ps! as for different resolution grid/skins; think you should try by default to have pal/ntsc 4:3 as 2-hours and 4-channels, pal/ntsc 16:9 as 3-hours and 4-channels, 720p as 4-hours and 6-channels, 1080i as 5-hours and 8 channels?

jslawler
2005-06-22, 11:01
hi gamester17,

buttons have a width property.
so i can make the button as wide as i want.
if the grid holds 120 minutes of tv, then it works out the scale by calculating how much space there is for the grid and how much time to hold.
then when a show is like 25 minutes it makes the button's width = 25 * scale.
so they all work nicely.

i'll post a screenshot later tonight.
i'm working on navigation right now.

jslawler
2005-06-22, 16:18
i have created a separate class for controlling the grid.
it now handles all the movements and page changes etc.

here is a screenshot of it currently.
ignore the debugging info at the top.

of course a new skin would need to be created for this window. i currently just use the default project mayhem iii background, and a lot of space is wasted as you can see.

http://img69.echo.cx/img69/779/tvguide15dd.jpg

p.s i dont know how long images stay on this temp hosting for, so it may be a dead link in the future.

Kain
2005-06-22, 16:31
i can see how having one script for all countries migh be complicated but i do really like the idea of all the custom settings suggested. much like zap2it it would be nice to be able to put in zip code then tv provider and being able to get an accurate list instead of getting the wrong times for your area or channels that you dont even have. keep up the good work guys this looks great *:kickass:

just out of curiosity what other things are you seeing as being a part of the "mytv" section aside from the tv guide?

Gamester17
2005-06-23, 10:14
i was thinking, maybe buttons from picture-files isn't such a good idea as it complicates things more that nessesary(?), what if instead you only draw/make-up the grid in code instead; the skinner would thus only have to set where the grid should begin (top-left) in x,y pixel location and where it ends (bottom-right) in x,y pixel location on the screen via the tvguide.xml in the skin, then make it so the skinner can set the color of the grid 'buttons' in hex (like in html), also selectable should be the space (and possible color in hex too, or if left blank make it transparent) between the buttons, the end-user could then select from gui how many hours and channels he which to be displayed at once to overwite the default set by the skinner, ...the xmltv-gui code would then automaticly calculate the exact position plus hight and width of each 'button' to display within the grid, this way the grid (and location of the grid) will be much more scalable/flexible and easier to skin.

ex: \pal\tvguide.xml grid configured something like this for pal (720x576), where the horizontal position is "x" (calculated from right to left) and the vertical is "y" (calculated from bottom to top): * *<control>
* * *<description>grid top-left position</description>
* * *<id>1021</id>
* * *<selectedcolor>ffff9600</selectedcolor>
* * *<posx>74</posx>
* * *<posy>474</posy>
* *</control>

* *<control>
* * *<description>grid bottom-right position</description>
* * *<id>1022</id>
* * *<selectedcolor>ffff9600</selectedcolor>
* * *<posx>646</posx>
* * *<posy>102</posy>
* *</control>

* *<control>
* * *<description>space between buttons in grid where hight is pixel girth on horizontal lines and width is pixel girth on vertical lines, leave color blank for transparent</description>
* * *<id>1023</id>
* * *<selectedcolor>ffffffff</selectedcolor>
* * *<height>4</height>
* * *<width>4</width>
* *</control>

* *<control>
* * *<description>default number of hours and channels to display on this resolution</description>
* * *<id>1024</id>
* * *<numberoftvguidehours>2<numberoftvguidehours>
* * *<numberoftvguidechannels>4</numberoftvguidechannels>
* *</control>
end-users can from gui thus select to display 3 hours and 6 channels at once for the resolution he has set instead, xmltv-gui code will then overwrite the defaults and the automaticly recalculate before displaying the grid of show-times.

the skinner should also be able to select where (horizontal "x" and "y" for beginning to end) to display the show-information as contained in listing.xml or scraped from imdb/tv.com

what do you think?

jslawler
2005-06-25, 11:00
progress report:

+ navigation of the tv grid is pretty much complete and stable now.
+ when moving from one grid item to the next the description of the show is shown at the top of the screen, along with other relevant information.
+ los93sol has created a background image and some media files.

todo next:
+ now that the code is working and i understand it a lot better, i am going to try and organise the code to make it more readable, before it becomes to out of control.
+ after the code is organised better i will improve the flow of the gui
+ add settings and ability to modify these through gui

los93sol
2005-06-25, 12:34
:p can't take all the credit for the background...no1cantell helped with it too.

Ph03n1x
2005-06-26, 04:14
hi everyone,

i don't normally post in the dev section (i am a basic programmer) but i've been following this thread and thought i'd share a few ideas i came up with for the layout. i've created a couple of alternative gui mock ups below to help explain what i mean, let me know what you think! :)

mytv/ television guide:
http://img292.echo.cx/img292/597/xbmctvguidemock28ie.th.jpg (http://img292.echo.cx/my.php?image=xbmctvguidemock28ie.jpg)

as you can see it uses the standard format (list, icons, big icons) to display available channels, selecting an item would bring up the following screen:

schedule listing:
[img]http://img292.echo.cx/img292....mg] (http://img292.echo.cx/my.php?image=xbmctvguidemock17bs.jpg)

from here the user can get specific episode info or do a series lookup via imdb/tvtome.

imho this layout creates a simple and clean interface (inline with the rest of xbmc) while also providing plenty of space to display programme information. however, a downside is that it requires the user to traverse several screens before they can reach any detailed information.

Livin
2005-06-26, 04:28
that certainly looks nice!

i mostly use a grid when determining what i want to watch.

my vote to a suggestion someone else said...
allow the user to color code the show "types". this is really nice to see wuickly if a listing is a movie, sports, series, etc. this feature is quite common and was in the vb version i was using for my home automation software.

now here's a challenge... how do we get selecting a channel from the listing to actually send ir to change the channel on the tv?

los93sol
2005-06-27, 05:36
spent a little time talking to enderw about possible ways to handle the grabber side of the project. it seems if there are 3 parts to this it *could* possibly be done entirely in python without having to worry about maintaining the grabber scripts (at least not too much).

basically, we could look at the sites used by the grabbers provided with xmltv and use the same sites to base our grabbers on. i know what you are thinking...and no maintaining the scripts would not be an issue, not anymore than maintaining imdb because the major sites used have several projects that rely on them to supply the information so they do not change the site around very much, if at all. our grabbers would be bundled with some additional info to help with the configuration phase of the 3-step process.

phase 1 - configuration script:

allows the user to select their country from a spincontrol. the proper script will be linked to the country selected. for example, the us and canada would use a script for zap2it. some areas like sweden will most likely require their own script to grab accurate information.

this phase is also where the user will select their timezone which would change the value in the script they will be using to their timezone. alternatively, i would think it would be possible to use a time server to set this up so it would be one less step for the end-user to make an error in the setup.

this phase would also allow you to choose the number of days of information to grab.

the user would then click on save and apply, they would then be asked if they would like to run the grabber now, which brings us to phase 2.

phase 2 - the grabber script:

now that you have your script configured for your settings, you need to run the grabber script to update your info. the grabber would go get the channel information. some sites allow you to setup a username and password and configure your settings directly on the site, for these sites, the script will prompt for your username/password and simply fetch the information. other sites require the user to choose their channels. to handle sites like this, we would need a way to display the channels and let the user pick and choose which ones are included in their final information grab. we are now at phase 3.

phase 3 - making the xml:

this phase will convert the channel information to listing.xml so it can be imported into the tv guide. this phase has not been completely planned out, but it seems logical to only code for this phase one time instead of doing it for each individual script.

note: this is not all intended to be done by one script, it is intended to be handled by 3 seperate scripts, so the information from phase 1 would be passed to phase 2 and that info would be passed to phase 3, then finally imported into the tv guide.

this would provide the simplest usage for the end-user while maintaining some form of organization so that if a site changes and the grabber stops working, only that particular grabber needs to be updated without needing to worry about the code involved in configuring it and converting the data to an xml. the other thing that should be realized is not every country needs its own script, theoretically, almost every country could be handled with about 10 scripts.

please post your comments on this subject about how to handle the grabber side appropriately with little maintenance, ease of use, and good organization. also, if anyone wants to help with this, drop by the irc channel at efnet #xbmctvguide

regards,
los93sol

nianhbg
2005-06-27, 09:43
it sounds great. but i'm already downloading xml data for my mythtv so a http/ftp option wouldbe nice to download data to the xbox

Gamester17
2005-06-27, 10:03
mytv/ television guide: http://img292.echo.cx/img292/597/xbmctvguidemock28ie.th.jpg (http://img292.echo.cx/my.php?image=xbmctvguidemock28ie.jpg) as you can see it uses the standard format (list, icons, big icons) to display available channels, selecting an item would bring up the following screenthat looks very nice and i like to have the option to have that (specific-channel) view too, but only if i can have both :saint:
(ie; i prefer the 2-3 hour grid with many channels at once, i would not replace that in favour of a 'one-channel' view only)

Ph03n1x
2005-06-27, 13:18
that looks very nice and i like to have the option to have that (specific-channel) view too, but only if i can have both :saint:
(ie; i prefer the 2-3 hour grid with many channels at once, i would not replace that in favour of a 'one-channel' view only)
you could have all these views in that design, the raw data is in xml format so we could create something similar to the my music section, modelling the grid as another view of the information. the main reason i chose that view over the grid layout is that it provides a way to manage lists of information such as favourites or top 10s in simple and clean way.

i agree with the comments made on the the 'one channel' view (doesn't quite have that 'wow' factor does it?) i modelled it on various epgs and thinking about it now, it would probably work better for a more simplified view such as an overlay or osd.

jslawler
2005-06-27, 15:47
here is an updated screenshot.

the gui is still quite dark when viewing on a tv, but it is looking much better.
one thing that isn't properly coded yet, is making the text not overrun the length of the button.

http://img102.echo.cx/img102/276/tvguide26bd.jpg

DonJ
2005-06-27, 17:30
will there be scrolling texts for too small buttons or how do you plan to handle this?

Gamester17
2005-06-27, 18:30
@jslawler, sweet! :kickass: ...though personaly i would prefer to have the show-info at the bottom-right with some free available space on the on bottom-left for video-overlay (like in 'my videos') and enough space at the top for the "tv-guide" title (like the other "my..." sections), but i guess you'll make all those skinnable later?

one thing that isn't properly coded yet, is making the text not overrun the length of the button.suggest you either fade-out (like freevo (http://freevo.sourceforge.net/ss/noia/freevo_ss2_640.jpg)) or just replace overrun with three-dots (like beyondtv (http://www.snapstream.com/images/products/beyondtv/features/beyondtv_programguide.jpg)), ...and maybe make the button that is high-lighted scroll.

ps! remember to leave space for the tv-channel logos. you should also make the grid-pages browsable to the left/right so one can jump one (or three?) hour back/ahead :idea:

los93sol
2005-06-28, 02:56
@gamester17
all of what you are wanting to do is already skinnable. :) *the background was designed with osd usage in mind for the future to overlay it onto a video playing full screen, and is just to help get everything working nicely. ;) *i can flip-flop it so the grid is on top of the data to see how it works because i agree it would be nice when you are using it within the normal gui. *actually, thinking about it now...having a small videoplayer window would be more effective then overlaying it. *hmm...i will make a background and do some testing...it just seems more natural to have the information at the top of the page to me for some reason.

as far as the information inside the grid goes...i would say just truncate the names, no need for anything to scroll since the program title is displayed at the top of the page along with when it starts and ends. *i do think it should only display in half hour increments though as full hours is a little akward to look at.

no matter what the final layout will come in time...at this point, experimenting is good so everyone can think about it together and come up with something that works best.

regards,
los93sol

edit: *forgot to mention that jslawler mentioned he wants to make the grid multi-line so it would display the program title on two lines instead of just one...i agree that this would be the best way to do it...multi-line and truncate, i believe this is how beyondtv does it...but i also like the fade effect, so perhaps it would be nice to have multi-line and fade?

also, i forgot to respond to the person who already downloads their data...as long as you download using xmltv, you can just use the same xml placed in root as listing.xml and you are good to go. :)

2nd edit: thinking about it more and looking everything over...it is very doable to grab the channel icons as well which means there is more space to be gained for the grid...when it reaches a stage where the channel icons can be displayed we should experiment with different variables for the amount of time actually being displayed. it looks like we could have 2 hours of programming shown in 30 minute increments without any problem in 4:3...much better than i was originally anticipating.

jslawler
2005-06-28, 11:53
you should also make the grid-pages browsable to the left/right so one can jump one (or three?) hour back/ahead :idea:
this is already in the code, browsing back and forth takes you forward and back one hour at a time.

it looks like we could have 2 hours of programming shown in 30 minute increments without any problem in 4:3...much better than i was originally anticipating.
what does this mean exactly?
does it mean shows 2 hours on the screen and once, and then when left or right is pressed it goes back or forth 30 minutes?

los93sol
2005-06-28, 18:25
you should also make the grid-pages browsable to the left/right so one can jump one (or three?) hour back/ahead :idea:
this is already in the code, browsing back and forth takes you forward and back one hour at a time.

it looks like we could have 2 hours of programming shown in 30 minute increments without any problem in 4:3...much better than i was originally anticipating.
what does this mean exactly?
does it mean shows 2 hours on the screen and once, and then when left or right is pressed it goes back or forth 30 minutes?
that's exactly what i was getting at. i can't wait to check out your next commit, keep up the good work!

regards,
los93sol

jslawler
2005-06-30, 12:27
hi people,

http://img153.imageshack.us/img153/5527/tvguide31bn.jpg

i have updated all the code to make it much more organised and readable.

if the last date of the current tv guide data is in the past, then it asks to reload xmltv data.

it now truncates the names of when they do not fit in their buttons or labels.

finally, the window is fully skinnable.

<control>
<description>channel template</description>
<type>label</type>
<id>49</id>
<align>left</align>
<posx>64</posx>
<posy>280</posy>
<width>140</width>
<label>chn 1</label>
<font>font13</font>
</control>

<control>
<description>time template</description>
<type>label</type>
<id>39</id>
<align>left</align>
<posx>210</posx>
<posy>230</posy>
<label>time here</label>
<font>font14</font>
</control>

<control>
<description>tvgrid template</description>
<type>button</type>
<id>99</id>
<align>left</align>
<posx>210</posx>
<posy>280</posy>
<width>430</width>
<height>240</height>
<texturefocus>button-focus.png</texturefocus>
<texturenofocus>button-nofocus.png</texturenofocus>
<label>you should not see me</label>
<font>font13</font>
</control>


channel template: you put this where you want the grid channel names to appear. the code uses the x and y coordinates, the width of this label, and the font details.

time template: you put this where you want the times to appear (eg, on the image - 21:00 22:00 23:00). the code uses the x and y coordinates, and the font details.

tvgrid template: you put this where you want the main grid of buttons to appear. the code uses the x and y coordinates to place the grid. the code uses the height and width of this button to equal the grid width and height. the code uses the font of this button for what the font if each individual grid item will be. the code also uses the textures specified.

todo:
make it customizable in the settings screen of xbmc. (the code has been written so all the number of hours on screen, number of channels on screen, etc is a variable so it can be changed)

los93sol
2005-06-30, 18:21
@jslawler
sorry i keep missing you in irc, it seems we are on exact opposite schedules...i am always working when you are there and vice-versa. :p

outstanding work, this project is really coming along nicely. i got an e-mail from cruent recently, i need to write back to him to verify, but i think he has started on the grabber side of the project.

truncating the program names looks like it works very nicely now. are you still planning on making the buttons multi-line?

regards,
los93sol

Livin
2005-06-30, 19:19
jslawler,
this is looking amazing! i'm anxious....

one request if i may:
could you compress the grid area spacing and maybe make the 'import xmltv' button and show buttons smaller so that you can fit more listings into the grid? four channels at a time is not much when you have 250+ channels. i'm thinking you could fit 8 to 10 channels in that area by reducing the size of everythign a bit and it would still be very readable.

my dishnetwork grid has 10 channels on a single screen and tey could easily fit more.

Gamester17
2005-07-01, 11:30
could you compress the grid area spacing and maybe make the 'import xmltv' button and show buttons smaller so that you can fit more listings into the grid? four channels at a time is not much when you have 250+ channels. i'm thinking you could fit 8 to 10 channels in that area by reducing the size of everythign a bit and it would still be very readable.but all that (including how many channels and hours to display in the grid) will be xml-skinnable for each resolution and skin won't it? ???

jslawler
2005-07-01, 12:14
could you compress the grid area spacing and maybe make the 'import xmltv' button and show buttons smaller so that you can fit more listings into the grid? four channels at a time is not much when you have 250+ channels. i'm thinking you could fit 8 to 10 channels in that area by reducing the size of everythign a bit and it would still be very readable.but all that (including how many channels and hours to display in the grid) will be xml-skinnable for each resolution and skin won't it? ???
as gamester17 says, it is all skinnable for setting the sizes of everything. and there will be a settings page which lets you choose how many channels, and hours to show, etc.

nianhbg
2005-07-01, 17:49
could you compress the grid area spacing and maybe make the 'import xmltv' button and show buttons smaller so that you can fit more listings into the grid? four channels at a time is not much when you have 250+ channels. i'm thinking you could fit 8 to 10 channels in that area by reducing the size of everythign a bit and it would still be very readable.but all that (including how many channels and hours to display in the grid) will be xml-skinnable for each resolution and skin won't it? ???
as gamester17 says, it is all skinnable for setting the sizes of everything. and there will be a settings page which lets you choose how many channels, and hours to show, etc.
sounds great :)

Livin
2005-07-01, 18:09
all i can say is... wonderful!

i'm serioulsy looking forward to this more then any script yet.

now if we can figure out how to use the grid as a remote control to send a command to my home automation pc so the pc (using usb uirt) can send ir to change the channel!

do you think there is anyway to tie an http command to a channel/button? my homeseer server can receive this command and send ir.

Cactus
2005-07-01, 18:53
now if we can figure out how to use the grid as a remote control to send a command to my home automation pc so the pc (using usb uirt) can send ir to change the channel!
or, start a python script instead. that it would become really flexible, so we could send a command all sorts of ir blasters but also schedule a recording on pvr.

this is really looking great, i also can't wait till this becomes part of the cvs builds!

thanks!!

le cactus

jslawler
2005-07-02, 11:05
hi guys,

i did some more coding on this today.
i have created a settings page. (at the moment it is just a sub category of weather)

http://img108.imageshack.us/img108/7971/tvguide48vs.jpg

xmltv source: this option lets you pick a country or network pc. this spin control is populated by adding all file names from q:\tvguide\grabbers\ which end in .py
refresh now: this is just a button that allows you to run the grabber.
number of channels: this specifies how many channels will be shown in the grid at once.
number of hours: this specifies how many hours the grid will cover.

more settings will be added in the future, but this is just a basic setup at the moment.
there is still a few bugs to be worked out with the grid navigation, but it is getting there.

question for any python people: is it possible to open a file that is on a network pc in python code? i want the network pc source method to also be done in a script if i can.

jmarshall
2005-07-02, 13:51
just a small suggestion from the settings nazi:

i'd kill the number of channels setting and have that purely defined by the skin. just seems a little out of place with the rest of xbmc. even number of hours is can probably be gotten rid of as well - it's really dictated by the size of font/button that the skinners define, so you mayaswell just have it all done via the skin. just my opinion.

oh, and please put any grabbers and config stuff under the system/ folder.

looking good though.

cheers,
jonathan

los93sol
2005-07-02, 18:18
@jslawler
the new code is working great! i was unable to check out the settings as i think you left out your new strings.xml when you made your last commit. keep the updates comin'! :thumbsup:

regards,
los93sol

Livin
2005-07-02, 19:20
jm,
i'm not sure why you would not want the 'hours' and 'number of channels' be able to be defined within the config. i think it is great... the more settings you can expose to the user the better. i'd rather change the config then mod the code. much more user friendly.

i think the point of the script is to make it skin independant... at least i hope so. that is the best way, right? this is why there were 10 billion request to change the rss feed definition location and such things.

dynamic scripts + dynamic skins = wonderful xbmc experience!

Ph03n1x
2005-07-02, 22:40
hey guys, this is shaping up great! i'm looking forward to this feature! :d

@affini, i understand where your coming from however i'm siding with jm on this issue - these options are probably better left defined within the skin as they have a major effect on the size of the grid layout. in particular, it would be a real problem for skinners to handle user-defined layouts and maintain ui consistency.

Livin
2005-07-02, 23:32
ph03n1x & jm,
i cannot see how keeping it in the skin will make it "better"?

allowing the user to define it will allow them to make the grid smaller/larger and more/less channels/hours as they see fit.

it might even be a good idea to use the new scaling features jm just put in to allow the users to scale the grid images.

let the user decide what looks good to him, do not limit the grid to the best wishes of the skinner... skins should be just that... skins. i actually wish skins in xbmc were mote true to definition they are today. (i will not go into my rant but skins in xbmc are not 100% skins, they are feature implimentation as well).

anyway... it cannot hurt anythign to allow the user to modify the grid size and hours. please leave this in.

los93sol
2005-07-03, 00:46
haha, seems there is a nice little debate going on here...

my view on it is that while this is still in relatively early development the options for # of channels and amount of time displayed are nice to have. it makes it nice and easy to experiment and find the values that work best.

i do, however think that once we know what works best on what resolutions that it should be defined in the skin. realize that a simple edit of the xml would allow you to change it still, but i doubt many people would ever even want to change these values once it was optimized so i am with jmarshall in the long run, but for now it's good how it is.

i'm not sure if there is some confusion about the code or not, but i want to make sure everyone knows the gui which is all the screenshots you have seen so far is coded in c++, and not python. python will come into play with this project when the grabbers start being ported over to xbmc.

just my 2 cents.

regards,
los93sol

jslawler
2005-07-03, 04:35
hi guys,

this is how the grid resizing works.
the skinner puts a control on the screen at x and y with a width and height.
my code then works out how much space vertically and horizontally each item can take up. this is worked out on the values put in the settings (at the moment).
this gives the user flexibility to see more or less channels at once (as some countries have lots of channels, and some have few)
i don't mind if you want it taken out of the settings and put into skinning. i just have it this way at the moment as it is easy for me to test resizing code.

here are a heap of screenshots to demo the resizing:
1 channel per screen (http://img137.imageshack.us/img137/8741/1channel1rs.jpg)
2 channels per screen (http://img137.imageshack.us/img137/2379/2channels1wk.jpg)
4 channels per screen (http://img137.imageshack.us/img137/8169/4channels3ot.jpg)
10 channels per screen (http://img137.imageshack.us/img137/3392/10channels5ey.jpg) notice it automatically realises that my tv data only has 7 channels and resizes to fit 7.
4 hours per screen (http://img137.imageshack.us/img137/7928/4hours7yi.jpg)(yes i know the time labels are out of place, im working on it)

anyway, thats where it is at right now.

Livin
2005-07-03, 05:35
i think the way you are calculating it is perfect. it is rediculous to me to remove functionality that adds flexibilty and user choice... this is america right? ;)

anyway, maybe you can remove the spaces between each row... that seems to take up a lot so screen real estate and the "import xmltv" button is huge and that 'area' takes up lots of space to.

as you can see, i'm into maximizing the space. i hate scrolling through pages upon pages...

jslawler
2005-07-03, 05:48
anyway, maybe you can remove the spaces between each row... that seems to take up a lot so screen real estate and the "import xmltv" button is huge and that 'area' takes up lots of space to.
that space is calculated by how many channels u want to see. for example in the image with 7 channels the space between each row is much less, than say the 2 channels image.

pretty much the code goes like this:

spaceperrow = maxheight / number of channels

(i do have a very small inbetween value, but thats to stop the buttons sitting in each other)

i think the reason it looks like therre is a lot of room is because the background colour is black, and the buttons are also black. so in reality there is actually no space between the rows, it is just that the buttons are very tall and blend in with the background colour. if we had different colour grid buttons it would be more obvious.

los93sol
2005-07-03, 06:25
:kickass: i am going to check it out more later when i am home and can compile with the latest code, but was just wondering if the amount of time displayed on the screen is configurable in half hour increments. so you could have like 1 hour, 1.5 hours, 2 hours, 2.5 hours, etc.? just to give a few more variables to experiment with. outstanding updates as always jslawler!!!

regards,
los93sol

jmarshall
2005-07-03, 14:02
looking good, jslawler. apologies to all for jumping in too early regarding insignificant gui details - no point at this stage, given that there's still lots to be done behind the scenes.

cheers,
jonathan

Ph03n1x
2005-07-03, 15:10
nice work jslawler, great way of handling it :d

Striker
2005-07-03, 18:34
looking good, but i'd like to make a suggestion
if its not too much to ask it would be great if we are able to pick the channels that are retrieved & displayed
if its not possible in the gui then it's ok if we would be able to set it ourselfs in the python file
just my 2 cents ;)

Livin
2005-07-03, 19:59
you can use the grabber and point it to a list that specifies the channels you want to "grab". that is simple to build and should be easy to display/edit via the gui. it could basically be a derivative of the notepad script that already exists. but, of course, it would be better in c++ :d

Livin
2005-07-04, 09:18
just thought i'd mention this for those that had not seen it...

i've been running a nice python script called tvguide.v0.4

i run xmltv grabber on my home automation pc and publish it via a web site and the xbox uses it off the web site. it works very well and does a great job maximizing screen real estate.

i highly suggest checking it out if only to get ideas.

one cool thing is that it would be fairly easy to color code the grid (sports, movies, series, etc) using this script since, i think, the grid boxes are dynamically created.

los93sol
2005-07-04, 19:45
@jslawler
about the channel logos, they are usually square here as well. *instead of putting them next to the channel name, i was thinking if a logo is present it would replace the channel name. *this way you would have something like:

<span style='font-size:17pt;line-height:100%'>8</span> http://img278.imageshack.us/img278/1926/wtte5aq.jpg

meh, you get the idea. or if no logo is present it will just go ahead and display like normal, so something like:

<span style='font-size:17pt;line-height:100%'>8 fox</span>

that's all i have for now :)

regards,
los93sol

los93sol
2005-07-05, 23:05
@jslawler
a few things this time...i compiled your latest updates and even with the up-to-date listing.xml file, it keeps prompting that it is out of date so i say yes, update. *then i get a black screen...not sure if there is a file missing from the svn or why this was happening, but i updated the skin files as well and checked and the mytv.xml file points to the new skin files.

also, i have been thinking through the possibilities for different views, and i remembered seeing something similar to the mock-up i have posted below somewhere, just don't remember where. *i don't know how far you want to expand the gui, but something like this might be nice:
http://img51.imageshack.us/img51/6498/liveguide5yt.jpg

regards,
los93sol

jslawler
2005-07-07, 10:55
i've done some more fixing of the gui.

names now truncate properly and fit well into the grid boxes.
i've added icon support.
fixed a few bugs.

screenie:
http://img294.imageshack.us/img294/6906/tvguide56xu.jpg

DonJ
2005-07-07, 15:52
wow, this is really coming along nicley. good job jslawler.
when can we expect this to be in the cvs?

Livin
2005-07-07, 17:18
sweet... this keeps getting better!

i know this is premature but i'm hoping to maybe plant the seed early...

can you build in hooks so someone would be able to duplicate the tvguide via the xbmc web server?
i'd love to see the grid displayed over the web server, basically use it as a tvguide remote control and have it send http commands to my home automation system, thus the ha system gets the http and sends ir to my tv to change the channel.

this would be amazing!

jslawler
2005-07-10, 11:09
los93sol,

how is that us grabber script coming along?
did it work properly with those fixes i added to allow other listing.xml files to work.
at the moment im just going through and trying to find possible bugs, and stop them from occurring. i'm also trying to think of a good way for the grabbers to run, and keep the user notified / able to cancel.

i posted questions here cause we always seem to be in irc at different times :)

Livin
2005-07-10, 20:07
jslawler & los93sol,

my suggestion...
create a new screen in the settings area called "task manager". think of it like a windows task manager + scheduler. this would be a place to see the running processes and create a schedule to start tasks at a specified time and set triggers based on other processes/tasks starting/stopping. these are what i like to call "events".

what do you think?

EnderW
2005-07-10, 20:13
hmm..the grabber script is getting there, but i stumbled upon some problems with the xml parsing (yeah, what a surprise). i believe the parser won't accept some characters in the data i have, yet replacing them doesn't help or i do it wrong.

i'll figure it out eventually though, i could make the script done now but it would lack description which i think is kinda nice to have ;)

EnderW
2005-07-11, 16:30
just a little status update for those curious. i have almost finished the script, so it now fetches tv listings for american users. i have yet to test the xml it produces, but i am pretty sure it works. i have also yet to test it on the xbox but oh well ;)

Kain
2005-07-11, 16:35
killer dude!! this thing is going to be awesome when its done :kickass:

los93sol
2005-07-16, 19:00
update: thanks to enderw for your work on the script and jslawler for your work on the gui!

the script is now working to grab listings for north america. it uses zap2it just like mythtv for those of you who are familiar with it. we need to write an email to zap2it to see about getting a certificate code for xbmc users. if you already have a zap2it account, you can use your existing account, no need to setup a new one. the script does everything for you...you simply launch it and on first run it will prompt you for your username and password, if the correct parameters are supplied, it will save them, if you mess up and enter an incorrect username or password the settings will not save so you will be prompted again the next time you run the script. :d it will then grab the information from zap2it and create your listing.xml and place it properly for you. when you load up the tv guide it will automatically import your listing.xml. when the listing.xml is imported it will check to make sure it is up-to-date, if it is not, the script will automatically be run, and it will do it all for you so you don't have to maintain anything.

this system was planned out and executed very nicely, it still needs some work as far as user settings go (ex. how many days to grab, timezone, etc.), but it is working for the most part. it will be commited to the svn soon for anyone following this project closely. :)

regards,
los93sol

Livin
2005-07-16, 19:02
nice! :o

i'm foaming at the mouth... great job guys!

EnderW
2005-07-16, 19:28
:d


i'm working on a norwegian parser now (well, i guess most swedes could use it too and possibly others). uses fredag.dagbladet.no/tv as a base. i dunno how soon it will be done though, but it doesn't really matter as there will be some time until the guide is in cvs anyways...

los93sol
2005-07-22, 05:25
any dev's reading up on this, there is a small debate as to how to "properly" handle grabbing data and if using python scripts is really the best way to do it.

on the plus side, python is generally easier for the masses to help maintain....but at the same time, there are sites that are dedicated to serving data to programs like mythtv that would require little to no maintenance since the sites don't generally change. the issue is finding these sites that are more "dedicated" to grab the data for everyone.

now the reasons for the debate... (keep in mind we would like to see this is cvs at some point)

-python is not currently enabled by default in build.bat
-a python port of the xmltv libs have to be installed
-communication between c++ code and python is a bit "dodgy" in the current code
-limitations of python in general

personally, i think we should do more research and seek the sites that can be used that will not change, at least not without notice or very frequently. then i don't see any problem grabbing data using c++ code. please note that this is my personal opinion and i do understand the issues of maintenance, but feel if properly researched that maintenance will not be an issue.

if any of the official dev's would please take a gander at the current code for the tv guide (svn link is posted earlier in this thread), and comment on it a bit, that would be awesome. it seems this project has reached a point where it is going to need some guidance from the official team, so if you have a bit of time to take a peek.... :d

regards,
los93sol

Livin
2005-07-22, 05:51
maybe check out what bigbellybilly has done with mytv script... he is pulling data from zap2it (xml) and parsing it no problem.

also, check out his listings grid screen... very efficient, lots of info, and easy to use.

los93sol
2005-07-22, 07:07
we are currently doing the same thing as far as using zap2it, but that's not really what we are looking for....we need some official dev response on the issue. :d

i think i may have something figured out with it but need to consult jslawler about it first.

regards,
los93sol

Gamester17
2005-07-22, 10:44
maybe check out what bigbellybilly has done with mytv script... he is pulling data from zap2it (xml) and parsing it no problem@enderw/los93sol fyi; bigbellybilly has managed to get a certificate code to zap2it for his mytv script (http://www.xboxmediaplayer.de/cgi-bin/forums/ikonboard.pl?act=st;f=21;t=13584;st=48), how are you getting along with that?

ps! i'm not a developer so i can't give a deffinit answer to the "python or no python question" but i still think python grabbers is best for now.

EnderW
2005-07-22, 13:08
los93sol:

ok, this is gonna be blunt, but i don't have time to write too much right now. it's nothing personal, and i think you know that.

-python is not currently enabled by default in build.bat

ok, this is perhaps a real problem, but to be honest, who doesn't run xbmc with python nowadays?

-a python port of the xmltv libs have to be installed

i am sure a lib would have to be created for the c code to (i for sure wouldn't write my own code to create xmltv xml). that it is a python lib and not a c lib i think make little difference. this is easily solved solved with no clutter for the user, and very little for the coder.

-communication between c++ code and python is a bit "dodgy" in the current code

again, how would communication between a c grabber be much different? you would need much of the same code, but you wouldn't actually see the results (written to a file inorder to communicate between the two). i know this is an issue, but i am not so sure you wouldn't meet the same obstacles when using c code...although it could be a bit easier.

-limitations of python in general

what limitations exactly? python is a very powerful coding language and such remarks just mean you've spent too much time talking to me (who is a lousy python coder).

if you compare the xbmc devs with c knowlegde up to the scripters you see that there are many more active scripters (ok, walking on thin ice here but this is my impression...could of course have something to do with where i'm involved in things). tv grabbers are fairly easy tasks, which xbmc devs shouldn't be bothered with, and that's exactly why python is a good tool to use because python is so easy to learn.*also there are lots of tv-scripts out there in python already which may be able to be ported to a grabber. and we already got a grabber for zap2it and dagbladet (almost done). one last thing is that, while ideally we should use sites that never ever change etc, this is in many places a dream as such sites doesn't exist for all parts of the globe.

in conclusion, i really can't see why you bring this up as i really don't think it will gain anyone if we go with c. i know that the communication is a problem, but i don't think it's better to go with c just because of that. not to mention that the python grabbers might be more easily replaced if broken...given that the c grabbers are compiled into binaries and irreplaceable after compile.

i know that you're aware of much of this and want devs to look at it (which is good), i just had to get it out...

affiini:

we already have a fully working zap2it grabber. i am sure it could be optimized but i don't find slow at all (except for the large download).

i am sure some of the statements in this post is wrong, if so please slam it back at me :)

i won't be able to reply to any responses for some days, but i'll check this thread when i get back.

-enderw

Gamester17
2005-07-25, 12:01
anyone wishing to code a xmltv listing.xml python grabber for the united kingdom (uk) might find this (link) (http://slashdot.org/article.pl?sid=05/07/23/1643238&tid=129&tid=99) and this (link) (http://slashdot.org/comments.pl?sid=156808&threshold=0&commentsort=0&tid=129&tid=99&mode=thread&pid=13145050#13145451) interesting and usefull ;)

elupus
2005-07-26, 01:52
imho.. tvgrabber should be pythonbased ased.. webpages have a tendancy to change, and to accomodate that the grabbers should be easy to fix, not requiring the xdk to compile.

while a dll approach also would work, python would be byfar the simplest way of doing this, since python is written with the idea of text parseing in mind, c is definatly not. (i'm not a python programmer even).

python has a few quirks like not unloading, and as said having abit complicated c interface. but think they should be possible to overcome. not being in the normal build.bat can easily be changed if something as substantial like this relies on it.

but as said this is just my opinion, and am not the one coding it.

elupus

jmarshall
2005-07-26, 12:49
i completely agree with elupus. i coded up the changes when imdb changed (dumping them into a windows dll so that i didn't have to test using the xbox all the time) and it is an extreme pain to parse websites using c/c++. in a dll you also lose the use of stl string classes (ie you have to write a string class as well)

from what i've seen of the python parsers, they seem much easier to change and tweak.

just another opinion by someone not coding it ;)

cheers,
jonathan

Livin
2005-08-09, 20:57
any progress report... or beta release date?

los93sol
2005-08-10, 00:07
i haven't seen jslawler around irc for quite awhile, this doesn't mean he isn't working on it, but i went ahead and turned over his code to the team, it is posted on sf.net as an update to the abandoned sub-project xmltv-gui. the svn is still setup and ready to go for any other dev's interested in this.

jslawler, if you would like to get the irc channel going again, please get in contact with me.

regards,
los93sol

jslawler
2005-08-10, 13:10
i am still chugging away at this, but a lot slower at the moment.

i have managed to increase the sql efficiency for importing tv guide data. i have it able to import 3700 shows (2 days of american tv which is like 70 channels) in 1 and a half minutes. i got it to load an australian tv guide in about 7 seconds. as you can see we have a lot less channels :p i'm also experimenting with caching the tv guide data into memory to reduce the amount of sql queries.

it would be nice if someone made some nice tv guide buttons. and background, as a lot of the under the scenes code is done (for viewing the guide, not grabber stuff). i'd like to see it in action with a usable gui :)

here is a small image of what i would love it to be like..but probably not with the blue theme as that wouldn't fit.

http://img301.imageshack.us/img301/9392/australianepg5xb.jpg

images needed are:
+ button for unfocused grid item
+ button for focused grid item
+ image to go behind channel name label
+ image to go behind time label
+ background image

later on i would also need an image for the grid button focused and uncfocused if the tv show goes beyond the start of the grid, or beyond the end of the grid.

Livin
2005-08-10, 19:43
nice!

i wonder what other tv guide scripts and pvrs are using for images. we may be able to "borrow" some ideas.

or what about making a grid that just uses "colored" boxed (think html style). this way a user would be able to adjust the colors on the fly. you could color code different types of programs with different colors... like zap2it and titantv does with their grids.



http://members.cox.net/livin/titan.jpg

los93sol
2005-08-10, 23:59
:d wow! that is good news indeed, i assumed that you had lost interest in the project or that other things had demanded your attention and the project had been dropped. great to see you are still working on it! i will be hanging around in the irc channel if you or anyone else would like to come chat. i just checked out your updates to the svn, i am wondering, with your latest commits did you "sync" the code to the latest xbmc cvs as well, or should i continue to use 6-20-05 cvs?

regards,
los93sol

jslawler
2005-08-11, 00:20
hi,

tonight (thursday) and friday night i will not be home till very late so i won't get anything new done. but i have all of next week off work, so i should get lots of free time then.

also, i don't remember what is the latest version it is synced to, but when i have free time (after friday) i will get it working with the latest cvs.

DonJ
2005-08-29, 12:29
any news?

jslawler
2005-08-30, 11:33
i'm only one man :p if anyone else wants to contribute to the code they can. if you reply here i can make the latest code available.

i only get a small amount of time during the week to work on this, as i work all day, and have university work to do as well.

i have managed to get the code working with the latest cvs. it was a lot of changes in the underlying code since lots had changed in the main xbmc code.

so at the moment the code is at the stage where if you put a listing.xml file in the right place it will load it in, and allow you to browse the grid.

i am still working on making the code memory leak free :)

but anyway, that is the current status.

Livin
2005-08-30, 19:49
jslawler,
your work is appreciated, do it on your time when you want to. there is already a python script that works from bigbellybilly if people "need" an epg immediately.

los93sol
2005-09-08, 05:13
jslawler: just curious if you got those mem leaks taken care of...haven't seen you around in awhile. also was wondering if you had any updates for the svn? :)

regards,
los93sol

jthunder
2005-09-17, 00:53
hey guys, great thread on the tvguide functionality, a couple of comments from an uneducated python coder;

1. a standard ui feel would be ideal for the epg, something that is consistent with the skin (pmiii for me :) ). i'm sure it would be doable to photoshop up some button images, we just need a list of the ones that are needed and let one of the graphically inclided people shoot at it.

2. i like the idea of incorporating the epg into the base xbmc code base, it should rely on a listing.xml file being present in a location. the grabbing function to populate the epg can then be agnostic of the provider, and just needs to conform to the xmltv standard.

3. there should be a context menu option for the main epg screen and the program detail screen that gives the ability of the user to 'watch' the program. then this hook could call what ever means necessary to watch the show - remote ir commands, etc. in my case using tsreader (dvb app) the watch action could call the tsreader command server to start recording the appropriate channel, and then use the xbmc.play function on the recorded program (due to it allowing recording and playback simultaneously).

anyway just a few comments, i'd really like to see this thread and app go somewhere.

jt

jslawler
2005-09-26, 16:45
hi people,

some good news and some bad news.
bad news is that my computer is having some problems, and i cant use it at the moment, so i can't build or test any code.

the good news is that before it broke i had pretty much created what i think is a stable tv guide. finally :p

i'll upload the files for people to use if they want to test it, but bare in mind my computer broke while i was coding the grabber manager stuff, so that part may not work completely.

since it may be a little while until i get to do any more coding, ill just upload what i have, and we will see what problems arise.

i need to find somewhere to host the file, which i will do tomorrow, as i have to go now. lossol, maybe send me a pm with your email address so i can send you the files so u can get it to build successfully.

los93sol
2005-10-06, 02:25
been messing with the tv guide skin a bit...a few screenies...also need some feedback, can't decide...red or blue?
http://img43.imageshack.us/img43/1750/screenshot0083cy.png

http://img43.imageshack.us/img43/3825/screenshot0126tv.png

regards,
los93sol

hazeh
2005-10-07, 14:01
looking at nothing but those 2 screenshots, i would say the blue looks better personally.
is it possible to have different program types (movies, documentaries, soaps etc) show up as different colours? i'm not sure if this would look too messy, though it does seem ok on some of the other screenshots of media centre pcs.

looking forward to this feature, ideally coupled with an automatic xml grabber. used it instead of the ntl digital epg i get in here in the uk back in the days of xbmp.

Livin
2005-10-10, 00:42
looking at nothing but those 2 screenshots, i would say the blue looks better personally.
is it possible to have different program types (movies, documentaries, soaps etc) show up as different colours? i'm not sure if this would look too messy, though it does seem ok on some of the other screenshots of media centre pcs.
i agree blue.

i also would like to see the ability to "color code" different program types like both zap2it and titantv does with thier epgs.

RocafellaSqualie
2005-10-10, 07:15
count me in on blue being the color :)

tv guide and skin looking very good. can't wait to use it myself :kickass:

nianhbg
2005-10-18, 18:48
blue is the right color.

i can't wait to test this. :thumbsup:

Livin
2005-10-20, 01:50
any word on a beta?

Livin
2005-11-09, 00:35
it has been a month without status... is this dead?

nianhbg
2006-04-20, 00:02
is this dead? it was a nice feature to xbmc

jabba200
2008-01-04, 01:35
Sorry to dig up a very old post but it seems that the guys coding this were so close. :sad:

does anybody have the half finished code or even can contact jslawler to get the code from him?:nod:

lets get this going as im sure im not the only one to agree that this is the one of the only features missing from xbmc at the moment

Gamester17
2008-01-04, 15:24
Anyone can still download the half-finished code from here:
http://sourceforge.net/project/showfiles.php?group_id=87054&package_id=153914&release_id=331612

Hope that you or someone else will look at this, will you? :grin:

I agree that it is one of the last big missing features in XBMC, ...not THE last though :;):

Good luck, anyone.

Geeba
2008-01-04, 18:21
Yes it looks like they made good progress!!

Wish I understood more so I could help more.... dont suppose theres a big call for DWDM or TCP/IP engineers in XBMC :(

samsam
2009-05-11, 18:28
Hello,

I'm working on a TV program displayer for french TV.

I've already coded the script to grab the programs.
I'd like to implemant a GUI like this one, with a nice timeline per channel, but can't download it to study the code :shocked:

Anyone can help me please ???

Thanks a lot !!

hokemon
2009-11-22, 09:25
Anyone can still download the half-finished code from here:
http://sourceforge.net/project/showfiles.php?group_id=87054&package_id=153914&release_id=331612

This link just returns a blank page now. Has this been removed?