xboxscene.org forums

Pages: [1] 2

Author Topic: Python Help Needed From A Kind Soul...  (Read 291 times)

anubis81

  • Archived User
  • Newbie
  • *
  • Posts: 12
Python Help Needed From A Kind Soul...
« on: February 19, 2007, 11:10:00 AM »

I'm hoping that there might be a kind soul out there that is has some motivation to help with the almost working SageTV script.  It seems to have stopped working with newer builds of XBMC and the original author no longer has an XBOX so is no longer updating the script.

You can read about it at

Link to XBMC forum topic

Most functions seem to work except for the important ones, like actually playing the video files.  It very well could be an easy fix, I don't know.  I really have next to zero knowledge of python at the moment.  I'd be happy to learn, but it would take forever for me to get up to speed.  I'm just hoping that one of the many Python gurus out there could take a look at the script and see what needs changed to bring it into working order.


Thanks in advance,

David

P.S. - The most current version of the script can be found in post #190.

This post has been edited by anubis81: Feb 19 2007, 07:16 PM
Logged

nuka1195

  • Archived User
  • Sr. Member
  • *
  • Posts: 290
Python Help Needed From A Kind Soul...
« Reply #1 on: February 19, 2007, 05:53:00 PM »

change all occurances of

CODE
xbmc.PlayList(2)

to
CODE
xbmc.PlayList(1)


It looks like there is a mix of tabs and spaces, so make sure you keep the indents the same.

Logged

stanley87

  • Archived User
  • Newbie
  • *
  • Posts: 32
Python Help Needed From A Kind Soul...
« Reply #2 on: February 19, 2007, 06:32:00 PM »

Come to think about it, this might be the problem with quite a few scripts. The wiki on xbmc.player should be updated so the "temp" playlists are removed
Logged

kricker

  • Archived User
  • Newbie
  • *
  • Posts: 12
Python Help Needed From A Kind Soul...
« Reply #3 on: February 19, 2007, 06:30:00 PM »

QUOTE(nuka1195 @ Feb 19 2007, 07:53 PM) View Post

change all occurances of

CODE
xbmc.PlayList(2)

to
CODE
xbmc.PlayList(1)


It looks like there is a mix of tabs and spaces, so make sure you keep the indents the same.
I gave that a shot and it looked good on the XBMC PC build for debugging. But nothing ever started to playback on the XBOX. I looked thru the log on the XBOX and there was no playback of the file I selected and no errors. The log from the PC had this in it:
CODE
20:59:37 M:1323470848   DEBUG: CPlayerCoreFactor::GetPlayers(smb://Pvr/recordings/XPlay-3609926-0.mpg)
20:59:37 M:1323433984   DEBUG: Playback has started
20:59:37 M:1323421696   DEBUG: CGUIInfoManager::SetCurrentMovie(smb://Pvr/recordings/XPlay-3609926-0.mpg)
before I made the change above I would get this error:
CODE
20:48:13 M:1402474496    INFO: Stating file Q:\scripts\SageTV\SageTV-karl.py
20:48:13 M:1402474496    INFO: Q:\scripts\SageTV\SageTV-karl.py:1372: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
                               if (action == ACTION_PREVIOUS_MENU):
Thanks for the help, I'd love to get this working on newer builds.
Logged

anubis81

  • Archived User
  • Newbie
  • *
  • Posts: 12
Python Help Needed From A Kind Soul...
« Reply #4 on: February 19, 2007, 06:52:00 PM »

Same boat here, No playback but I can now back out of the script instead of restarting.  Certainly a step in the right direction though.  Thanks ever so much for helping on this.

David

P.S. - I have a full debug log if that would help.  Just don't know how to attach it to his post. I've attached it to a post in the SageTV forum.  

http://forums.sagetv.com/forums/showthread...p;postcount=200

This post has been edited by anubis81: Feb 20 2007, 02:56 AM
Logged

nuka1195

  • Archived User
  • Sr. Member
  • *
  • Posts: 290
Python Help Needed From A Kind Soul...
« Reply #5 on: February 19, 2007, 07:14:00 PM »

you are aware that video will not play with xbmc_pc.exe.

oops i just reread your post.

Maybe the indentation is off, there is a mix of spaces and tabs. I'm to busy to busy to go thru it line by line.

This post has been edited by nuka1195: Feb 20 2007, 03:17 AM
Logged

kricker

  • Archived User
  • Newbie
  • *
  • Posts: 12
Python Help Needed From A Kind Soul...
« Reply #6 on: February 19, 2007, 09:20:00 PM »

QUOTE(nuka1195 @ Feb 19 2007, 09:14 PM) View Post

you are aware that video will not play with xbmc_pc.exe.

oops i just reread your post.

Maybe the indentation is off, there is a mix of spaces and tabs. I'm to busy to busy to go thru it line by line.
I can do this now. Does this kind of thing really screw up a script? Seems strange to me.
Logged

kricker

  • Archived User
  • Newbie
  • *
  • Posts: 12
Python Help Needed From A Kind Soul...
« Reply #7 on: February 19, 2007, 10:19:00 PM »

QUOTE(kricker @ Feb 19 2007, 11:27 PM) View Post

I can do this now. Does this kind of thing really screw up a script? Seems strange to me.
I tried to do this but I ended up with indentation errors. I'm off to google Python and tab vs spaces.
Logged

kricker

  • Archived User
  • Newbie
  • *
  • Posts: 12
Python Help Needed From A Kind Soul...
« Reply #8 on: February 19, 2007, 11:47:00 PM »

Ok, I went thru line by line and tried to fix all the tab/spaces. I think i got it all cleaned up now, but I still get the same result as I posted above in the log. It looks like the file plays, but it doesn't.
CODE
02:15:38 M:1426309120   DEBUG: CPlayerCoreFactor::GetPlayers(smb://Pvr/recordings/TheSimpsons-WeekendatBurnsies-3609271-0.mpg)
02:15:38 M:1426272256   DEBUG: Playback has started
02:15:38 M:1426264064   DEBUG: CGUIInfoManager::SetCurrentMovie(smb://Pvr/recordings/TheSimpsons-WeekendatBurnsies-3609271-0.mpg)

Hmmm I tried to upload the script as a .txt file, but it didn't show up.

This post has been edited by kricker: Feb 20 2007, 07:49 AM
Logged

anubis81

  • Archived User
  • Newbie
  • *
  • Posts: 12
Python Help Needed From A Kind Soul...
« Reply #9 on: February 20, 2007, 11:15:00 AM »

kricker,

any chance you could upload the cleaned up script on the sage forum?  I could try it on my machine and see if we get a different result.


thanks,

David
Logged

kricker

  • Archived User
  • Newbie
  • *
  • Posts: 12
Python Help Needed From A Kind Soul...
« Reply #10 on: February 20, 2007, 12:16:00 PM »

QUOTE(anubis81 @ Feb 20 2007, 01:15 PM) View Post

kricker,

any chance you could upload the cleaned up script on the sage forum?  I could try it on my machine and see if we get a different result.
thanks,

David
I'd hate for it to get into the wild. I can PM it to you though.
Logged

kricker

  • Archived User
  • Newbie
  • *
  • Posts: 12
Python Help Needed From A Kind Soul...
« Reply #11 on: February 20, 2007, 06:44:00 PM »

Logged

kricker

  • Archived User
  • Newbie
  • *
  • Posts: 12
Python Help Needed From A Kind Soul...
« Reply #12 on: February 20, 2007, 09:58:00 PM »

here are logs from a successful run of the script using and older XBMC PC port (XBMC-CVS-11-13-2006-T3CH) and a log from a non-successful run on a newer version of the XBMC PC port (XBMC-SVN_2007-02-16_rev7841-T3CH).
worked.
not worked.

This post has been edited by kricker: Feb 21 2007, 05:59 AM
Logged

asteron

  • Archived User
  • Newbie
  • *
  • Posts: 27
Python Help Needed From A Kind Soul...
« Reply #13 on: February 28, 2007, 09:09:00 AM »

It looks like the difference between those two logs is that one switches to fullscreen mode on playback and the other one is not.  There doesnt seem to be any other information in there.  

I suggest adding a lot more "print" type statements to log out more information in the code where you launch the player.  Also please post the relevant section of code where this is done.
Logged

kricker

  • Archived User
  • Newbie
  • *
  • Posts: 12
Python Help Needed From A Kind Soul...
« Reply #14 on: March 08, 2007, 02:17:00 PM »

QUOTE(asteron @ Feb 28 2007, 11:09 AM) View Post

It looks like the difference between those two logs is that one switches to fullscreen mode on playback and the other one is not.  There doesnt seem to be any other information in there.  

I suggest adding a lot more "print" type statements to log out more information in the code where you launch the player.  Also please post the relevant section of code where this is done.
I have no clue how to do that.
Logged
Pages: [1] 2