[dev] CetonTV+HDHomeRun - Watch TV on XBMC (WIN/OSX)

  Thread Rating:
  • 5 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
europorsche914 Offline
Member
Posts: 88
Joined: Jan 2012
Reputation: 0
Post: #471
(2012-03-14 00:42)mcheng89 Wrote:  
(2012-03-13 04:37)Lunatixz Wrote:  Any luck with hdhomerun dual? if you need me to test any builds let me know Smile
thanks again...

try this one: http://www.mediafire.com/?2a88g9339o3faae

EPG done on xbmc pvr Smile!!!
Uploading pictures:

[Image: 357prbc.png]
[Image: kruk1.png]
[Image: 1zv92io.png]
[Image: ih3501.png]

I like!
BTW: I never got the logomapper to work correctly not sure whats up with it but I thought about converting my javascript script to .net framework program so it runs a little more efficiently
(This post was last modified: 2012-03-14 04:32 by europorsche914.)
find quote
mcheng89 Offline
Fan
Posts: 372
Joined: Jan 2012
Reputation: 2
Post: #472
(2012-03-14 04:26)europorsche914 Wrote:  I like!
BTW: I never got the logomapper to work correctly not sure whats up with it but I thought about converting my javascript script to .net framework program so it runs a little more efficiently

I'll send you source for logomapper if you want to take a look... (the xerces library is 53mb...)
.net program would be good too Smile

Maybe I'm doing something wrong....
Im guessing you see alot of output when you run the program right?
Each line of output looks for these files:
C:\ProgramData\MyChannelLogos\Logos\Color\ + (filename from logo.xml) + _c.png
C:\ProgramData\MyChannelLogos\Logos\Color\ + (filename from logo.xml) + .png
Then renames them to channel name in the channelmap.csv and copies it to logos folder

The reFocus skin looks a bit nicer Smile:
[Image: ffd282.png]
(This post was last modified: 2012-03-14 04:48 by mcheng89.)
find quote
europorsche914 Offline
Member
Posts: 88
Joined: Jan 2012
Reputation: 0
Post: #473
(2012-03-14 04:33)mcheng89 Wrote:  
(2012-03-14 04:26)europorsche914 Wrote:  I like!
BTW: I never got the logomapper to work correctly not sure whats up with it but I thought about converting my javascript script to .net framework program so it runs a little more efficiently

I'll send you source for logomapper if you want to take a look... (the xerces library is 53mb...)
.net program would be good too Smile

Maybe I'm doing something wrong....
Im guessing you see alot of output when you run the program right?
Each line of output looks for these files:
C:\ProgramData\MyChannelLogos\Logos\Color\ + (filename from logo.xml) + _c.png
C:\ProgramData\MyChannelLogos\Logos\Color\ + (filename from logo.xml) + .png
Then renames them to channel name in the channelmap.csv and copies it to logos folder

The reFocus skin looks a bit nicer Smile:
[Image: ffd282.png]

I am seeing a lot of output in the command window but no logos are copied. The logos.xml has the logo filename for the color (cfilename) and bw (wfilename) listed for each channel, provided an image exists in Logos/Color and Logos/BW respectively but otherwise the syntax your using looks correct.

[Image: b49edj.jpg]

Also this method will not map the affiliates for local channels, and the annoying thing is the affiliate name is found sometimes as the 3rd display name in the xmltv.xml and sometimes its the 4th, my javascript code does this but until its in a faster language its useless...

EDIT: hold on a sec I might see my issue. Found my issue the logo path was somehow named Logo not Logos doh!
(This post was last modified: 2012-03-14 05:24 by europorsche914.)
find quote
mcheng89 Offline
Fan
Posts: 372
Joined: Jan 2012
Reputation: 2
Post: #474
(2012-03-14 05:17)europorsche914 Wrote:  I am seeing a lot of output in the command window but no logos are copied. The logos.xml has the logo filename for the color (cfilename) and bw (wfilename) listed for each channel, provided an image exists in Logos/Color and Logos/BW respectively but otherwise the syntax your using looks correct.

[Image: b49edj.jpg]

Also this method will not map the affiliates for local channels, and the annoying thing is the affiliate name is found sometimes as the 3rd display name in the xmltv.xml and sometimes its the 4th, my javascript code does this but until its in a faster language its useless...

EDIT: hold on a sec I might see my issue. Found my issue the logo path was somehow named Logo not Logos doh!

oh thats what the cfilename and wfilename refer to...
I'll fix that tomorrow and I'll take a look at the affiliates
find quote
europorsche914 Offline
Member
Posts: 88
Joined: Jan 2012
Reputation: 0
Post: #475
(2012-03-14 05:28)mcheng89 Wrote:  
(2012-03-14 05:17)europorsche914 Wrote:  I am seeing a lot of output in the command window but no logos are copied. The logos.xml has the logo filename for the color (cfilename) and bw (wfilename) listed for each channel, provided an image exists in Logos/Color and Logos/BW respectively but otherwise the syntax your using looks correct.

[Image: b49edj.jpg]

Also this method will not map the affiliates for local channels, and the annoying thing is the affiliate name is found sometimes as the 3rd display name in the xmltv.xml and sometimes its the 4th, my javascript code does this but until its in a faster language its useless...

EDIT: hold on a sec I might see my issue. Found my issue the logo path was somehow named Logo not Logos doh!

oh thats what the cfilename and wfilename refer to...
I'll fix that tomorrow and I'll take a look at the affiliates

Im modifiying the webgui to use the new logo mapper logo names, we will need to make the logo folder accessible to the http server.
(This post was last modified: 2012-03-14 05:52 by europorsche914.)
find quote
mcheng89 Offline
Fan
Posts: 372
Joined: Jan 2012
Reputation: 2
Post: #476
(2012-03-14 05:52)europorsche914 Wrote:  Im modifiying the webgui to use the new logo mapper logo names, we will need to make the logo folder accessible to the http server.

maybe we should create the logos directory under webfiles.
also, maybe it would make more sense to rename to the channel number instead of name?
that way we can easily get a channel logo without having to know the name...

todo tomorrow:
logomapper - cfilename wfilenane affiliates
logo API/webfiles logo dir?
finish up xbmc pvr (channels,epg,live tv)
(This post was last modified: 2012-03-14 06:22 by mcheng89.)
find quote
jdembski Offline
Fan
Posts: 455
Joined: Feb 2012
Reputation: 11
Post: #477
@mcheng89:

Could you share your bit of code where you transfer the EPG entries to XBMC? I think you know why this is interesting for me Wink

VU+ / Enigma2 PVR Client: Documentation | Development | Discussion
find quote
mcheng89 Offline
Fan
Posts: 372
Joined: Jan 2012
Reputation: 2
Post: #478
(2012-03-14 19:38)jdembski Wrote:  @mcheng89:

Could you share your bit of code where you transfer the EPG entries to XBMC? I think you know why this is interesting for me Wink

Heres the epg part:
Let me know if you need more, or if you want I can send you the whole program.
I'm still working on it...
Code:
int GetEPGDataForChannel(PVR_HANDLE handle, int channel, time_t iStart, time_t iEnd) {
    static int unique_id = 1;
    XBMC->Log(ADDON::LOG_NOTICE, "PVRCLIENT: GetEPGDataForChannel()" );

    if (iEnd-iStart>32400)
        iEnd = iStart+32400;
    for (int start=iStart; start<iEnd;) {
        char strBuffer[11], strChannel[11];
        snprintf(strChannel, 11, "%i", channel);
        snprintf(strBuffer, 11, "%i", start);
        std::string request = std::string("{\"start_time\":")+strBuffer+",";
        snprintf(strBuffer, 11, "%i", (start+10800>iEnd?iEnd:start+10800));
        request = request + "\"end_time\":"+strBuffer+",\"channels\":["+strChannel+"]}";

        start = start+10800;

        //XBMC->Log(ADDON::LOG_NOTICE, ("PVRCLIENT: "+request).c_str() );
        std::string path = "/getEPGData";
        std::string data = httpRequest("192.168.1.4",8555,path,httpDigestHeaders("username","password","POST",path),request);
        //XBMC->Log(ADDON::LOG_NOTICE, ("PVRCLIENT: "+data).c_str() );
        json_object *json_data = json_tokener_parse(data.c_str());
        if (json_data != 0) {
            json_object *channel_epg = json_object_object_get(json_data, strChannel);
            if (channel_epg) {
                int channel_len = json_object_array_length(channel_epg);
                for (int i=0; i<channel_len; i++) {
                    json_object *channel_obj = json_object_array_get_idx(channel_epg, i);

                    json_object *program_title_obj = json_object_object_get(channel_obj, "program_title");
                    json_object *program_subtitle_obj = json_object_object_get(channel_obj, "program_subtitle");
                    json_object *program_descript_obj = json_object_object_get(channel_obj, "program_descript");
                    json_object *start_time_obj = json_object_object_get(channel_obj, "start_time");
                    json_object *end_time_obj = json_object_object_get(channel_obj, "end_time");

                    EPG_TAG tag;
                    memset(&tag, 0, sizeof(EPG_TAG));
                    tag.iUniqueBroadcastId = unique_id++;
                    tag.strTitle           = json_object_get_string(program_title_obj);
                    tag.iChannelNumber     = channel;
                    tag.startTime          = json_object_get_int(start_time_obj);
                    tag.endTime            = json_object_get_int(end_time_obj);
                    tag.strEpisodeName     = json_object_get_string(program_subtitle_obj);
                    tag.strPlot            = json_object_get_string(program_descript_obj);
                    PVR->TransferEpgEntry(handle, &tag);

                    if (start < tag.endTime)
                        start = tag.endTime;
                }
            }
            json_object_put(json_data);
        }
    }
    return 0;
}


EDIT: logomapper v2
http://www.mediafire.com/?v2pewj4yhcfc51b

Will finish up XBMC pvr tomorrow...
(This post was last modified: 2012-03-16 05:42 by mcheng89.)
find quote
paulwong92 Offline
Junior Member
Posts: 2
Joined: Mar 2012
Reputation: 0
Post: #479
First of all, great work guys! Yall are doing some amazing things. I just had a few questions. I got everything pretty much working, but the Web streaming will not work for me. I have VLC 2.0 and the plugins installed. I see the vlc player, but when I go to click on a channel nothing happens. My second question is what is the logomapper for? Is it just for the web UI? I set it up for the web UI but it just gets stuck step 2 out of 3. I let it sit there for about a hour and nothing. When I go to install it though it does say Error opening xmltv.xml. Thanks in advance guys! I can't wait to see how far this goes!
find quote
mcheng89 Offline
Fan
Posts: 372
Joined: Jan 2012
Reputation: 2
Post: #480
(2012-03-16 02:58)paulwong92 Wrote:  First of all, great work guys! Yall are doing some amazing things. I just had a few questions. I got everything pretty much working, but the Web streaming will not work for me. I have VLC 2.0 and the plugins installed. I see the vlc player, but when I go to click on a channel nothing happens. My second question is what is the logomapper for? Is it just for the web UI? I set it up for the web UI but it just gets stuck step 2 out of 3. I let it sit there for about a hour and nothing. When I go to install it though it does say Error opening xmltv.xml. Thanks in advance guys! I can't wait to see how far this goes!

The web player broke with security. If you disable security, it should work.

logomapper will be used in apps that want to show a logo for the channel.
the logomapper requires mc2xml (epg data) to work
It's not used right now, but I think the web app is being updated to use those logos.

What works: XBMC, iOS/Android
Needs updating: Web interface
(This post was last modified: 2012-03-16 04:01 by mcheng89.)
find quote
Post Reply