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
  #21  
Old 09-20-2007, 10:54 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Here is a sample

c:\wget\wget.exe --tries=2 --delete-after "http://server:8080/sage/SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Stop"
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #22  
Old 10-08-2008, 06:11 AM
n9cqs n9cqs is offline
Sage User
 
Join Date: Apr 2007
Posts: 69
related "command line" question

Neilm,
Thank you for your great Web interface. I use it ALL the time!

I have a question related this thread... I'm trying to send a command to delete a file, and using this format:

wget http://user:password@url:8080/sage/M...ame=myfile.mpg

It returns "Invalid command passed"

What am I doing wrong?

Thanks
Jeff
Reply With Quote
  #23  
Old 10-08-2008, 06:22 AM
CollinR CollinR is offline
Sage Icon
 
Join Date: Dec 2004
Location: Tulsa, OK
Posts: 1,305
Quote:
Originally Posted by n9cqs View Post
Neilm,
Thank you for your great Web interface. I use it ALL the time!

I have a question related this thread... I'm trying to send a command to delete a file, and using this format:

wget http://user:password@url:8080/sage/M...ame=myfile.mpg

It returns "Invalid command passed"

What am I doing wrong?

Thanks
Jeff
I think you either need either the MediaFileID or the full path.

Code:
http://user:password@url:8080/sage/MediaFileCommand?command=Delete&context=SAGETV_PROCESS_LOCAL_UI&Filename=E:\TV\Recordings\EverybodyHatesChris-EverybodyHatesLiar-1102124-0.mpg
Reply With Quote
  #24  
Old 10-08-2008, 05:56 PM
n9cqs n9cqs is offline
Sage User
 
Join Date: Apr 2007
Posts: 69
Hi.
Thanks for the reply.

I did figure out that the "Delete" command should actually be "DeleteFile" but now it is simply telling me that it has applied it to 0 files in the output. Here is the code presently:

Code:
wget --output-document=test.htm http://username:password@192.168.8.120:8080/sage/MediaFileCommand?command=DeleteFile&context=SAGETV_PROCESS_LOCAL_UI&Filename=E:\Journal-5548794-0.mpg
"E:\" is the full path to the file... I keep videos on one complete disk separate from drive "C".

--output-document=test.htm is to keep the output filename from being really long.

Any ideas?
Reply With Quote
  #25  
Old 10-08-2008, 06:07 PM
CollinR CollinR is offline
Sage Icon
 
Join Date: Dec 2004
Location: Tulsa, OK
Posts: 1,305
Try FileName instead of Filename, otherwise I think it should work.
Reply With Quote
  #26  
Old 10-08-2008, 07:04 PM
n9cqs n9cqs is offline
Sage User
 
Join Date: Apr 2007
Posts: 69
Yes! That did it!

All except... now it says that Delete needs to be confirmed...

Any way around THAT?
Reply With Quote
  #27  
Old 10-08-2008, 07:18 PM
n9cqs n9cqs is offline
Sage User
 
Join Date: Apr 2007
Posts: 69
CollinR,

*NEVER MIND*
I just found it... I have to add "confirm=yes"

It worked great!

Thank you SO MUCH.

What I am doing is writing a script that will detect certain shows and copy them to specific hard drive locations. The process I've found that works (manually) is

1. Copy the show file from the drive where it recorded to the destination drive
2. Delete the show file (using Sage UI... or Neilm's web interface)
3. Refresh media files (via Neilm's web interface)

I found the way to do the refresh using wget right off. Now that I can delete, I can write a program that will work with the "Dragon Global" "DirMon2" to detect when new shows appear and move them automatically.

Thanks again!
Jeff
Reply With Quote
  #28  
Old 10-08-2008, 08:01 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
If you are java programmer (or if you are willing to learn), then I just released a sage api that allows you full access to the sage api from an external java process. In order words, you could write a java command line utility that uses the sage api, as if it were embedded within sage. If you are not a java programmer, then nevermind
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:30 AM.


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