Kodi Community Forum
Python and MythTV (a MythTV Front-End) - 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)
+--- Thread: Python and MythTV (a MythTV Front-End) (/showthread.php?tid=2349)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39


- lintweaker - 2005-01-14

hi guys,

this is wonderful stuff :bowdown:

i have installed the latest version from cvs and i am able to see
the program guide, recorded shows and status :thumbsup:

but when i select a recording to watch i only get an empty error dialogbox with an ok button. what can this be? when i browse to the mythbackend server and select a nuv file manually it works like a charm.

keep up the good work!


- EuphoricaL - 2005-01-14

check your settings for the mythtv backend.
your mysql works/samba works so its probably the mythtv backend. check its not on 127.0.0.1, a lot of people have had this problem.


- tharvey - 2005-01-15

glad to see there is some more development going on with this script!

is anyone looking at adding support for the following?:
- scheduling recordings
- commercial skipping using the flagged commercials in the mythconverg database

thanks,

tim


- lintweaker - 2005-01-15

(euphorical @ jan. 14 2005,20:37 Wrote:check your settings for the mythtv backend.
your mysql works/samba works so its probably the mythtv backend. check its not on 127.0.0.1, a lot of people have had this problem.
i checked that but it is ok. it seems that there is a mismatch between the recording highlighted on the screen and the one which is actually selected for playing Shocked

i started the backend with verbose output which shows:

2005-01-15 10:14:22 mainserver::handleannounce playback
2005-01-15 10:14:22 adding: xbox as a client (events: 0)
2005-01-15 10:14:22 2 ok
2005-01-15 10:14:36 13 accept[]:[]13
2005-01-15 10:14:36 mainserver::handleannounce playback
2005-01-15 10:14:36 adding: xbox as a client (events: 0)
2005-01-15 10:14:36 2 ok
2005-01-15 10:14:45 13 accept[]:[]13
2005-01-15 10:14:45 mainserver::handleannounce playback
2005-01-15 10:14:45 adding: xbox as a client (events: 0)
2005-01-15 10:14:45 2 ok
2005-01-15 10:14:45 17871 38[]:[]globe trekker: norway and lapland[]:[] [...
2005-01-15 10:15:00 13 accept[]:[]13
2005-01-15 10:15:00 mainserver::handleannounce playback
2005-01-15 10:15:00 adding: xbox as a client (events: 0)
2005-01-15 10:15:00 2 ok
2005-01-15 10:15:00 17871 38[]:[]globe trekker: norway and lapland[]:[] [...

i it shows that i selected "globe trekker" to be played while i actually selected a episode of the simpons. something is off here...


- rubenonrye - 2005-01-16

(lintweaker @ jan. 15 2005,09:19 Wrote:i started the backend with verbose output which shows:

...

i it shows that i selected "globe trekker" to be played while i actually selected a episode of the simpons. something is off here...

hmm i'm not really sure what's going , on, i'm not seeing this problem.

for what it's worth, we've been developing the stuff in cvs against protocol version 14 and you seem to be using version 13. i don't think anything should have broken but you never know.

any chance you could look in the mythtvgui.py and change the line that says:

debugenabled = 0
to
debugenabled = 1

run the script, then post the log?

it should tell you better what's going on.

you might try the latest in cvs too (checked in this evening), it's got a bunch of changes that might have inadvertantly fixed your problem.


also make sure that you (or anyone else having problems) don't have a mythtv.py in your libs folder.


- madtw - 2005-01-16

(mho @ jan. 12 2005,13:55 Wrote:when trying to view a recorded program i get the following
error: "connection instance has no attribute 'getsingleprogram'"
any clues??
fyi, if you are getting this error, make sure that you remove any old remnants of xbmc_mythtv-0.14. this is out of my control but when the project was moved to sourceforge, the installation instructions were changed, some modules were renamed, and additional changes were made. the mythtv.py module was not renamed but it has been modified. in my version, it would have been installed in <xbmc_dir>/python/lib but in the sourceforge version, it just goes in <xbmc_dir>/scripts (or perhaps a subdir under that). if you have both, it may pick up the older version that does not have a method called getsingleprogram() since this is a new method that has been added.

also, after upgrading to the january 14, 2005 cvs build of xbmc, i was able to get into the program schedule and recorded shows screens. after i selected a recorded show, i was getting the quoted exception... but that is because i still had my version installed. i've got to run for a bit but i figured this might help some people who are having problems with the latest tarball from sourceforge.

[edit] before you try running the sourceforge version (not just if you get the above error), make sure you remove any remnants of xbmc_mythtv-0.14 or older... especially make sure you remove any xbmc_mythtv files that were installed in <xbmc_dir>/python/lib. otherwise, you will be running a mix of old code and new code and the results are undefined. at the moment, your existing config file does not need to be removed.


- lintweaker - 2005-01-16

(rubenonrye @ jan. 15 2005,23:48 Wrote:
(lintweaker @ jan. 15 2005,09:19 Wrote:i started the backend with verbose output which shows:

...

i it shows that i selected "globe trekker" to be played while i actually selected a episode of the simpons. something is off here...

hmm i'm not really sure what's going , on, i'm not seeing this problem.

for what it's worth, we've been developing the stuff in cvs against protocol version 14 and you seem to be using version 13. i don't think anything should have broken but you never know.

any chance you could look in the mythtvgui.py and change the line that says:

debugenabled = 0
to
debugenabled = 1

run the script, then post the log?

it should tell you better what's going on.

you might try the latest in cvs too (checked in this evening), it's got a bunch of changes that might have inadvertantly fixed your problem.


also make sure that you (or anyone else having problems) don't have a mythtv.py in your libs folder.
i am currently running the latest version from cvs. enabling debugging doesn't reveal very much. i am not seeing any mythtv specific items
in the xmbc.log file.

more options?


- rubenonrye - 2005-01-16

(lintweaker @ jan. 16 2005,10:07 Wrote:
(rubenonrye @ jan. 15 2005,23:48 Wrote:
(lintweaker @ jan. 15 2005,09:19 Wrote:i started the backend with verbose output which shows:

...

i it shows that i selected "globe trekker" to be played while i actually selected a episode of the simpons. something is off here...

hmm i'm not really sure what's going , on, i'm not seeing this problem.

for what it's worth, we've been developing the stuff in cvs against protocol version 14 and you seem to be using version 13.  i don't think anything should have broken but you never know.

any chance you could look in the mythtvgui.py and change the line that says:

debugenabled = 0
to
debugenabled = 1

run the script, then post the log?

it should tell you better what's going on.

you might try the latest in cvs too (checked in this evening), it's got a bunch of changes that might have inadvertantly fixed your problem.


also make sure that you (or anyone else having problems) don't have a mythtv.py in your libs folder.
i am currently running the latest version from cvs. enabling debugging doesn't reveal very much. i am not seeing any mythtv specific items
in the xmbc.log file.

more options?
Quote:more options?

check your pm, i just messaged you


- elminster - 2005-01-16

heya all,

i have nearly the exactly same problem as linkwert.

i can see the status/ recorded progs and tv schedule. but if i click on a program i get oncontrol or another error about assigned lists.

while in recorded shows their is an error box but no text just an okay.

europhical i saw your post about ip in myth and mine was indeed localhost so i changed it to my outward ip. then copied over the latest scripts. (i'm also running proto 14 with latest myth cvs, today in fact.)

briefly i got a little further into the next screen from scheduled programs, with record, always record etc.... but still no feed.

haven't been able to get that to happen again since, including copying over all the scripts again... really weird i repeated all my actions but anyway, herring perhaps.

i tried similar actions to linkduder and here are my logs not much of use im afraid:

mythbackend -v:

[root@trantor adapter0]# mythbackend -v
starting up as the master server.
2005-01-16 19:18:35.649 dvb#0 using dvb card 0, with frontend lsi l64781 dvb-t.
2005-01-16 19:18:35.660 dvb#0 warning - status: no lock!
2005-01-16 19:18:35.932 dvb#0 successfully tuned to channel 34.
2005-01-16 19:18:35.971 mythbackend version: 0.16.20041224-1 http://www.mythtv.org
2005-01-16 19:18:35.976 enabled verbose msgs : important general
2005-01-16 19:18:37.971 found changes in the todo list.
2005-01-16 19:18:37.987 scheduled 0 items in 0.0 seconds.
2005-01-16 19:18:37.997 seem to be woken up by user
2005-01-16 19:19:06.474 mainserver::handleannounce playback
2005-01-16 19:19:06.480 adding: xbox as a client (events: 0)
2005-01-16 19:19:10.029 mainserver::handleannounce playback
2005-01-16 19:19:10.034 adding: xbox as a client (events: 0)

xbmc.log:

16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_50.png
16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_25.png
16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_25.png
16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_50.png

any ideas?


- EuphoricaL - 2005-01-16

your problems sound exactly like the problems i get if i don't delete the old scripts properly...
xbmc compiles the .py files to .pyo when it first runs the scripts and won't do this again till the .pyo is deleted. so you have to get rid of .py and .pyo files and also reboot xbmc.

this is why i changed the scripts structure to a single folder. i just have the scripts in xbmc/scripts/xbmcmythtv and delete the whole folder each time i try any script changes. mytv.xml is in xbmc/ so theres no problem loosing any settings.

update: rubenonrye has done some crackin updates to the scripts, including a lot of major speed improvements and a nice livetv interface.
this is in cvs, and although its not been tested much yet, it works nicely on my setup. livetv is actually very useable and the recording screen is much quicker. cheers rubenonrye :-)


- dooze - 2005-01-16

i've been playing with the new live tv interface, which is pretty darn cool, but i've noticed a few problems with it.

firstly, i'm running a backend recording dvb-t streams, and xbmc doesn't like streaming from a nuv with one of these mpeg-2 streams unless there's about 5 seconds of data available already. i've hacked in a dialog between the request to the backend and the call to play in the scripts so i can wait a few seconds before proceeding, but it's not really ideal. if i get in too quickly the resulting stream often crashes xbmc. i've reduced the smb cache sizes right down which helps a little, but it doesn't fix the problem.

the other catch is that the scripts assume the stream is coming from tuner 1, my backend is set up to use "tuner 13", hence the scripts can't find the right .nuv ringbuffer. maybe the tuner number comes back in the response from the server or something, i dunno, but it might be worth looking into for completeness (i haven't had a chance to look myself yet).

dooze


- rubenonrye - 2005-01-16

(dooze @ jan. 16 2005,20:56 Wrote:i've been playing with the new live tv interface, which is pretty darn cool, but i've noticed a few problems with it.



the other catch is that the scripts assume the stream is coming from tuner 1, my backend is set up to use "tuner 13", hence the scripts can't find the right .nuv ringbuffer. maybe the tuner number comes back in the response from the server or something, i dunno, but it might be worth looking into for completeness (i haven't had a chance to look myself yet).

dooze
Quote:firstly, i'm running a backend recording dvb-t streams, and xbmc doesn't like streaming from a nuv with one of these mpeg-2 streams unless there's about 5 seconds of data available already. i've hacked in a dialog between the request to the backend and the call to play in the scripts so i can wait a few seconds before proceeding, but it's not really ideal. if i get in too quickly the resulting stream often crashes xbmc. i've reduced the smb cache sizes right down which helps a little, but it doesn't fix the problem.
yeah this is a problem for me too. there's a varible at the top of the mythtv.py file min_ringbuffer_size you can set to help remedy this. it defaults to 512 * 1024, but try and make it larger. the connection.liverequest() function will block until this amount of data has been written on the backend(or the change_channel_timeout has been reached). i guess this should be a setting in the user interface. i still have a bit of corruption (pvr250, mpeg2) at the beginning of the stream when i change channels, but it dosent seem to affect xbmc.

Quote:the other catch is that the scripts assume the stream is coming from tuner 1, my backend is set up to use "tuner 13", hence the scripts can't find the right .nuv ringbuffer. maybe the tuner number comes back in the response from the server or something, i dunno, but it might be worth looking into for completeness (i haven't had a chance to look myself yet).

this is a known issue that's really easy to fix. the connection.liverequest() returns the mythtv://host/path/to/ringbufferxx.nuv as a return value. all we have to do is slice off the "ringbufferxx.nuv" part and use that as the filename (this still ony assumes you have one host).

i just haven't done it because i only have one card =]. ill look at it soon though(or feel free to fix it yourself if i'm too slow)


- frooby - 2005-01-17

first off, great script. have had the same problems with the wrong ring buffer, not waiting long enough for stream etc and have a couple of easy fixed. first off after the call to liverequest just return 'ringbuf' + ourrecorder + '.nuv' or what ever the variable was for the recorder you get back from the call. the ringbuf file uses the same number. in my view this is easier than stripping test from the string!

as for the wait. i just added a progress dialog to the waitforchannelchange function (can't remember the exact function name). the dialog just displays the number of bytes currently written (i like to see things happening!Wink. also found the changing the actual network cache in xbmc to 2048, and making the top variable 2048 * 1024 gives a great result, and the wait is acceptable!


- rubenonrye - 2005-01-17

elminster:

look in your xboxmediacenter.xml file and make sure you have
Quote:<loglevel>1</loglevel>
then in mythtvgui.py change enabledebug = 0 to enabledebug = 1
you should get quite a bit more usefull information in your xbmc.log file.
Quote:16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_50.png
16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_25.png
16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_25.png
16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_50.png
hmm it looks like these files are missing from cvs. you can download one of the 0.14 tarballs and copy the skin folder into your root directory.

we need to fix this in cvs, maybe a skin and a scripts folder?


- EuphoricaL - 2005-01-17

its only those two files, we could just put them inside the xbmcmythtv module and keep it simple.
unless we are planning to start adding nice skins to the interface ;-)