Kodi Community Forum
New MythTV add-on using libcmyth - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: New MythTV add-on using libcmyth (/showthread.php?tid=110694)



- Ersan - 2012-02-26

Awesome! Since the last merge everything works brilliantly - recordings function properly now and no more crashes.

I compiled it for windows if anyone wants: http://ersan.us/src/xbmc/win32/XBMCSetup-20120225-5c8813c-dx.exe


- sysadm1n - 2012-02-26

tricky720101 Wrote:Hi all,

Having trouble building the latest version of xbmc my system is:
ubuntu 3.0.0.16-generic 32-bit.

I used the script by sysadm1n
The error is:
make[2]: Entering directory `/home/rick/src/xbmc/lib/cpluff/libcpluff'
make[2]: *** No rule to make target `../kazlib/list.c', needed by `list.lo'. Stop.
make[2]: Leaving directory `/home/rick/src/xbmc/lib/cpluff/libcpluff'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rick/src/xbmc/lib/cpluff/libcpluff'
make: *** [lib/cpluff/libcpluff/.libs/libcpluff.a] Error 2

Does anyone know why and how to fix this??

cheers

rick

I'm not at my Ubuntu system right now so I can't reproduce the problem. Try building that library manually, though:
Code:
cd /home/rick/src/xbmc/lib/cpluff
./configure
make
If it still fails then there might be a problem with libtool, but I don't know how to troubleshoot that.

If it works then go back to /home/rick/src/xbmc and run make again to finish the build. You can then paste and run the remaining few commands (individually) from the script instead of running the whole script again.

Let us know if you get it to work and I'll update the script if necessary.


Build problem with kazlib - tricky720101 - 2012-02-27

systemadm1n

Thanks for your reply.

tried to build manually and drilled into cpluff directory and tried local build still failed.
make[3]: *** No rule to make target `../kazlib/list.c', needed by `list.lo'. Stop.

I looked into the folder ~/src/xbmc/lib/cpluff/kazlib and it only has 3 files, two headers hash.h and list.h but only one code file hash.c. Seems the source code is incomplete on my system??
Is this a problem with the git source??
Where can I find a complete source file set??

cheers
Rick


- tsp42 - 2012-02-27

tricky720101: You can try cloning the source code again. There should be 4 files in the directory.


- KeithLM - 2012-02-27

I have to admit, I went this route with some trepidation. I've heard MythTV is difficult to configure, and when I saw I'd have to compile this to work on Ubuntu I was a bit concerned, but I gave it a try, and I have one word to say: WOW!

Here's a little background on what I have:
Media server, back-end for myth, and XBMC for HT setup
AMD Phenom II X4 Quad Core 810
16GB
nVidia GT 430 with HDMI output to receiver
RAID array for media storage
HDHomeRun Prime - 3 tuners with cablecard from FiOS

Secondary system
Zotac HD-ID11
Atom/Ion system
2GB

I installed Myth on the server yesterday, it took a while, but I got it recording from all three tuners. This evening I setup XBMC on the secondary system with this plugin. After fixing the mythtv password in mysql, I got the add-on running and I can now play live TV as well as recordings.

I am encountering an issue with setting timers. As soon as I set it, an error message shows up that it was aborted. I will continue to investigate this.

For my purposes the important thing was getting live TV up and running. I plan to install a TV downstairs where there is no convenient coax connection, and I don't wish to run one, but I was able to get ethernet to that area. Now I can put this Zotac box there and have live TV. I'm grateful for all the hard work people have put into this. XBMC is maturing nicely, and is performing well for me.

*update* While I receive an error in XBMC that the recording was aborted, it appears that according to the MythTV the items are scheduled, I set up some random recordings, I'll see what happens.


- KeithLM - 2012-02-27

OK, well it turns out it's not properly setting up the recordings for me. As I noted above when I set it to record, it shows that it aborted. However when I enter mythfrontend I can see the program in the schedule. But when I select programs set up to be recorded from XBMC I see the following error "This showing will not be recorded because this rule does not match any showings in the current program listings."

One thing I've found is that when I scheduled different episodes of the same show, one from XBMC, one from mythfrontend, the format of the title of the show was different between the two. One was formatted title: subtitle, the other title- subtitle. Also, when I selected the one that wouldn't record and tried to look at upcoming shows, there were none, the other returned many results.

Seems like there's a setting wrong somewhere for what is being sent to the backend when requesting a recording. Is there a setting somewhere for this?


- tsp42 - 2012-02-27

KeithLM: I think I can fix it if you can dump the content of the mythconverg-record table from the MySQL database when you have scheduled the recording from both xbmc and mythfrontend.


- KeithLM - 2012-02-27

tsp42 Wrote:KeithLM: I think I can fix it if you can dump the content of the mythconverg-record table from the MySQL database when you have scheduled the recording from both xbmc and mythfrontend.

That'd be helpful. My mysql skills are limited though. I know how to poke around in the database and view the tables from the command line, but that's about it. Can you help me with the command I need?

I've logged in from work and took a look, what I can see is this, I tried to record Robot Chicken, episode name is Anne Marie's Pride. What I see in the database is that it put the following in title:
"Robot Chicken: Anne Marie\'s Pride"
and nothing is in subtitle. Here's a cut and paste of the data. Record 48 is valid, 47 is the one that doesn't match a rule or whatever that error was.
Code:
47 |    1 |   1257 | 04:00:00  | 2012-02-27 | 04:15:00 | 2012-02-27 | Robot Chicken: Anne Marie\'s Pride             |                       | Mr. T and the Foo Fighters allign; Stretch Armstrong transplant; Atlantis; GPS date; Alvin and the Chipmunks\' origin; Roger Ebert and M. Night Shyamalan review movies.                                               |                 | Default      |           0 |          1 |           0 |0 |           2 |         2 | Default  |         6 |    15 | Cartoon Network   |            |                |      5 |             1 |            1|            1 |            0 |            0 |            0 |       0 | 04:00:00 | 734925 |        0 |        0 |         27 | Default   |         0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | Default      |       100 |
48 |    1 |   1257 | 04:15:00  | 2012-02-27 | 04:30:00 | 2012-02-27 | Robot Chicken                                  | Terms of Endaredevil| The origin of Mo-Larr, Eternian Dentist is revealed; King of Eternia stays over, much to He-Man's dismay; Gargamel puts himself in a Smurf body to gain the trust of the village.                                      | Comedy          | Default      |           0 |          1 |           0 |0 |           0 |         0 | Default  |         6 |    15 | TOON              | EP00725962 | EP007259620088 |      0 |             1 |            1|            1 |            0 |            0 |            0 |       2 | 04:15:00 | 734925 |        0 |        0 |         27 | Default   |         0 | 0000-00-00 00:00:00 | 2012-02-27 04:15:02 | 0000-00-00 00:00:00 | Default      |       100 |

I don't know anything about the API that is used, I haven't looked at any source or Myth's documents on that yet, but I'm guessing the wrong delimiter is being used between title and subtitle.


- tsp42 - 2012-02-28

Thanks. I usually use phpMyAdmin instead of the command line. It is a lot more user friendly. I suspect that the subtitle patch is causing the problems (EDIT: Yes that the cause). You can try commenting the code out while I'm working on a proper fix (in the upcoming weekend. I'm to busy to do it now unfortunately).


- KeithLM - 2012-02-28

OK, thanks. I've commented out the two pieces of code that add in the ": subtitle" and have rebuilt it. I will try in a few hours and see what happens.

I'll look into phpMyAdmin. I've been looking for some way to snoop around in mysql ever since I moved my XBMC data into there.


- Robotica - 2012-02-28

KeithLM Wrote:OK, thanks. I've commented out the two pieces of code that add in the ": subtitle" and have rebuilt it. I will try in a few hours and see what happens.

I'll look into phpMyAdmin. I've been looking for some way to snoop around in mysql ever since I moved my XBMC data into there.

Navicat is also a very good option to use. Better GUI and easier doing more stuff.


- KeithLM - 2012-02-28

Well I just tried a few shows, and it still has problems. Now there is no subtitle, which is expected. I set up two recordings on Cartoon network, from XBMC it shows in the Scheduled Recordings as being on "257 Cartoon Network" whereas when scheduled in Myth it's "257 TOON". Similarly another show I tried had a different channel name, but the ID is fine.

Code:
| recordid | type | chanid | starttime | startdate  | endtime  | enddate    | title                                          | subtitle     | description | category        | profile      | recpriority | autoexpire | maxepisodes | maxnewest | startoffset | endoffset | recgroup | dupmethod | dupin | station        | seriesid   | programid      | search | autotranscode | autocommflag | autouserjob1 | autouserjob2 | autouserjob3 | autouserjob4   | findday  | findtime | findid | inactive | parentid   | transcoder | playgroup | prefinput | next_record         | last_record         | last_delete         | storagegroup | avg_delay |
|       50 |    1 |   1257 | 20:00:00  | 2012-02-27 | 20:30:00 | 2012-02-27 | King of the Hill                               |                          | |                 | Default      |          46 |          0 |           0 |      0 |           2 |         2 | Default  |         6 |    15 | Cartoon Network   |            |                |      0 |             0 |    0 |            0 |            0 |            0 |            0 |       0 | 20:00:00 | 734925 |        0 |        0 |          0 | Default   |    0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | Default      |       100 |
|       51 |    1 |   1257 | 20:30:00  | 2012-02-27 | 21:00:00 | 2012-02-27 | King of the Hill                               | Maid in Arlen            | | Sitcom          | Default      |           0 |          1 |           0 |      0 |           0 |         0 | Default  |         6 |    15 | TOON              | EP00207002 | EP002070020152 |      0 |             1 |    1 |            1 |            0 |            0 |            0 |       2 | 20:30:00 | 734925 |        0 |        0 |         27 | Default   |    0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | Default      |       100 |

|       49 |    1 |   1511 | 19:00:00  | 2012-02-27 | 19:30:00 | 2012-02-27 | How I Met Your Mother                          |                           | |                 | Default      |          46 |          0 |           0 |      0 |           2 |         2 | Default  |         6 |    15 | KTVTDT (KTVT-DT)  |            |                |      0 |             1 |    1 |            1 |            0 |            0 |            0 |       0 | 19:00:00 | 734925 |        0 |        0 |         27 | Default   |    0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | Default      |       100 ||
|       52 |    1 |   1511 | 19:30:00  | 2012-02-27 | 20:00:00 | 2012-02-27 | 2 Broke Girls                                  | And the One-Night Stands | | Sitcom          | Default      |           0 |          1 |           0 |      0 |           0 |         0 | Default  |         6 |    15 | KTVTDT            | EP01419872 | EP014198720018 |      0 |             1 |    1 |            1 |            0 |            0 |            0 |       2 | 19:30:00 | 734925 |        0 |        0 |         27 | Default   |    0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | Default      |       100 |

49 and 50 were made from XBMC, the other two from mythfrontend. seriesid and programid are missing, and all the post processing jobs are set to 0. I'll poke around in the code some after dinner to see if there's something else that I can figure out.


- KeithLM - 2012-02-28

I tried working with the code some and have gotten myself into a weird state. In order to determine which function affected the data sent to MythTV, I altered the strings for plot to identify which function set them. After testing that and determining which function was which, I went and changed them back, but XBMC keeps showing me my test strings. I've recompiled multiple times, and can't get them to switch back. Is there some buffer that epg data is stored in?

Nevermind, found it. I located Epg7.db and have deleted it.


- Jimmer - 2012-02-28

KeithLM Wrote:I tried working with the code some and have gotten myself into a weird state. In order to determine which function affected the data sent to MythTV, I altered the strings for plot to identify which function set them. After testing that and determining which function was which, I went and changed them back, but XBMC keeps showing me my test strings. I've recompiled multiple times, and can't get them to switch back. Is there some buffer that epg data is stored in?

Nevermind, found it. I located Epg7.db and have deleted it.

Just a thought, but did you consider a corrupted epg7.db might have caused your problem in the first place? I wonder now that you have deleted it and forced xbmc to re-build it, that your problem might actually be solved.

Just for disclosure, I have built every commit that tsp has made and I have never had this specific problem (even in the earlier days when things were ropier). So I wondered what was specific to your install/enviroment?


- KeithLM - 2012-02-28

Jimmer Wrote:Just a thought, but did you consider a corrupted epg7.db might have caused your problem in the first place? I wonder now that you have deleted it and forced xbmc to re-build it, that your problem might actually be solved.

Just for disclosure, I have built every commit that tsp has made and I have never had this specific problem (even in the earlier days when things were ropier). So I wondered what was specific to your install/enviroment?

Well I'm still having the problem. And my initial test yesterday was with a fresh epg7.db since the title/subtitle data changed. I'm curious to see what a valid recording from xbmc looks like in Myth's database. If you wouldn't mind dumping some data that would be helpful. I'm using version 0.24 of Myth pulled from whatever ppa's were provided in my Ubuntu 11.10 install. So I don't know if that makes a difference as to what data is required. And perhaps there's an option in Myth that sets it to be extra picky about program data. After all, channel, plus start time, plus end time should really do it.

As far as the code, I can now tell that PVRClientMythTV::GetEPGForChannel is being used to populate epg7.db, and while that was adding the subtitle to the name, I can't be certain that was a problem. I have found that the seriesid variable in that function corresponds with that field in the database, I don't know what makes programid, but I'm going to try to track that down. Then if I can locate how that data is passed to Myth, if the api handles it, I'll put it in there. It's the best guess I have at the moment.