New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xmltv lineups #128
Xmltv lineups #128
Conversation
…into xmltv-lineups
for sky channels based on a name correlation between Sky epg lineup entries and the current channel list in tvh epg
(which doesnt have service-id) then channel name lookups will take place and if matched channel number/name/icon will be updated Flag in WebUI will also define if changes take place. Other small tidy up of code
|
To push a lineup file, do something like: |
|
Sorry I've not had a chance to look this through yet. But I will try and get around to it this week or next. |
| @@ -531,6 +537,282 @@ static time_t _xmltv_str2time(const char *str) | |||
| return save; | |||
| } | |||
|
|
|||
| /* Channel Lineup parsing and search code - https://github.com/andyb2000 Aug 2012 */ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function needs moving, I'll have a look at defining a generic service find function that you (and my other code) can use.
|
@andyb2000 A general comment, fix your formatting, ensure its 2 spaces for indent and don't skimp on indentation it makes it difficult to read the code. Lots of debug is good while getting stuff to work, but generally try and keep it to informative stuff once you're happy its running. If you need more detailed stuff stick it under #ifdef EPG_TRACE. |
|
and break your lines, 80 chars isn't a strict limit, but try and keep to it where possible. Again makes it easier to read the code as most of us will set editors to that width (still generally useful for side by side comparison). |
and size as per comments from AdamSutton Additional debug now under #ifdef EPG_TRACE statements
Also changed line length on some comments
|
Done a few mods to tidy things up and added in the ifdef EPG_TRACE to make normal debugging a bit lighter |
| /* Channel Lineup parsing and search code | ||
| https://github.com/andyb2000 Aug 2012 */ | ||
|
|
||
| static service_t *_xmltv_find_service ( int sid ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at my pr/128 branch, I've added a new function that should be used instead of this. dvb_transport_find3(). Most of the params can be set to 0/NULL and it will search ALL things etc...
See opentv and eit modules for example usage.
| if((lineups = htsmsg_get_map(lineups, "xmltv-lineup")) == NULL) return 0; | ||
| if((lineups = htsmsg_get_map(lineups, "tags")) == NULL) return 0; | ||
|
|
||
| HTSMSG_FOREACH(e, lineups) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit is very messy. You should be able to get what you want from lineups/tags using the:
htsmsg_xml_get_cdata_str
htsmsg_xml_get_cdata_u32
I think.
Also break the sections within the lineups into a few functions. To make it a bit more readable. Look at existing XMLTV parser.
Also changed update to channel name, icon, number to functions in channels.h
Added a sample script to pull icons down for freeview as a template
structure it better.
|
@andyb2000 This still needs quite a lot of work.
can be simplified to Or something like that (but don't forget to check the return value, or at least init chan_number to something sensible in case nothing is detected). Adam |
Conflicts: src/dvb/dvb.h src/dvb/dvb_multiplex.c src/dvb/dvb_transport.c src/epggrab/module/eit.c src/epggrab/module/opentv.c
|
Adam, trying to rebase and I've lost "dvb_transport_find3" was this pushed to master? Working on these now (Back from holiday so catching up on coding) so should have these caught up with shortly for testing. |
|
@andyb2000 hmm, I can't see find3, only find and find2. I can't see it on my branch either, where is it used in your code? And beware I think you've committed stuff with conflicts in it. |
|
On 07/11/12 12:33, Adam Sutton wrote:
Yeah, just spotted the conflicts, just want to clear the find3 up and Code for find3 is on 647 of xmltv.c and is used: It was provided by a function in dvb/dvb_transport.c according to my
Andy |
|
ah, yes it looks like I added a definition to the dvb.h file, but I don't seem to have the function defined :(, hmm I wonder where I put it! I'll try and find it and add it to master. |
code tidy and format
|
Added dvb_transport_find3 to dvb_service.c |
|
@andyb2000 sure I'll try and take a look this week. |
|
@andyb2000 if you find time to get back into this, let me know, I still would like to include it, but closing for now. |
xmltv modifications to permit lineup xml's to be pushed to the socket from http://supplement.xmltv.org/tv_grab_uk_rt/lineups/ files that will honour the "Update channel name/number/icon" switch within the EPG Grabber component and update the channels accordingly with info from the lineup xml.
Code will attempt to use the service-id embedded within the lineup xml to match entries, however in the case of sky lineup files this service-id isn't embedded so it falls back to matching on service-name comparing to the entries already in channel list within TVH.