SageTV Community  

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

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-21-2010, 05:55 PM
dvd_maniac's Avatar
dvd_maniac dvd_maniac is offline
Sage Icon
 
Join Date: Mar 2004
Location: New England
Posts: 1,899
command line to force imported video scan?

I was looking for a way to automate some tasks and created a batch/sqlcmd script that will encode newly created/downloaded videos using Staxrip then clean up temp files and finally move them into an imported directory.
I want to be able to send a command to Sage to scan the imported video directory right after the move. Is there a command line to accomplish this.
__________________
If this doesn't work right, Then:
"I'm going to blow up the Earth!"
Reply With Quote
  #2  
Old 09-22-2010, 05:20 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Not that I'm aware of. It sounds like SJQ could do everything you need.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #3  
Old 09-22-2010, 06:25 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
If you have sagex-services installed (part of sagex-api, probably installed if you have bmt web ui installed), then you can issue any sage command via url.

Code:
http://192.168.1.10:8080/sagex/api?c=RunLibraryImportScan&1=false
So, if you have some commandline web downloader installed, like wget, you could simply add something like this to your script...

Code:
wget http://192.168.1.10:8080/sagex/api?c=RunLibraryImportScan&1=false
Which will trigger sage to scan for new media.

BTW, you can test if you have the sagex-services installed by issuing the following url...
wget http://192.168.1.10:8080/sagex/api
from a browser. It should return a help page explaining the usage and provide a simple api search tool as well.

If you know some java, you can could do the same, except in java code by using the sagex-apis, which allow for remote communiction with the sagetv server.
Reply With Quote
  #4  
Old 01-06-2011, 03:25 PM
dvd_maniac's Avatar
dvd_maniac dvd_maniac is offline
Sage Icon
 
Join Date: Mar 2004
Location: New England
Posts: 1,899
Stuckless,

I am usinig the followinig method with Sagex installed and it works fine directly in IE
http://192.168.1.3:8080/sagex/api?c=...rtScan&1=false

But I am trying to put this into a batch file. When the batch file runs it passes the web address but not the parameter
http://192.168.1.3:8080/sagex/api?c=...raryImportScan

Any ideas?
__________________
If this doesn't work right, Then:
"I'm going to blow up the Earth!"
Reply With Quote
  #5  
Old 01-06-2011, 03:35 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
I believe you have to use wget in the batchfile as Stuckless posted above.


This is what I use... I have the webserver installed.

C:\wget\wget.exe --delete-after --tries=3 --directory-prefix="C:\wget" "http://USER:PASSWORD@SERVERNAME:8080/sage/GlobalCommand?command=UpdateMediaLibrary"
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #6  
Old 01-07-2011, 11:02 PM
dvd_maniac's Avatar
dvd_maniac dvd_maniac is offline
Sage Icon
 
Join Date: Mar 2004
Location: New England
Posts: 1,899
Worked perfectly. Thanx nyplayer
__________________
If this doesn't work right, Then:
"I'm going to blow up the Earth!"
Reply With Quote
  #7  
Old 03-05-2011, 10:32 AM
dvd_maniac's Avatar
dvd_maniac dvd_maniac is offline
Sage Icon
 
Join Date: Mar 2004
Location: New England
Posts: 1,899
I am using the following Command in my batch file and it is not working anymore.
"http://192.168.1.3:8080/sagex/api?c=RunLibraryImportScan&1=false"

Something got updated and now it requires a username and password to complete. I have looked through the plugin details and found the default usernae(sage) and password(frey)... How do I add them into the API call so that my Batch File will work again?
__________________
If this doesn't work right, Then:
"I'm going to blow up the Earth!"
Reply With Quote
  #8  
Old 03-05-2011, 11:16 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Code:
"http://sage:frey@192.168.1.3:8080/sagex/api?c=RunLibraryImportScan&1=false"
Reply With Quote
  #9  
Old 03-05-2011, 06:59 PM
dvd_maniac's Avatar
dvd_maniac dvd_maniac is offline
Sage Icon
 
Join Date: Mar 2004
Location: New England
Posts: 1,899
I thought I tried that but I must have mispelled something and got too upset to realize my stupid mistake.
Thanx again nyplayer
__________________
If this doesn't work right, Then:
"I'm going to blow up the Earth!"
Reply With Quote
  #10  
Old 04-03-2011, 05:36 PM
dvd_maniac's Avatar
dvd_maniac dvd_maniac is offline
Sage Icon
 
Join Date: Mar 2004
Location: New England
Posts: 1,899
I just updated the API plugin and it is not working anymore again...
What keeps changing?
__________________
If this doesn't work right, Then:
"I'm going to blow up the Earth!"
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
4.1.0 command line? aflat Batch Metadata Tools 1 06-25-2010 06:48 PM
Can't Get Rid Of A Horizontal Scan Line On Top squeed SageTV Software 8 07-18-2008 11:49 AM
Force imported video to appear as a DVD in media center? LehighBri SageTV Software 2 04-09-2008 08:57 AM
Launch from Command line zakrzep SageTV Placeshifter 2 03-18-2007 01:08 PM
Force EPG update from command line doc SageTV EPG Service 8 12-20-2006 02:48 PM


All times are GMT -6. The time now is 08:10 PM.


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