SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-28-2008, 12:46 PM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
XBMC SageTv Script

CORRECTION: This is not a plugin. It is a script!!!

First off let me start with the fact that I've been using Python for all of a week so far. That said I tried to update the XBMC script for SageTV. You can get to this update at the link below. It should work with version v2.22 of Nielm's webserver. Is started this thread so that you could post issues with these scripts.

The sagetv.py script does screen scrapes of the webserver pages and should mostly work, but will be slow as it must parse through the entire web page each time it looks for something.

sagetv-xml.py uses the XML output from the webserver and so searching is faster, but I haven't been able to figure it out all the old mappings yet. It should work for the most part though.

http://forums.sagetv.com/forums/down...do=file&id=274

Suggestions are welcome, but please keep in mind I can only check this forum in my spare time which is limited

Last edited by mikwilli; 12-04-2008 at 10:57 AM. Reason: changed title
Reply With Quote
  #2  
Old 11-29-2008, 05:21 PM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
The don't like piece should again work in the xml version. Also I added a convert feature to the program details menu. This allows you to convert the quality based on the current options in the webserver. This is useful as Xboxes can't display 1080i and have trouble with 720p. There is currently no way to check the progress though to know when its done. I will see if that can be added soon.
Reply With Quote
  #3  
Old 11-29-2008, 10:27 PM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
Quote:
Originally Posted by mikwilli View Post
The don't like piece should again work in the xml version. Also I added a convert feature to the program details menu. This allows you to convert the quality based on the current options in the webserver. This is useful as Xboxes can't display 1080i and have trouble with 720p. There is currently no way to check the progress though to know when its done. I will see if that can be added soon.
Any chance you might roll this over to a XBMC video plugin instead of script as jhh has started (you call it a plugin in the title, but it is really a script isn't it?)? I'd be happy to lend a hand where I can. I'm happy to see the old script evolve into something better. My last script I posted should have worked for the latest webserver. What did you change?

EDIT:
I just tried the -xml version and it starts then just dies. I'll take a look in the XBMC log to see if I can get any clue as to why.

Last edited by kricker; 11-29-2008 at 11:06 PM.
Reply With Quote
  #4  
Old 11-29-2008, 11:13 PM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
This is what the log gave me:
Code:
00:10:31 T:1008 M:316678144  NOTICE: Traceback (most recent call last):
00:10:31 T:1008 M:316669952  NOTICE:   File "D:\HTPC\XBMC\scripts\SageTV\SageTV-xml.py", line 490, in ?
00:10:31 T:1008 M:316674048  NOTICE: 
00:10:31 T:1008 M:316665856  NOTICE: masterlist = MasterList(10)
00:10:31 T:1008 M:316665856  NOTICE:   File "D:\HTPC\XBMC\scripts\SageTV\SageTV-xml.py", line 482, in __init__
00:10:31 T:1008 M:316665856  NOTICE: 
00:10:31 T:1008 M:316665856  NOTICE: self.upcoming = ParseIt().shows(xmldoc,self.channel,False)
00:10:31 T:1008 M:316665856  NOTICE:   File "D:\HTPC\XBMC\scripts\SageTV\SageTV-xml.py", line 391, in shows
00:10:31 T:1008 M:316665856  NOTICE: 
00:10:31 T:1008 M:316665856  NOTICE: if role == 'Guest_Star': newshow.guest.append(str(people.toxml()))
00:10:31 T:1008 M:316665856  NOTICE: UnicodeEncodeError
00:10:31 T:1008 M:316665856  NOTICE: :
00:10:31 T:1008 M:316665856  NOTICE: 'ascii' codec can't encode character u'\xe9' in position 30: ordinal not in range(128)
00:10:31 T:1008 M:316665856  NOTICE: 
00:10:31 T:1008 M:316665856   ERROR: Scriptresult: Error
00:10:31 T:1008 M:317284352    INFO: Python script stopped
Reply With Quote
  #5  
Old 11-30-2008, 06:30 PM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
XBMC Sage TV Script

Yes its just a script not a plugin. Sorry for the incorrect title. If you already have one that does this that is great. I searched for several days and could not find one that was current. Where is yours posted so I can take a look? As for the error log its because its finding a non allowable character in the string. If I change the reader to force a str then it should work.
Reply With Quote
  #6  
Old 11-30-2008, 07:32 PM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
Sorry forgot to include in the last post. I will check into the video plugin also. I want to get the script limping along well enough for now and then work on something nicer

One question I have though is that the webserver seems to randomly pick extra shows to record. Each day there are one or two extra recorded shows that are not in the timeslots as my favorites and are not ones I've picked. Just curious if the issue is me or others as well.
Reply With Quote
  #7  
Old 11-30-2008, 08:25 PM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
I added a force to string in the scraper. Let me know if sagetv-xml.py works better now. Thanks.
Reply With Quote
  #8  
Old 11-30-2008, 08:30 PM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
Quote:
Originally Posted by mikwilli View Post
...If you already have one that does this that is great. I searched for several days and could not find one that was current. Where is yours posted so I can take a look?.
It's hosted at XBMCscripts.com which can be downloaded and installed straight from within xbmc if you have the xbmc scripts.com script. I'm sure you saw the thread that jhh and I kept running after coolwave's departure.

Quote:
Originally Posted by mikwilli View Post
One question I have though is that the webserver seems to randomly pick extra shows to record. Each day there are one or two extra recorded shows that are not in the timeslots as my favorites and are not ones I've picked. Just curious if the issue is me or others as well.
I don't know of the webserver being able to randomly pick shows to record. Do you have intelligent recording on in Sage?

Quote:
Originally Posted by mikwilli View Post
I added a force to string in the scraper. Let me know if sagetv-xml.py works better now. Thanks.
I'll try the new version shortly, and let you know.

Last edited by kricker; 11-30-2008 at 08:34 PM.
Reply With Quote
  #9  
Old 11-30-2008, 08:41 PM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
Unfortunately I haven't been able to get to XBMCscripts.com. I dunno if its blocked or if its down. That came up as the top result in Google for this, but since I couldn't get to it the only other script I could find was Coolwave's script.
Reply With Quote
  #10  
Old 11-30-2008, 08:52 PM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
Quote:
Originally Posted by mikwilli View Post
Unfortunately I haven't been able to get to XBMCscripts.com. I dunno if its blocked or if its down. That came up as the top result in Google for this, but since I couldn't get to it the only other script I could find was Coolwave's script.
Here it is.
Attached Files
File Type: zip SageTV-2.22b.py.zip (14.6 KB, 732 views)
Reply With Quote
  #11  
Old 11-30-2008, 09:47 PM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
I just tried the -xml version again and I get the same error. The strange thing is I can not find any character that seems odd in the .xml file. I attached it here for you to see.
Attached Files
File Type: zip recordings.zip (13.4 KB, 978 views)
Reply With Quote
  #12  
Old 11-30-2008, 09:48 PM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
I was able to reproduce it. I got the same strange error with an actor on my side. Since its not part of the expected ascii set it doesn't show up in the logs The issue is that I'm just grabbing everything. I'll apply a filter to only grab ascii characters and it should correct it. Hopefully that will be tomorrow sometime. Thanks for all the assistance.
Reply With Quote
  #13  
Old 11-30-2008, 09:50 PM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
No problem. Glad to help.
Reply With Quote
  #14  
Old 11-30-2008, 11:22 PM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
I think it should be solved now. I added encodnig for utf-8 in the toxml reading. Grid Guide is still under construction but the other pieces should work.
Reply With Quote
  #15  
Old 12-01-2008, 11:23 AM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
It opened this time, although the results on the "myTV" screen are a bit off.

old script:


-xml script:
Reply With Quote
  #16  
Old 12-01-2008, 12:10 PM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
I just did some more testing. In the 'recorded TV' screen, sorting by title does not initially work. I have to select a recording then go back to the 'recorded TV' screen for the sorting to kick in.

All in all using the xml does work faster than the full page scrapes.
Reply With Quote
  #17  
Old 12-01-2008, 03:47 PM
mikwilli mikwilli is offline
Sage User
 
Join Date: Nov 2008
Posts: 30
Cool. Thanks for the feedback. The sorting issue should be better now with the latest upload for the main page and search/recordings. One possible slowdown with xml is that it returns everything. I'll have to see if that becomes an issue. I've also been toying with if there should be a date ascending and date descending sort instead of just date.

Last edited by mikwilli; 12-01-2008 at 05:57 PM. Reason: new file loaded
Reply With Quote
  #18  
Old 12-01-2008, 07:30 PM
kricker's Avatar
kricker kricker is offline
Sage Icon
 
Join Date: Jan 2005
Location: Knoxville, TN
Posts: 1,137
Send a message via AIM to kricker Send a message via MSN to kricker
Quote:
Originally Posted by mikwilli View Post
...I've also been toying with if there should be a date ascending and date descending sort instead of just date.
That would be great.

The sorting by Title does work in the recording screens. I did find 2 more issues though...sorry

The schedule is ordered in reverse.


Details of a show from the schedule list do not populate properly.
Reply With Quote
  #19  
Old 12-04-2008, 01:28 AM
SnyperBob SnyperBob is offline
Sage User
 
Join Date: Apr 2008
Location: Chicagoland
Posts: 61
Hi guys,

I'm interested in this script, but I'm having trouble figuring out what this does. Does this allow me to view SageTV recordings in XBox Media Center?

How does this script work? Do I need to have SageTV Web Server set up, and this script scrapes those web pages to populate XBMC, or what?

Sorry, I'm a noob to all of this, but I would love to find a way to get SageTV recordings to display on my XBox. I tried checking out XBMCscripts.com as well, and the page doesn't load. I think the site is dead or something
Reply With Quote
  #20  
Old 12-04-2008, 01:35 AM
SnyperBob SnyperBob is offline
Sage User
 
Join Date: Apr 2008
Location: Chicagoland
Posts: 61
Oh, I just checked out Coolwave's site:
http://coolwave6.googlepages.com/home

He's got all the install information listed there. I'm going to work on setting this up. Thanks guys!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any interest in a plugin to support/control the Sony XL1B firewire DVD changer? TerryMathews SageTV Customizations 74 07-21-2011 02:24 PM
MediaPlayer Plugin/STV Import: Winamp Media Player Plugin deria SageTV Customizations 447 12-11-2010 07:38 PM
XBMC plugin for SageTV jhh SageTV Customizations 45 04-19-2009 01:16 PM
VMC's MyNetFlix Plugin in SageTV - WOOHOO! osburnfamily SageTV Customizations 8 06-17-2008 11:54 PM
STV Import: Weather Monitor deria SageTV Customizations 35 08-23-2006 08:15 PM


All times are GMT -6. The time now is 02:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.