pyTivo Discussion Forum Forum Index pyTivo Discussion Forum
Answers and the development of pyTivo a TiVo transcoding server
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PyTivo on a second "batch" port?

 
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> pyTivo
 View previous topic :: View next topic  
Author Message
orangeboy



Joined: 14 Sep 2009
Posts: 74

PostPosted: Wed May 05, 2010 8:56 pm    Post subject: PyTivo on a second "batch" port? Reply with quote

I use cURL (via batch) quite a bit to send my requests to pyTivo. pyTivo sends back the acknowledgement in html, and whenever I briefly see it, it makes me think some type of error has occurred! The batch I use is strictly Windows command line crap, so it runs in a command prompt window where html isn't very pretty. Would it be possible to have pyTivo open a second "batch" port that returns plain text? No big deal if not, since I don't see 95% of the transactions happening anyway!

Thanks for any thoughts in this matter...
Back to top
View user's profile Send private message
gonzotek



Joined: 12 Jan 2008
Posts: 64

PostPosted: Thu May 06, 2010 3:24 am    Post subject: Re: PyTivo on a second "batch" port? Reply with quote

orangeboy wrote:
I use cURL (via batch) quite a bit to send my requests to pyTivo. pyTivo sends back the acknowledgement in html, and whenever I briefly see it, it makes me think some type of error has occurred! The batch I use is strictly Windows command line crap, so it runs in a command prompt window where html isn't very pretty. Would it be possible to have pyTivo open a second "batch" port that returns plain text? No big deal if not, since I don't see 95% of the transactions happening anyway!

Thanks for any thoughts in this matter...
Can you redirect the curl output to a temp file?
_________________
Follow @pytivo on Twitter for project updates and more! http://twitter.com/pytivo
Back to top
View user's profile Send private message
philhu



Joined: 04 Jan 2008
Posts: 474

PostPosted: Thu May 06, 2010 1:47 pm    Post subject: Reply with quote

No, he means a standard reader useable acknoledgement.

The output is very techie.

When you send a file or anything to pytivo, have it output on a different window/channel/whatever something like:

Command successful, file xxx.xxx - transfer initiaited
Command failed, 'No room on device'


Things like that. I guess since he is doing batch though, he could parse for the good or bad outputs.
Back to top
View user's profile Send private message
gonzotek



Joined: 12 Jan 2008
Posts: 64

PostPosted: Thu May 06, 2010 2:53 pm    Post subject: Reply with quote

I don't think there is 'a no room on device' type of response. A push request tells pytivo to connect to the tivo servers in the cloud and tell them where a file is and where (which tivo) it is going. The mind servers are then contacted periodically by a tivo unit to see if there are any new requests. So the batch file and pytivo don't have any opportunity to learn if there is room on the device. Basically, the push either gets queued or it doesn't (because of bad user/pass combo, incorrect mind server, or errors on Tivo's end).

But redirection and then parsing was what I was getting at. It shouldn't be too hard to parse out the correct 'queued' response and just echo either a Queuing Successful message or Queuing Error message on any other condition. Maybe optionally open the temp file in a browser to see the complete error message pytivo gave.

_________________
Follow @pytivo on Twitter for project updates and more! http://twitter.com/pytivo
Back to top
View user's profile Send private message
orangeboy



Joined: 14 Sep 2009
Posts: 74

PostPosted: Thu May 06, 2010 5:47 pm    Post subject: Reply with quote

I believe the message typically displayed is similar to what is generated from \plugins\video\video.py:
Code:
            logger.info('[%s] Queued "%s" for Push to %s' %
                        (time.strftime('%d/%b/%Y %H:%M:%S'),
                         unicode(file_path, 'utf-8'), tivo_name))


Since it is "logger.info", I believe that message is only going to debug.log, and is not the html that is being produced.

But yes, redirecting the cURL output to a results type file is a good idea. I use a some UNC paths in pytivo.conf, so depending on whether I'm initiating the push (via batch) from "local" (F:\My Videos) or "remote" (\\MyPC\My Videos) does occasionally give me grief if I'm not paying attention. Having a (plain text) readable results file would/should help remind me to navigate to the correct folder before pushing!
Back to top
View user's profile Send private message
lrhorer



Joined: 04 Mar 2008
Posts: 153

PostPosted: Sun Sep 12, 2010 6:27 am    Post subject: Reply with quote

In this thread I asked for the same feature. What say, William? Any chance of a flat text or other machine oriented port for pyTiVo? I suppose I could open a socket directly on the TiVo server. Tivochat1.tivo.com:5223, is it?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> pyTivo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Site is in NO WAY affiliated with TiVo Inc

Powered by phpBB © 2001, 2005 phpBB Group
phpBB SEO

Get pytivo at SourceForge.net. Fast, secure and Free Open Source software downloads
[ Time: 0.1716s ][ Queries: 17 (0.0227s) ][ GZIP on - Debug on ]