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)



Building on a Mac - pcutler - 2012-03-11

Nevermind - found the README.

Nothing to see here, move along.


RE: New MythTV add-on using libcmyth - orduek - 2012-03-12

Lately I upgraded to latest ver (about a week ago) and found some regression in the acc codec.
Now I can't hear liveTV normally. I have echo with pitch changes all the time.
How can I downgrade to previous version?
Working with Mythbuntu 10.04.


Thank you.


RE: New MythTV add-on using libcmyth - Kr0nZ - 2012-03-12

I've switched to using this plugin for the last week now, in place of the mythfrontend. It seems to be running OK, but it does crash from time to time seemingly random.

So far the bugs I have come across are:
-After XBMC has been running for more the 24 hours, the 'Currently recording' and 'Next Recording' will show recordings planned for a week or more into the future

-Channel logos only appear in XBMC when running on the same PC as my mythbackend

-XBMC crashes when trying to exit (At first I thought it was just my graphics driver, but it also crashes on my laptop which has a different graphics driver; Intel instead of Nvidia)

-When starting to watch a new recording it will usually repeat the first couple seconds

-Sometimes a recording will just stop randomly when watching (will try to get a log next time it happens)

-when watching a recording that is still recording, the timer that shows how long the recording is doesn't update, unless your watching close to the end of the recording. This makes you only able to fast forward in shorter increments instead of the usual 30 secs

-Cant sort recordings by tvshow/movies(not really a bug, just not implemented)

-Recordings metadata/artwork not showing (Already mentioned by a previous poster)
If it help I have been looking into where myth stores its artwork and as far as I can tell, artwork is stored in the Coverart and Fanart storage groups *Table: storagegroups* then it uses the shows title to store the image (if its a tv shows), movies store images with the TMDB ID (You can find out if its a tvshow or movie by checking the 'recordedprogram' table)

I been trying to look at the source code to see how to get artwork to show up, but I know little c++, and even the little c++ I do know is based on windows, but I'll keep at it until I learn something Smile



Will report more bugs as I find them, these were just the ones I remember of the top of my head.


RE: New MythTV add-on using libcmyth - Jimmer - 2012-03-12

Hey tsp,

Have a new problem....

My missus recorded One Tree Hill and the title of the show has a / in it: "know this, we/'ve noticed"

Not sure if this is the backend trying to escape the ' in the title, or the frontend trying to deal with it

Debug log snippit:

http://pastebin.com/7ffBP0Qc

All other recordings (including other episodes of One Tree Hill) play just fine, so must be something specific to this title

Regards,

Jim

Edit:

Just to compare, the mysql entries for the two One Tree Hill recordings:

http://pastebin.com/KnNN2MHr

The unsuccessful recording has the title+subtitle in the title field and the date in the subtitle field. Not sure what caused this really (may be an error in the xml grabber data?). Will try to edit the tables with a mysql query and see if the addon can play it. I'll report back......

Edit2:

Used a mysql query to change the title to "One Tree Hill", dropping the problematic / and now the addon plays it just fine. Interestingly, I could not construct a query matching the show's title entry in the database

Code:
mysql> select * from recorded where title = "One Tree Hill: Know This, We\'ve Noticed";
Empty set (0.00 sec)

so had to use the following to change the title based on the starttime instead:

Code:
mysql> UPDATE recorded set title = "One Tree Hill" where starttime = "2012-03-05 20:58:00";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

guess if the recording can't be accessed via title during a mysql query, then the addon would have no chance either?


RE: - simonind - 2012-03-13

(2012-03-07, 09:18)321liftoff Wrote: Trying out the windows binary from the first post (31/12/2011), but am getting this error:
Code:
02:06:19 T:2136  NOTICE: -----------------------------------------------------------------------
02:06:19 T:2136  NOTICE: Starting XBMC, Platform: Windows XP Professional Service Pack 3 build 2600. Built on Dec 31 2011 (Git:20111231-165c5c8, compiler 1600)
02:06:19 T:2136  NOTICE: Intel(R) Core(TM)2 Duo CPU     T5250  @ 1.50GHz
02:06:19 T:2136  NOTICE: Desktop Resolution: 1280x800 32Bit at 60Hz
02:06:19 T:2136  NOTICE: Running with administrator rights
02:06:19 T:2136  NOTICE: Aero is disabled
02:06:19 T:2136  NOTICE: special://xbmc/ is mapped to: C:\Program Files\XBMC
02:06:19 T:2136  NOTICE: special://xbmcbin/ is mapped to: C:\Program Files\XBMC
02:06:19 T:2136  NOTICE: special://masterprofile/ is mapped to: C:\Documents and Settings\xxxxx\Application Data\XBMC\userdata
02:06:19 T:2136  NOTICE: special://home/ is mapped to: C:\Documents and Settings\xxxxx\Application Data\XBMC\
02:06:19 T:2136  NOTICE: special://temp/ is mapped to: C:\Documents and Settings\xxxxx\Application Data\XBMC\cache
02:06:19 T:2136  NOTICE: The executable running is: C:\Program Files\XBMC\XBMC.exe
02:06:19 T:2136  NOTICE: Log File is located: C:\Documents and Settings\xxxxx\Application Data\XBMC\xbmc.log
02:06:19 T:2136  NOTICE: -----------------------------------------------------------------------
02:06:19 T:2136  NOTICE: Setup SDL
02:06:20 T:2136  NOTICE: Found screen: Plug and Play Monitor on Mobile Intel(R) 965 Express Chipset Family, adapter 0.
02:06:20 T:2136  NOTICE: Primary mode: 1280x800 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: Additional mode: 320x200 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: Additional mode: 320x240 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: Additional mode: 400x300 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: Additional mode: 512x384 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: Additional mode: 640x400 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: Additional mode: 640x480 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: Additional mode: 800x600 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: Additional mode: 1024x768 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: Additional mode: 1280x600 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: Additional mode: 1280x720 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: Additional mode: 1280x768 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: Additional mode: 1280x800 @ 60.00 - Full Screen
02:06:20 T:2136  NOTICE: load settings...
02:06:20 T:2136  NOTICE: special://profile/ is mapped to: special://masterprofile/
02:06:20 T:2136  NOTICE: loading special://masterprofile/guisettings.xml
02:06:20 T:2136   ERROR: special://masterprofile/guisettings.xml, Line 0
                                            Failed to open file
02:06:20 T:2136   ERROR: Unable to load special://masterprofile/guisettings.xml, creating new special://masterprofile/guisettings.xml with default values
02:06:20 T:2136  NOTICE: Getting hardware information now...
02:06:20 T:2136  NOTICE: Checking resolution 12
02:06:20 T:2136  NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
02:06:20 T:2136  NOTICE: Loaded playercorefactory configuration
02:06:20 T:2136  NOTICE: Loading player core factory settings from special://masterprofile/playercorefactory.xml.
02:06:20 T:2136  NOTICE: special://masterprofile/playercorefactory.xml does not exist. Skipping.
02:06:20 T:2136  NOTICE: No settings file to load to load (special://xbmc/system/advancedsettings.xml)
02:06:20 T:2136  NOTICE: No settings file to load to load (special://masterprofile/advancedsettings.xml)
02:06:20 T:2136  NOTICE: Default DVD Player: dvdplayer
02:06:20 T:2136  NOTICE: Default Video Player: dvdplayer
02:06:20 T:2136  NOTICE: Default Audio Player: paplayer
02:06:20 T:2136  NOTICE: Disabled debug logging due to GUI setting. Level 0.
02:06:20 T:2136  NOTICE: Log level changed to 0
02:06:20 T:2136  NOTICE: Loading media sources from special://masterprofile/sources.xml
02:06:24 T:2136   ERROR: Keymapping error: no such action 'language' defined
02:06:24 T:2136  NOTICE: initializing playlistplayer
02:06:24 T:2136  NOTICE: DONE initializing playlistplayer
02:06:24 T:3640   ERROR: CRemoteControl::Connect - failed to connect
02:06:27 T:2136  NOTICE: EPG::CEpgContainer::Start - EPG thread started
02:06:27 T:2136  NOTICE: initialize done
02:06:27 T:2136  NOTICE: Running the application...
02:06:28 T:2136  NOTICE: ES: Starting event server
02:06:28 T:2868  NOTICE: ES: Starting UDP Event server on 0.0.0.0:9777
02:06:28 T:2868  NOTICE: UDP: Listening on port 9777
02:06:30 T:2700  NOTICE: -->Python Interpreter Initialized<--
02:06:31 T:2700   ERROR: Error Type: <type 'exceptions.ImportError'>
02:06:31 T:2700   ERROR: Error Contents: No module named simplejson
02:06:31 T:2700   ERROR: Traceback (most recent call last):
                                              File "C:\Program Files\XBMC\addons\weather.wunderground\default.py", line 17, in <module>
                                                import os, sys, urllib2, base64, socket, simplejson
                                            ImportError: No module named simplejson
02:06:33 T:448   ERROR: ADDON: extension '' is not currently supported for service addon
02:06:33 T:448   ERROR: CThread::staticThread : Access violation at 0x0042caa4: Reading location 0x00000000
02:06:39 T:2136  NOTICE: PVRManager - starting up
02:06:44 T:2136  NOTICE: PVRManager - stopping
02:06:44 T:1276   ERROR: PVRManager - PVR::CPVRManager::Process - failed to load PVR data
02:06:44 T:2136  NOTICE: PVRManager - starting up
02:06:46 T:3052   ERROR: Win32DllLoader::Load: Failed to load C:\Program Files\XBMC\addons\..\system\libcmyth.dll with error 127:The specified procedure could not be found.
02:06:46 T:3052   ERROR: LoadLibrary('libcmyth.dll') failed
02:06:46 T:3052   ERROR: AddOnLog: MythTV cmyth PVR Client: Failed to load cmyth library!
02:06:46 T:3052   ERROR: ADDON: Dll MythTV cmyth PVR Client - Client returned bad status (4) from Create and is not usable
02:06:46 T:3052   ERROR: PVR - PVR::CPVRClients::InitialiseClient - can't initialise add-on 'MythTV cmyth PVR Client'
.....
repeat error

I double checked and libcmyth.dll is located in C:\Program Files\XBMC\system.

I've found it works fine on my Windows 7 machine but I get the above for XP. Must be using something that works for the later OS I guess?

If I find out what I'll post back here....

Cheers
Simon



RE: New MythTV add-on using libcmyth - simonind - 2012-03-14

inet_ntop seems to be the function call that's for Vista and later, it will need a change to libcmyth to make it XP compatible I think


New MythTV add-on using libcmyth - pyrodex - 2012-03-14

Does anyone know if someone has 0.25 working in cmyth? It's currently in the beta phase and due out soon.


RE: New MythTV add-on using libcmyth - ZyanKLee - 2012-03-14

(2012-03-14, 13:32)pyrodex Wrote: Does anyone know if someone has 0.25 working in cmyth? It's currently in the beta phase and due out soon.

I'm running this @head ( from github.com/tsp/xbmc ) ...
But I'm not sure how far this is from 0.25rc2


RE: New MythTV add-on using libcmyth - pyrodex - 2012-03-14

(2012-03-14, 13:50)ZyanKLee Wrote: I'm running this @head ( from github.com/tsp/xbmc ) ...
But I'm not sure how far this is from 0.25rc2

I've been playing with the current cmyth provided by XBMC and playback and stuff works fine but I am looking for LiveTV functionality. Was wondering if anyone tested that with 0.25.


RE: New MythTV add-on using libcmyth - 321liftoff - 2012-03-15

(2012-03-14, 00:58)simonind Wrote: inet_ntop seems to be the function call that's for Vista and later, it will need a change to libcmyth to make it XP compatible I think

Is that a change I need to make in the source and compile, or can that change be made in the binary?


RE: New MythTV add-on using libcmyth - robweber - 2012-03-16

(2012-03-12, 23:38)Jimmer Wrote: Hey tsp,

Have a new problem....

My missus recorded One Tree Hill and the title of the show has a / in it: "know this, we/'ve noticed"

Not sure if this is the backend trying to escape the ' in the title, or the frontend trying to deal with it

Debug log snippit:

http://pastebin.com/7ffBP0Qc

All other recordings (including other episodes of One Tree Hill) play just fine, so must be something specific to this title

Regards,

Jim

Edit:

Just to compare, the mysql entries for the two One Tree Hill recordings:

http://pastebin.com/KnNN2MHr

The unsuccessful recording has the title+subtitle in the title field and the date in the subtitle field. Not sure what caused this really (may be an error in the xml grabber data?). Will try to edit the tables with a mysql query and see if the addon can play it. I'll report back......

Edit2:

Used a mysql query to change the title to "One Tree Hill", dropping the problematic / and now the addon plays it just fine. Interestingly, I could not construct a query matching the show's title entry in the database

Code:
mysql> select * from recorded where title = "One Tree Hill: Know This, We\'ve Noticed";
Empty set (0.00 sec)

so had to use the following to change the title based on the starttime instead:

Code:
mysql> UPDATE recorded set title = "One Tree Hill" where starttime = "2012-03-05 20:58:00";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

guess if the recording can't be accessed via title during a mysql query, then the addon would have no chance either?

Just wanted to add that I had this issue as well. Mine was a different show but when it was scheduled via the cmyth addon it inserted a '\' to escape the apostrophe and this showed in the title from that point on. The show recorded just fine but would not play until I changed the show name manually on the mysql cli.



RE: New MythTV add-on using libcmyth - Jimmer - 2012-03-16

(2012-03-16, 01:44)robweber Wrote: Just wanted to add that I had this issue as well. Mine was a different show but when it was scheduled via the cmyth addon it inserted a '\' to escape the apostrophe and this showed in the title from that point on. The show recorded just fine but would not play until I changed the show name manually on the mysql cli.

Hey Rob,

One thing that I never tried was playing the defective title in mythfrontend. Would be interested to know if it could successfully play the file. Guess it all depends whether it forms it mysql queries based on title alone (never really used mythfrontend, so I'm not sure what it does). Like I said, mysql could not look up the recording based on title, so this is probably one thing that the libcmyth addon will struggle with. Sounds like a mythtv issue to me.... but wanted tsp to confirm/deny!


RE: New MythTV add-on using libcmyth - robweber - 2012-03-16

(2012-03-16, 09:27)Jimmer Wrote:
(2012-03-16, 01:44)robweber Wrote: Just wanted to add that I had this issue as well. Mine was a different show but when it was scheduled via the cmyth addon it inserted a '\' to escape the apostrophe and this showed in the title from that point on. The show recorded just fine but would not play until I changed the show name manually on the mysql cli.

Hey Rob,

One thing that I never tried was playing the defective title in mythfrontend. Would be interested to know if it could successfully play the file. Guess it all depends whether it forms it mysql queries based on title alone (never really used mythfrontend, so I'm not sure what it does). Like I said, mysql could not look up the recording based on title, so this is probably one thing that the libcmyth addon will struggle with. Sounds like a mythtv issue to me.... but wanted tsp to confirm/deny!

That's a good point, I didn't try that either. I guess I was more concerned about where the slash came from originally. I've never seen mythtv insert something like that on it's own so I'm guessing the addon did it when trying to escape characters when I set the timer. If it is a self-introduced problem I would imagine this will happen more often as people use only the addon to schedule and play recordings.


RE: New MythTV add-on using libcmyth - Jimmer - 2012-03-17

(2012-03-16, 20:06)robweber Wrote:
(2012-03-16, 09:27)Jimmer Wrote:
(2012-03-16, 01:44)robweber Wrote: Just wanted to add that I had this issue as well. Mine was a different show but when it was scheduled via the cmyth addon it inserted a '\' to escape the apostrophe and this showed in the title from that point on. The show recorded just fine but would not play until I changed the show name manually on the mysql cli.

Hey Rob,

One thing that I never tried was playing the defective title in mythfrontend. Would be interested to know if it could successfully play the file. Guess it all depends whether it forms it mysql queries based on title alone (never really used mythfrontend, so I'm not sure what it does). Like I said, mysql could not look up the recording based on title, so this is probably one thing that the libcmyth addon will struggle with. Sounds like a mythtv issue to me.... but wanted tsp to confirm/deny!

That's a good point, I didn't try that either. I guess I was more concerned about where the slash came from originally. I've never seen mythtv insert something like that on it's own so I'm guessing the addon did it when trying to escape characters when I set the timer. If it is a self-introduced problem I would imagine this will happen more often as people use only the addon to schedule and play recordings.

I guess one way to test this would be to find a program (that's repeated) in the schedule with an apostrophe in the title. Schedule one showing to record via xbmc and another via mythweb and see what happens..... I'll go scan the schedules and see if anything likely looking is coming up......


RE: New MythTV add-on using libcmyth - tsp42 - 2012-03-18

'Kr0nZ: Thanks for reporting the bugs. Most of them are just not implemented yet. Not sure if the crash at exit is due to my or dushmaniacs code?

simonind: Thanks for pointing the xp problem out. Will look into it.

pyrodex: libcmyth does not (yet) support v0.25. They changed the mythtv backend protocol so libcmyth will have to be updated (mostly related to how the program info is encoded, so playback will still work).

Jimmer: I suspect that the extra backslash is due to the strings being escaped twice when communicating with the SQL server. Will try to fix it in the libcmyth code.