SageTV Community  

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

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-06-2006, 01:22 PM
danward79's Avatar
danward79 danward79 is offline
Sage Aficionado
 
Join Date: Oct 2003
Location: Brighton & Hove, Sussex UK
Posts: 251
Load file via commandline

Hi,

Is there a way with studio for sage to load an external file sent via the commandline?

Or

Is there a way for sage using a tool in studio to receive a file name from an external source (girder) to play on it's internal player?

I have had a look thru the studio manuals but could not see anything ovbvious, so forgive me if I missed something.

Cheers

Dan
Reply With Quote
  #2  
Old 02-06-2006, 01:50 PM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
not directly -- you would need to build a client/server API in studio and access it from Girder/external app...

Fortunatly my webserver already is one
A URL of the form:
Code:
http://user:pass@localhost:8080/sage/MediaFileCommand?command=WatchNow&context=SAGETV_PROCESS_LOCAL_UI&FileName=\\mediaserver\sage\file.mpg
should work with the latest webserver...
Use this either with a Girder HTTP plugin, or a command like web browser such as lynx/links/wget

Caveats: the path must match a library import or sage recordings path exactly: ie exactly what you see in detailed info pages
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #3  
Old 02-06-2006, 03:54 PM
danward79's Avatar
danward79 danward79 is offline
Sage Aficionado
 
Join Date: Oct 2003
Location: Brighton & Hove, Sussex UK
Posts: 251
Thanks I'll try that I am still on 2.3 it does not seem to work with that version so I will upgrade, and feedback if I have issues
Reply With Quote
  #4  
Old 02-06-2006, 04:12 PM
danward79's Avatar
danward79 danward79 is offline
Sage Aficionado
 
Join Date: Oct 2003
Location: Brighton & Hove, Sussex UK
Posts: 251
Works great for avi's, will / should it work for ifo's?

I have tried does not seem to for me.
Reply With Quote
  #5  
Old 02-06-2006, 04:59 PM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
for DVD filestructures, you give the path to the VIDEO_TS directory (search for an imported vid, type DVD, then view detailed info to see the path that Sage understands...)
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #6  
Old 02-06-2006, 11:54 PM
danward79's Avatar
danward79 danward79 is offline
Sage Aficionado
 
Join Date: Oct 2003
Location: Brighton & Hove, Sussex UK
Posts: 251
Good tip thanks.
Reply With Quote
  #7  
Old 10-29-2006, 06:37 AM
danward79's Avatar
danward79 danward79 is offline
Sage Aficionado
 
Join Date: Oct 2003
Location: Brighton & Hove, Sussex UK
Posts: 251
Nielm,

Is there a list of availble commands which we can use via the web interface?

So far I have managed to get a fair few, via looking in the html source of the webserver and guess work. But a definative list would be cool

Quote:
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Num%1
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Num%2
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Num%3
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Num%4
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Num%5
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Num%6
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Num%7
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Num%8
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Num%9
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Num%0

--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Skip Bkwd/Page Left
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Skip Fwd/Page Right
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Time Scroll
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Play
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Play/Pause
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Record
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Stop
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Pause
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Back
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=UP
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Guide
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Home
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Recordings
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=TV
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=DVD
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Power
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Power On
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Power Off
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Watched
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Favorite
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Don't Like

--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Left
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Select
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=UP
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Down
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Right
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Down
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Info

--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Mute
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Mute On
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Mute Off
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Volume UP
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Volume Down

--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Previous Channel
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Channel Up/Page Up
--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Channel Down/Page Down

--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Full Screen

--SageCommand?context=SAGETV_PROCESS_LOCAL_UI&comman=Delete
I have also a few others such as delete, play and remove favorites, by airing id, media file id, etc

Any chance of a list or possibly a clue as to were I might find one please?

The other question is would it be possible to get an xml feed for disk usage?

I am trying to build some girder actions, and extend my NetRemote interface, so this would all be very useful.

Many Thanks

Dan
Reply With Quote
  #8  
Old 10-29-2006, 06:58 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Any chance of a list or possibly a clue as to were I might find one please?
the source code?!

The list of SageCommands (arguments to the SageCommand page) is in the Sage manual, and in the Detailed Setup/Commands page.

Otherwise, the arguments that can be passed to MediaFileCommand/AiringCommand can be seen from the detailed info page:
  • SetDontLike
  • SetWatched
  • ClearDontLike
  • ClearWatched
  • DeleteFile
  • RecordingError (deletes file without taking into account watched status)
  • WatchNow&context=(UI context)
  • Archive
  • Unarchive

Finally ManualRecord
?command=CancelRecord/Record
?command=SetRecPad&startpad=x&stoppad=y (mins)
?command=SetRecQual&quality=zzz

ManualRecord/AiringCommand/MediaFileCommand all need an argument that specifies a file/airing:

you can either use AiringId=1234 or MediaFileId=1234 or FileName=c:\path\to\file.mpg
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #9  
Old 10-29-2006, 11:09 AM
danward79's Avatar
danward79 danward79 is offline
Sage Aficionado
 
Join Date: Oct 2003
Location: Brighton & Hove, Sussex UK
Posts: 251
Cheers Neilm,

Forgive me for asking, I am unformiliar with Java, how do I access the source code, do I need a specific ide or reader?

Thanks

Dan
Reply With Quote
  #10  
Old 11-03-2006, 03:29 PM
danward79's Avatar
danward79 danward79 is offline
Sage Aficionado
 
Join Date: Oct 2003
Location: Brighton & Hove, Sussex UK
Posts: 251
Neil,

Is it possible to specify a sagetv instance (i.e. a client) for the commands to take place on?

Cheers

Dan
Reply With Quote
  #11  
Old 11-05-2006, 01:40 PM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Originally Posted by danward79
Forgive me for asking, I am unformiliar with Java, how do I access the source code, do I need a specific ide or reader?
I thought I had posted a reply to this one... But its plain text, and linked from the wiki page
Quote:
Originally Posted by danward79
Is it possible to specify a sagetv instance (i.e. a client) for the commands to take place on?
Install the webserver on the client, and use the IP addess of the client... For extenders (MVPs/placeshifter), use the address of the server, but modify the context parameter to indicate the UI context of the MVP or placeshifter.
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #12  
Old 11-05-2006, 10:42 PM
danward79's Avatar
danward79 danward79 is offline
Sage Aficionado
 
Join Date: Oct 2003
Location: Brighton & Hove, Sussex UK
Posts: 251
Thanks Niel.
Reply With Quote
  #13  
Old 12-28-2006, 07:22 PM
UFGrayMatter's Avatar
UFGrayMatter UFGrayMatter is offline
Sage Advanced User
 
Join Date: Aug 2006
Posts: 185
Hey Nielm,

Trying to get this working w/ wget - but I'm getting a 401 unauthorized - You have any idea what I'm doing wrong?

Here is the script from my console:

Code:
C:\wget>wget.exe http://ufgraymatter:xxxxxx@localhost:8000/sage/MediaFileCommand
?command=WatchNow&context=SAGETV_PROCESS_LOCAL_UI&FileName=E:\TV\Recordings\Hous
e-InformedConsent-63365-0.mpg
--20:14:40--  http://ufgraymatter:xxxxxx@localhost:8000/sage/MediaFileCommand?co
mmand=WatchNow
           => `MediaFileCommand@command=WatchNow'
Connecting to localhost:8000... connected!
HTTP request sent, awaiting response... 401 Unauthorized
Connecting to localhost:8000... connected!
HTTP request sent, awaiting response... 200 Ok
Length: unspecified [text/html]

    0K -> .

20:14:40 (1.31 MB/s) - `MediaFileCommand@command=WatchNow' saved [1372]

'context' is not recognized as an internal or external command,
operable program or batch file.
'FileName' is not recognized as an internal or external command,
operable program or batch file.
Thanks,
Ryan

Last edited by UFGrayMatter; 12-28-2006 at 07:35 PM.
Reply With Quote
  #14  
Old 01-08-2007, 02:09 PM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Originally Posted by UFGrayMatter
Hey Nielm,

Trying to get this working w/ wget - but I'm getting a 401 unauthorized - You have any idea what I'm doing wrong?
From the log that you posted, wget is not getting the command line after the first '&' so it is missing the file name args -- try quoting the whole URL in " "

I am also not sure if wget copes with user/pass in the URL -- if quoting does not work, try using the --user=ufgraymatter --password=xxxxxx arguments to specify user and pass instead
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #15  
Old 01-15-2007, 01:41 AM
UFGrayMatter's Avatar
UFGrayMatter UFGrayMatter is offline
Sage Advanced User
 
Join Date: Aug 2006
Posts: 185
Quote:
Originally Posted by nielm
From the log that you posted, wget is not getting the command line after the first '&' so it is missing the file name args -- try quoting the whole URL in " "

I am also not sure if wget copes with user/pass in the URL -- if quoting does not work, try using the --user=ufgraymatter --password=xxxxxx arguments to specify user and pass instead
OK - here's a followup:

DOES anybody have this setup working?

One other weird thing - using the this command line - i can enter it in FireFox 2.0 and it will launch the file, but it will not in IE? Any ideas on that one?

Code:
C:\wget>wget.exe --http-user=ufgraymatter --http-passwd=xxxx "http://localhost
:8000/sage/MediaFileCommand?command=WatchNow&context=SAGETV_PROCESS_LOCAL_UI&Fil
eName=E:\TV\Recordings\EverybodyHatesChris-EverybodyHatesLiar-1102124-0.mpg"
--02:34:06--  http://localhost:8000/sage/MediaFile...WatchNow&conte
xt=SAGETV_PROCESS_LOCAL_UI&FileName=E%3A%5CTV%5CRecordings%5CEverybodyHatesChris
-EverybodyHatesLiar-1102124-0.mpg
           => `MediaFileCommand@command=WatchNow&context=SAGETV_PROCESS_LOCAL_UI
&FileName=E:\TV\Recordings\EverybodyHatesChris-EverybodyHatesLiar-1102124-0.mpg'

Connecting to localhost:8000... connected!
HTTP request sent, awaiting response... 401 Unauthorized
Connecting to localhost:8000... connected!
HTTP request sent, awaiting response... 200 Ok
Length: unspecified [text/html]
MediaFileCommand@command=WatchNow&context=SAGETV_PROCESS_LOCAL_UI&FileName=E:\TV
\Recordings\EverybodyHatesChris-EverybodyHatesLiar-1102124-0.mpg: No such file o
r directory

Cannot write to `MediaFileCommand@command=WatchNow&context=SAGETV_PROCESS_LOCAL_
UI&FileName=E:\TV\Recordings\EverybodyHatesChris-EverybodyHatesLiar-1102124-0.mp
g' (No such file or directory).
Reply With Quote
  #16  
Old 01-15-2007, 08:34 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
works for me... (wget 1.10.2 from here and in cygwin)

Futher notes: the path must match exactly the path shown in the detailed info on the webserver.

Any errors would be in the saved document (but your wget appears to be haing problems generating a valid file name -- perhaps add the command line parameter --restrict-file-names=windows )

for me the output looks slightly different:
Code:
C:\Documents and Settings\Niel\wget>wget "http://xxxx:xxxxx@mediaserver:801/sage/MediaFileCommand?command=WatchNow&context=SAGETV_PROCESS_LOCAL_UI&FileName=\\mediaserver\media2\Sage-Video\Alias-Reunion-2573896-0.avi"
--15:30:58--  http://xxxxx:*password*@mediaserver:801/sage/MediaFileCommand?command=WatchNow&context=SAGETV_PROCESS_LOCAL_UI&FileName=%5C%5Cmediaserver%5Cmedia2%5CSage-Video%5CAlias-Reunion-2573896-0.avi
           => `MediaFileCommand@command=WatchNow&context=SAGETV_PROCESS_LOCAL_UI&FileName=%5C%5Cmediaserver%5Cmedia2%5CSage-Video%5CAlias-Reunion-2573896-0.avi.2'
Resolving mediaserver... 192.168.0.50
Connecting to mediaserver|192.168.0.50|:801... connected.
HTTP request sent, awaiting response... 200 Ok
Length: unspecified [text/html]

    [ <=>                                 ] 1,372         --.--K/s

15:30:59 (11.95 MB/s) - `MediaFileCommand@command=WatchNow&context=SAGETV_PROCESS_LOCAL_UI&FileName=%5C%5Cmediaserver%5Cmedia2%5CSageVideo%5CAlias-Reunion-2573896-0.avi.2' saved [1372]
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki

Last edited by nielm; 01-15-2007 at 08:36 AM.
Reply With Quote
  #17  
Old 01-15-2007, 11:46 AM
UFGrayMatter's Avatar
UFGrayMatter UFGrayMatter is offline
Sage Advanced User
 
Join Date: Aug 2006
Posts: 185
awesome - that version worked for me. I guess the one i had wasn't up to the task!

Thanks,
Ryan
Reply With Quote
  #18  
Old 01-15-2007, 06:07 PM
UFGrayMatter's Avatar
UFGrayMatter UFGrayMatter is offline
Sage Advanced User
 
Join Date: Aug 2006
Posts: 185
ok - so quick question - wget creates little 4kb files every time I run this setup. Is there a way to not create the files?

Thanks,
Ryan

found --delete-after
Reply With Quote
  #19  
Old 07-06-2007, 08:04 PM
UFGrayMatter's Avatar
UFGrayMatter UFGrayMatter is offline
Sage Advanced User
 
Join Date: Aug 2006
Posts: 185
Are others having any problems with this now? I don't remember when but now when I try this method - Sage just goes to the home menu instead of launching a file...
Reply With Quote
  #20  
Old 09-20-2007, 08:36 AM
CollinR CollinR is offline
Sage Icon
 
Join Date: Dec 2004
Location: Tulsa, OK
Posts: 1,305
This works awesome for me.


I actually now can use my RF remote to control my MVP in the master bedroom! Love it!!!


Can someone post the syntax of the "--delete-after" that seems to bork my commands.
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


All times are GMT -6. The time now is 02:29 AM.


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