• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 8
Half-finished TV-listings code (XMLTV-GUI)
#16
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.
I'm not an expert but I play one at work.
Reply
#17
@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.

Image

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
Reply
#18
Smile 
(affini @ june 20 2005,22:59 Wrote: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


(affini @ june 20 2005,22:59 Wrote: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  [url=http://membled.com/work/apps/xmltv/]xmltv.org
Confusedhifty: who's to know which one/ones is best for porting? :oops:



Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#19
Information 
@los93sol, i think the mediaportal/freevo/beyondtv 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 Wink


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)
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#20
about the grabbers, i was thinking something like this:

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

Quote:denmark(dr.dk).py

grabbers output: an xml file called tvlisting.xml (where to put it?)
Quote:<?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:
Quote:<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 Wink


cheers

/cruent
Reply
#21
Exclamation 
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
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#22
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.
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
Reply
#23
Sad 
(jslawler @ june 21 2005,22:25 Wrote: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?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#24
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.
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
Reply
#25
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.

Image

p.s i dont know how long images stay on this temp hosting for, so it may be a dead link in the future.
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
Reply
#26
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?
Reply
#27
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):
Quote:    <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?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#28
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
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
Reply
#29
:p can't take all the credit for the background...no1cantell helped with it too.
Reply
#30
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! Smile

mytv/ television guide:
Image

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]

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.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 8

Logout Mark Read Team Forum Stats Members Help
Half-finished TV-listings code (XMLTV-GUI)0