SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-30-2018, 03:43 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 6,576
Is there a way to send multiple commands to the Sage Remote Web UI?

Let's say I wanted to send the command SkipFwd2 ten times to Sage via the web UI via something like "https://myserver/sage/SageCommand?context=010203040506&command=Skip%20Fwd%20%232&repeat=10"

Is there an easy way to do this or would you have to loop through the command ten times.

Or to accomplish the same objective, is there an easy way to get Sage to skip ahead 900 seconds in the current file being played? This would be great for zipping through halftime or intermissions?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #2  
Old 01-30-2018, 03:54 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,540
Quote:
Originally Posted by wayner View Post
Let's say I wanted to send the command SkipFwd2 ten times to Sage via the web UI via something like "https://myserver/sage/SageCommand?context=010203040506&command=Skip%20Fwd%20%232&repeat=10"

Is there an easy way to do this or would you have to loop through the command ten times.

Or to accomplish the same objective, is there an easy way to get Sage to skip ahead 900 seconds in the current file being played? This would be great for zipping through halftime or intermissions?
I don't think there is an API to do it.. but you can reconfigure the SkipForward2 amount (not sure how, but likely a property).

So, you could do something like, save the current value, reconfigure it to 900, then issue the skip forward command, and then reconfigure it back to the original value. Give that you are likely the only person issuing this skip900 command, it should be reasonably safe. And if you didn't want to do it using multiple http calls, you could create it as a sagex service in javascript and then call the service over http.

See the section on custom services.
https://github.com/stuckless/sagetv-...sing-sagex-api
Reply With Quote
  #3  
Old 01-30-2018, 04:03 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 6,576
Thanks Sean - I was thinking that was an option. Or how about issue the seek command: MediaFileAPI.Seek(MediaFileAPI.GetMediaTime+900000) as 900000ms = 900s

Ideally I would issue this command on my Control4 remote which can issue IP commands so I can modify the driver to send this custom command when I hit something like the + key on the remote.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #4  
Old 01-30-2018, 04:07 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,540
Quote:
Originally Posted by wayner View Post
Thanks Sean - I was thinking that was an option. Or how about issue the seek command: MediaFileAPI.Seek(MediaFileAPI.GetMediaTime+900000) as 900000ms = 900s

Ideally I would issue this command on my Control4 remote which can issue IP commands so I can modify the driver to send this custom command when I hit something like the + key on the remote.
In looking at the sagetv tv api, it seems like it would be rather trivial to add a SkipForward(ms) api, since al the SkipForward and SkipBackword apis all drill down through the same code just passing different +/- values.
Reply With Quote
Reply


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

Advanced Search
Display Modes

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
Linking cable remote buttons to Sage commands bradlewa Hardware Support 24 02-03-2011 10:35 PM
Help Pls! I need to send multiple commands to satellite box steven017 Hardware Support 7 01-18-2008 02:19 AM
ui remote lines in sage.properties have multiple values snoopy SageTV Software 7 05-29-2006 06:43 AM
Getting Girder to send commands to SageTV always mattsm General Discussion 4 08-30-2005 06:07 PM
Multiple Sendmessage commands and 2.0b15 malore SageTV Beta Test Software 0 04-01-2004 11:26 AM


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


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