Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 31
  • 32
  • 33(current)
  • 34
  • 35
  • 93
Release CetonTV+HDHomeRun - Watch TV on XBMC (WIN/OSX)
(2012-03-15, 00:20)mcheng89 Wrote:
(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;
        }
    }
    return -1;
}


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

Will finish up XBMC pvr tomorrow...

Ok the logomapper is working better now, except that I noticed that the affiliate name is case sensitive. When I corrected this in javascript for my logomapper I used toUpperCase() on both strings when doing my comparison to eliminate the case sensitivity, perhaps you can find something similar in c# (or whatever language your using i forget lol)

EDIT: I post the new webgui tonight, have not looked into solving the security issue yet..
Reply
(2012-03-16, 04:00)europorsche914 Wrote: Ok the logomapper is working better now, except that I noticed that the affiliate name is case sensitive. When I corrected this in javascript for my logomapper I used toUpperCase() on both strings when doing my comparison to eliminate the case sensitivity, perhaps you can find something similar in c# (or whatever language your using i forget lol)

Will fix right now... give me about 5 minutes

logomapper v3:
http://www.mediafire.com/?ya3hnalc1xaylkv

XBMC pvr is completely functional now Smile... Need to read in the settings values now.
Reply
(2012-03-16, 04:02)mcheng89 Wrote:
(2012-03-16, 04:00)europorsche914 Wrote: Ok the logomapper is working better now, except that I noticed that the affiliate name is case sensitive. When I corrected this in javascript for my logomapper I used toUpperCase() on both strings when doing my comparison to eliminate the case sensitivity, perhaps you can find something similar in c# (or whatever language your using i forget lol)

Will fix right now... give me about 5 minutes

logomapper v3:
http://www.mediafire.com/?ya3hnalc1xaylkv

Ok were getting closer, that got me a couple more logos that werent mapped now the last issue im seeing is that the affiliates.xml map, (probably affects the logos.xml map as well) has some logos that claim to be available in color which are not (for the fox affiliate, affiliates.xml states the color logo is fox.png when in fact no fox.png exists in the Logos/color folder) when this occurs the logo mapper should fall back to the bw filename in the Logos/BW folder. I think with this correction we will have it working perfectly Smile
Reply
(2012-03-16, 04:26)europorsche914 Wrote: Ok were getting closer, that got me a couple more logos that werent mapped now the last issue im seeing is that the affiliates.xml map, (probably affects the logos.xml map as well) has some logos that claim to be available in color which are not (for the fox affiliate, affiliates.xml states the color logo is fox.png when in fact no fox.png exists in the Logos/color folder) when this occurs the logo mapper should fall back to the bw filename in the Logos/BW folder. I think with this correction we will have it working perfectly Smile

Ok. I changed it to check if the color logo exists first and if it doesnt exists check for the BW logo.
Will put up another version soon...

http://www.mediafire.com/?5oqsfdsvmrowa6n
Reply
(2012-03-16, 04:34)mcheng89 Wrote:
(2012-03-16, 04:26)europorsche914 Wrote: Ok were getting closer, that got me a couple more logos that werent mapped now the last issue im seeing is that the affiliates.xml map, (probably affects the logos.xml map as well) has some logos that claim to be available in color which are not (for the fox affiliate, affiliates.xml states the color logo is fox.png when in fact no fox.png exists in the Logos/color folder) when this occurs the logo mapper should fall back to the bw filename in the Logos/BW folder. I think with this correction we will have it working perfectly Smile

Ok. I changed it to check if the color logo exists first and if it doesnt exists check for the BW logo.
Will put up another version soon...

http://www.mediafire.com/?5oqsfdsvmrowa6n

almost there now I have all logos but every logo is in black and white now lol

BTW does the api now deinterlace? just want to confirm so I can remove the deinterlace command from the web gui
Reply
(2012-03-16, 04:52)europorsche914 Wrote: almost there now I have all logos but every logo is in black and white now lol

BTW does the api now deinterlace? just want to confirm so I can remove the deinterlace command from the web gui

my bad... i didnt test it Tongue
http://www.mediafire.com/?h91g5s6en1yftgz

Deinterlace isnt on for direct stream
I think its on for any of the transcoded streams
Reply
(2012-03-16, 05:00)mcheng89 Wrote:
(2012-03-16, 04:52)europorsche914 Wrote: almost there now I have all logos but every logo is in black and white now lol

BTW does the api now deinterlace? just want to confirm so I can remove the deinterlace command from the web gui

my bad... i didnt test it Tongue
http://www.mediafire.com/?h91g5s6en1yftgz

Deinterlace isnt on for direct stream
I think its on for any of the transcoded streams

All good now Smile only other thing I can think of is storing the logos in the webfiles/resources directory instead of having the user manually copy them but thats minor..

Do you have plans to activate deinterlacing for the direct stream in the future? If not i can do a check to see if the stream is original quality and then deinterlace if needed.
Reply
(2012-03-16, 05:09)europorsche914 Wrote: All good now Smile only other thing I can think of is storing the logos in the webfiles/resources directory instead of having the user manually copy them but thats minor..

Do you have plans to activate deinterlacing for the direct stream in the future? If not i can do a check to see if the stream is original quality and then deinterlace if needed.

If you want I can make a getChannelLogo?channel=<channel_number> api to get the logo? (or something like that)
I dont think that deinterlace works without transcoding... or at least VLC doesnt deinterlace the stream
Reply
(2012-03-16, 05:14)mcheng89 Wrote:
(2012-03-16, 05:09)europorsche914 Wrote: All good now Smile only other thing I can think of is storing the logos in the webfiles/resources directory instead of having the user manually copy them but thats minor..

Do you have plans to activate deinterlacing for the direct stream in the future? If not i can do a check to see if the stream is original quality and then deinterlace if needed.

If you want I can make a getChannelLogo?channel=<channel_number> api to get the logo? (or something like that)
I dont think that deinterlace works without transcoding... or at least VLC doesnt deinterlace the stream

Its fine with me if the api serves the logo, especially if you have plans for adding the logos to the guide in xbmc pvr Wink , just let me know the call and ill implement it.
Ok Ill write something up quick to deinterlace for direct stream only.
Reply
(2012-03-16, 05:17)europorsche914 Wrote: Its fine with me if the api serves the logo, especially if you have plans for adding the logos to the guide in xbmc pvr Wink , just let me know the call and ill implement it.
Ok Ill write something up quick to deinterlace for direct stream only.

Just use that one. I'll put it in soon... just putting some last touches on the pvr build
Reply
(2012-03-16, 05:20)mcheng89 Wrote:
(2012-03-16, 05:17)europorsche914 Wrote: Its fine with me if the api serves the logo, especially if you have plans for adding the logos to the guide in xbmc pvr Wink , just let me know the call and ill implement it.
Ok Ill write something up quick to deinterlace for direct stream only.

Just use that one. I'll put it in soon... just putting some last touches on the pvr build

ok updated my post about the webgui here with links to 2 versions of index.html. version 2.6 uses the old way of looking in /m/resources/logos/<channelnumber> for the logo. version 2.7 will use the api call when you complete it. Let me know if there are any issues! Smile
Reply
(2012-03-16, 05:48)europorsche914 Wrote: ok updated my post about the webgui here with links to 2 versions of index.html. version 2.6 uses the old way of looking in /m/resources/logos/<channelnumber> for the logo. version 2.7 will use the api call when you complete it. Let me know if there are any issues! Smile

I'll upload the pvr build tomorrow... Didnt finish transcoding settings yet... Direct streaming is done though

Uploading v1.9.8 for logos fixes...
http://www.mediafire.com/?rgd2lq0ulszr29g

I made a small change to 2.7. The channel logo should be the source. But that breaks the name, so I added a onerror for the img to change the image to the channel name.
Code:
currenttable=currenttable+"<a href='/play?channel="+String(chl)+"&tuner=4&redirect=true' id='chan"+String(i)+"' title='"+String((channelmap[1] [i-1]))+"' onClick='changeSrc("+i+"); return false'><b>"+String(chl)+"<br></b><div class='divchllogo'><img onerror='this.parentNode.innerHTML=\""+String((channelmap[1] [i-1]))+"\"' src='/getChannelLogo?channel="+String(chl)+"' class='chllogo' border=0px /></div></a></td>";


I can add logos to xbmc pvr now Smile
Reply
(2012-03-16, 06:04)mcheng89 Wrote:
(2012-03-16, 05:48)europorsche914 Wrote: ok updated my post about the webgui here with links to 2 versions of index.html. version 2.6 uses the old way of looking in /m/resources/logos/<channelnumber> for the logo. version 2.7 will use the api call when you complete it. Let me know if there are any issues! Smile

I'll upload the pvr build tomorrow... Didnt finish transcoding settings yet... Direct streaming is done though

Uploading v1.9.8 for logos fixes...
http://www.mediafire.com/?rgd2lq0ulszr29g

I made a small change to 2.7. The channel logo should be the source. But that breaks the name, so I added a onerror for the img to change the image to the channel name.
Code:
currenttable=currenttable+"<a href='/play?channel="+String(chl)+"&tuner=4&redirect=true' id='chan"+String(i)+"' title='"+String((channelmap[1] [i-1]))+"' onClick='changeSrc("+i+"); return false'><b>"+String(chl)+"<br></b><div class='divchllogo'><img onerror='this.parentNode.innerHTML=\""+String((channelmap[1] [i-1]))+"\"' src='/getChannelLogo?channel="+String(chl)+"' class='chllogo' border=0px /></div></a></td>";


I can add logos to xbmc pvr now Smile

I see there, seems like you can serve images using either method (atleast thats what a website I found stated) but I like your method better, it only uses one line of code lol. ok I just update the webgui again to fix a couple minor things but mostly to have it display the program info when you hover the mouse over the show. Let me know if there are any other issues (seems like the gui loads real slow in firefox, might have to look into that, and it appears that the vlc plugin doesnt support any type of encryption so ill have to find a way around that..)
Reply
ITS REALLY AWSOME ! BUT I CAN NOT SET UP, I INSTALLED XBMC ON MY MAC, BUT I DO NOT UNDERSTAND HOW TO SET UP CETON TV, PLEASE SOMEONE COULD HELP ME. THANKS EVERYONE!
Reply
(2012-03-17, 04:21)Rotceh07 Wrote: ITS REALLY AWSOME ! BUT I CAN NOT SET UP, I INSTALLED XBMC ON MY MAC, BUT I DO NOT UNDERSTAND HOW TO SET UP CETON TV, PLEASE SOMEONE COULD HELP ME. THANKS EVERYONE!

Do you own a windows computer? This program requires a PC running whenever you want to watch tv.
Reply
  • 1
  • 31
  • 32
  • 33(current)
  • 34
  • 35
  • 93

Logout Mark Read Team Forum Stats Members Help
CetonTV+HDHomeRun - Watch TV on XBMC (WIN/OSX)10