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


- juski - 2005-01-05

the samba share is already working because i can watch recorded shows. i can play the ringbuffer with mplayer in windows, so maybe something's going wrong somewhere else.

i can still use the 'recorded shows' feature & it all works as it did before.

i'm going to have to bring the xbox into the same room as my main pc so i can play with it for now i think.

fyi i've now set the livetv folder to /video/videorec - which is the same as the recorded programs folder. /video is shared & i can see every last file on my windows box.

xbmc can see everything too.

btw my live tv is a ts stream (dvb-t) - would this present a problem? i don't think it will but i'd like that verified.


- rubenonrye - 2005-01-06

hi everybody,

i've fixed xbmc_mythtv-0.14 to work with protocol version 14 in mythtv. it seems the mythtv people started using a time_t for the starttime and endtime fields instead of the 'mythtime' format that xbmc_mythtv was expecting. i also applied this to the .15 version so that delete, thumbnails, and program information now work again. the code in .15 was just taking the last show for the constructor showdetailwin class.

if anyone wants these, there are patches or pre-patched tarballs here.


- EuphoricaL - 2005-01-07

hi guys,
great cvs patch cheers rubenonrye, works great.
i've applied it and included it with my livetv changes in version 0.15.1
to ease installation i've dumped all the files in the same folder, just copy this to xbmc/scripts and correct your interface pointer to point to the correct place. no need to have some files in library and some in scripts etc.

0.15.1 release:
http://www.comp.lancs.ac.uk/computi....5.1.zip

new stuff:
livetv: grabs channel list from myth
livetv: selection of channel by name
livetv: chooses free tuner, so works alongside other frontends and multi-cards
livetv: starts on entry to interface, stops on exit from interface
recordings: mythtv cvs (protocol 14) support

i think i've finally perfected the protocol for using livetv, buffers, changing channel etc.
still slightly buggy due to the way the ringbuffer on myth works
so its just interface stuff to make it look pretty now.

admin:
if people want to post patches against the current release, i'll (or anyone can) apply the patches and post a new version on the forum when necessary, we might get some more progress then.

todo:
schedule recordings
osd
improve livetv interface


- rubenonrye - 2005-01-07

thanks for all of your work btw, i've been wanting to take a stab at this for a while now but haven't had the time...

live tv is working great for me now, i had to change some numbers in the latest version to make it display correctly on my tiny tv though.

as for a better user interface/osd, couldn't we just subclass from the tvguidewin and add an overloaded onaction that starts the player and changes channels if you click a certian button? kind of like the way the mythfrontend epg works by pressing 'm' to switch to the current channel.

seems like the code for figuring out the shows/channels and what not has already been written, there's no need to rewrite it...

i might take a look at it this weekend unless you've already got something else started.


- EuphoricaL - 2005-01-07

glad to know livetv is working for you. still a few minor timing bugs i need to iron out. i was pleased i managed to get it to choose a free tuner.

subclassing tvguidewin is definitely the way to go. however i only see it necessary to display now-next for each channel, also it would be nice to fit more channels on the screen. anything would be better than my dodgy gui (still learning python, am a networking programmer).

is it possible to capture a button while mplayer has started? even if you can, i'm not sure it would be very useable, because of the lack of a osd. up and down would make sense and 1-9, but it would be difficult to use above 9 as no osd to display the channel. this is why i basically treated each channel as a seperate identity which you can choose...like a recording

i'll leave the livetv interface alone for a while so it would be great if you could improve the interface :-) you should prob start the mythlivetv from scratch, as i only wrote it to test the new commands in mythtv.py

i'm going to get a few more of the mythtv features working...


- dooze - 2005-01-10

great work on the new features guys!

just one small fix to keep things working with the old protocol version 13, lines 378 and 383 of mythtv.py both need to change from:

if mythprotocolversion < 14:
to
if int(mythprotocolversion) < 14:

thanks again!
dooze


- michael_j_w - 2005-01-12

first of all thank you to everyone who has helped develop this script! i purchased my xbox with the intent of running it as a linux/mythtv node but in the process i discovered xbmc, it rocks. so i was a quite disapointed when no matter how hard i searched i could not find a mythtv client for the xbox other than those based on *nix. but after days of searching i found your project and i lived happily ever after--well not quite yet. there is the thing, i keep getting two errors, "invalid literal for float(): [file name]" and "oncontrol".

i have a 1.6 xbox with a xecuter3 chip (legal), avalaunch dash, xbmc (last entry in change log 30-11-2004), xbmc-mythtv script 0.15. this is conected via lan to fc3 runing mysql 3.3, kde, mythtv 0.16 (both front and backends).

i get the first error when trying to watch recorded shows and the secound when i select an item in the tv listings. i am able to check the status from xbmc, browse recording, and tv listings w/out error. from what i can find on the web these are python errors so i thought i would give a heads up to the programers. and if any body should discove a fix i would appriciate a heads up.


- xerxes3rd - 2005-01-12

i am getting the same errors as michael_j_w, and in exactly the same places. when it displays "invalid literal for float(): [file name]," the "file name" portion is usually a date string. i'm using the latest cvs build of xbmc, and i've also tried it (and received the same errors) on xbmc's official 1.1 release.


- EuphoricaL - 2005-01-12

hi,
can you try:
http://www.comp.lancs.ac.uk/~leek/xbmcmythtv.tar
this is the latest code, with lots of fixes etc, try livetv by pressing back (red) on the epg channel.

we (me and rubenonrye) are working on a livetv interface now and other stuff...

to keep everyone updated with the progress, i've registered a sourceforge project and we are using this for updates/fixes. the url is:
http://sourceforge.net/projects/xbmcmythtv/ and the module is xbmcmythtv. instructions for downloading current cvs are on cvs page of the project.

if anyone wants to contribute, you can post diffs against the cvs, and i'll give you devel access after a few patches.
we'll do another (more) stable release in a week or 2.

cheers


- MHo - 2005-01-12

hi,

i found this thread today and xbmcmythtv looks really nice!
i've installed the latest version from the post above, and
still have some problems though....

when trying to view a recorded program i get the following
error: "connection instance has ho attribute 'getsingleprogram'"
any clues??

i also have a question. where is the file mytv.xml stored on the
xbox, i can't find it anywhere!

regards, mho


- EuphoricaL - 2005-01-12

mytv.xml will be in the xbmc folder.
check your samba and mythtv settings, this is probably being caused by the frontend not being able to connect to mythtv.


- MHo - 2005-01-13

(euphorical @ jan. 12 2005,21:11 Wrote:mytv.xml will be in the xbmc folder.
check your samba and mythtv settings, this is probably being caused by the frontend not being able to connect to mythtv.
ok, i'll have a look again.. i did'nt find it earlier...

i can connect to the mythtv-share on the server from my notebook (using the same username and password). is there a way to verify that this really is the problem?

/mho


- beowulfe - 2005-01-13

i've been (slowly) working on getting livetv to work with xbmc for a while now, but your efforts have far surpassed mine! thanks for all your hard work!

i've seen a few posts from people trying to get xbmc to play the mpeg-4 .nuv files. there's an old patch for mplayer that allowed these files to be played. it's available at:
http://dijkstra.csh.rit.edu/~mdz/mythtv/

this patch can be applied to the mplayer sources in the xbmc cvs with a little bit of tweaking. i have the updated mplayer.dll binary i made for my own use, which i'd be happy to distribute if someone wants to donate the server space Smile that way, you could just drop the new mplayer.dll over the old one on your xbox. the binary is not compiled against any ms sdk's, and is all open source, so legal concerns shouldn't be an issue.


- madtw - 2005-01-14

guess i should've checked this thread earlier. it looks like the xbmc mythtv scripts i started writing a while back have taken on a life of their own. good to see that others have picked up when i was too busy to work on them further.

fyi, i had no intention of not continuing with the scripts. in fact, i started poking at my version of the code over the last few days to fix a few high definition gui layout issues and to rethink the interface a little. then i remembered this thread that was started a while back and decided to see if people had any other questions since the last time i checked. to my surprise euphorical and rubenonrye have continued working on it and a sourceforge page has been setup.

anyway, i thought i'd drop a note in the forum to say that i am still around and will be working on the code some more. here are a few things i'm looking into:

1. better 720p/1080i layout for most of the screens. possibly using some sort of skinning to reduce hard coded screen positioning.
2. i'd like to change the layout to be more like the music or videos view in xbmc (i.e. buttons on left with icons/text labels in list on right). i was hoping to get darkie to look into exposing the icon/big icon/detail list control in python. imagine picking your show from a thumbnail view... ok, sometimes the thumbnails are during commercials but if they weren't, it'd look pretty slick.
3. get rid of hard coded text strings to better support localization.
4. look into fully qualified domain name lookups. someone reported an issue on this a while back after they found a work around... but i figured it might as well be fixed.

at the moment, i'm using my 0.14 code base. i briefly tried running the scripts in the latest tar in the thread but only the settings and status screens worked. any other screen caused xbmc to stop responding. i'm not sure if it is a script issue or a xbmc build issue.

someone asked a question about being able to capture input while mplayer is running. when dooze and i were working on the scripts, we looked into this a little. at that time, there was no way to capture remote/control pad events in python while mplayer is running. this means that real time channel switching isn't really possible without modifying the xbmc sources to add mythtv support. a nice way to do this might be to add support for a myth:// url prefix to xbmc so that all playback (including live tv) can be done using the myth streaming protocol but browsing recorded shows, tv guide, schedule programming is still done in python.

anyway, keep up the good work...


- dooze - 2005-01-14

hi guys,

so you you all know, the code change i posted on jan. 10 2005 (scroll up on this page) fixes the "invalid literal for float(): [file name]" problem, anyone running the official 0.16 release of the backend (ie. using the version 13 protocol).

here it is again:

just one small fix to keep things working with the old protocol version 13, lines 378 and 383 of mythtv.py both need to change from:

if mythprotocolversion < 14:
to
if int(mythprotocolversion) < 14:

thanks again everyone for picking up this project, i haven't had the time or focus to finish the parts i started (specifically the scheduling of recordings from the tv schedule), it's great to see this project is alive and well!

dooze