Jump to content

EPG export


eskimo68

Recommended Posts

I have a need to export the EPG data. Doesn't have to be human readable as it's for one of my own applications. I was previously reading EPG from a mythdb export but it's not realiable anymore. This is just background info so you know what I'm after.

 

My main need is having an automatic export every day.

 

I found that you can manually export the EPG data in xml which would be just fine for my purposes if that could be automated.

 

I would probably be just as happy reading the epg.dat file directly as copying the things I need from each entry would be so close to reading the fixed data mythdb export that I expect this would mean a minimum amount of work.

 

Obviously I don't want to reverse engineer the epg.dat (although I would if I have to :)).

 

Not really a newbie question but I couldn't find anything in the manuals or using the forum search.

 

a ) Is there a way to do an automatic daily EPG export?

 

b ) Is the epg.dat file format described anywhere?

 

Link to comment

Excellent. I would be surprised if I cannot figure it out from this.

 

XML would obviously be the clean way to go especially considering updates, but a bit more cumbersome (I'd be just happy with a one evening fast hack for myself right now :)). Since I will not be updating DVBViewer pro (last update before now going to 5.x was in 2012 for me - works well enough) I'll have a look at the epg.dat directly first.

 

It's a joy using software which allws you to find decent documentation... after a while though. The site advanced search isn't exactly working well.

 

Took me 20 minutes to find the "epg.dat/channels.dat structure (for add-on developers)" you were referring to and although I knew I had seen it I basically stumbled on it by mistake.

 

For anyone else looking for it and stumbling on this post first the only way I have found that leads to sources where this can be found was to go to the main page and select the "members section" there. This leads straight to forum/sources after logging in.

 

Thanks a lot.

Edited by eskimo68
Link to comment
  • 2 weeks later...

Xmas = time to actually do some programming.

 

 

Actually replying to several of the posts in once. Bear with me :). In order of tries, the last one seemed like the best option although I tried the different options the other way around... of course :).

 

 

Tried XMLTV first but couldn't figure out if it has a wrapper for DVB or my TV card or not and with as little documentation as it had I decided to look at the other options.

 

 

Figured I probably could do a Sendmessage and export the EPG but I need to do a bit of nitty gritty first to get it to possibly work and one test required me to wait until tomorrow so I tried the recommended option meanwhile.

 

 

So, I used something like this

http://localhost:8089/api/epg.html?lvl=2

which apparently gave me an epg xml of everything. Great.

 

 

Except the channels list I got using

http://localhost:8089/api/getchannelsxml.html

only partially matched the channels (assumed channels to equal EPGID). Hmmm. No idea why. Maybe I should scratch the entire installation and all data I can find and install from scratch. Probably installed the 5.x version on top of the 4.x I had installed in 2012 or so hoping it would retain my configuration.

 

 

I then fired up the DVB Media Server (Version 1.30.1.0 (beta) (SERVER)) and saw that it doesn't match the epg data in the xml almost at all. But I knew the XML output is correct as it matches my old way of handling things. Ok, maybe this needs to be updated differently these days. I went into the recording service options in DVBViewer and enabled it. But since the DVBViewer shows things correctly and the Media server didn't I'm not sure this was a good idea. I also changed the EPG preferred language in the options (reason later). Figured I need to let things settle overnight before seeing if anything has had any effect. Thus time to write about my escapades here...

 

 

I run into one really big problem with the xml epg though. Since I live in Finland program titles and descriptions are either sent out in Finnish or Swedish. It seems pretty random which one comes first. That's really really bad for filtering and stuff although you can always create dual filters. Anyway, this was the reason I changed the preferred language in the options/epg. Maybe I can force the epg to show primarily in one language this way. Will check tomorrow if anything improved.

 

 

If I cannot solve the language problem I probably will just do dumps of the epg in xml every night just in case my primary feed of epg ever goes dark (mythdb export from a friends server). It has problems at rare intervals though which is why I would like to switch everything into my own little hands. With six years of free channel program data recorded I sure wouldn't like it to be interrupted at any time anymore.

Edited by eskimo68
  • Like 1
Link to comment

Replying to myself so I don't take up too much of people's time.

 

Seems the Save to disk dumps the epg.dat every day so I can well use that since I'm only interested in 7 fields or so. It also matches the url xml version in case I want to use xml.

 

Now if I only could figure out how to get the title/descriptions to be in one language instead of random Fin and Swe.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...