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
  #41  
Old 04-30-2015, 08:54 AM
davidb's Avatar
davidb davidb is offline
Sage Advanced User
 
Join Date: Feb 2009
Posts: 134
Set Watched time for DVDs and properties file question

Question 1:
I am trying to do just what you asked to start watching on Sage, and continue on IOS(Ipad or Iphone), and restart on Sage and keep the watched time.

I have this working on TV shows that have been recorded, but it is not working on DVDs. I can get the watched spot in milliseconds into the movie, but all attempts to SetWatchedTimes like I use, that works properly on a TV Show, does not set the time on the DVDs, it jumps off the end and sets it as watched. It may be moving the watched spot, but I have not been able to come up with parameters for DVDs that will actually set the watched spot at a certain point in a DVD.
Has anyone used this, or possibly have any code snippets that work to set the watched time on a DVD to a certain spot??

// Use these two object instances
Object mediafile = MediaFileAPI.GetMediaFileForID(IDOfShowOrDVDHere);
Object airing = MediaFileAPI.GetMediaFileAiring(mediafile);

Here is how I currently get the information for a TV showWorking)

long whereToRestartAtHowManyMS = whereToRestart - AiringAPI.GetAiringStartTime(Airing); //works on tv

long whereToRestartAtHowManySeconds = whereToRestartAtHowManyMS / 1000;
long RealStartTime = AiringAPI.GetRealWatchedStartTime(Airing); //works on TV

Here is how I currently set the information for a TV showWorking)

// to set an Absolute Time in seconds into the TV show
AiringAPI.SetWatchedTimes(Airing, AiringAPI.GetAiringStartTime(Airing)+(AbsoluteTimeinSeconds*1000), RealStartTime);

//Here is how I currently set the information for a TV Show To bump up by //xx seconds into the TV show from the watched spot

AiringAPI.SetWatchedTimes(Airing, AiringAPI.GetAiringStartTime(Airing)+(whereToRestartAtHowManySeconds * 1000)+BumpUpTimeinSeconds*1000, RealStartTime); //tv shows works

NOTE: The following IS different than the TV Show, as the watched information comes back very differently from the same API calls:

Here is how I currently get the information for a DVD: (Working)
long whereToRestartD = AiringAPI.GetWatchedEndTime(Airing);
long whereToRestartDAtHowManyMS = AiringAPI.GetWatchedEndTime(Airing);
long whereToRestartDAtHowManySeconds = whereToRestartD / 1000;
Here is how I tried to set the information for a DVD: (NOT working)
for Absolute set to position:
AiringAPI.SetWatchedTimes(Airing, AiringAPI.GetAiringStartTime(Airing)+(AbsoluteTimeinSeconds*1000), RealStartTime);

for Bump up by xx seconds:
AiringAPI.SetWatchedTimes(Airing, AiringAPI.GetAiringStartTime(Airing)+AiringAPI.GetWatchedDuration(Airing)+BumpUpTimeinSeconds*1000, AiringAPI.GetAiringStartTime(Airing));

The following works to determine If it is a TVShow
if (MediaFileAPI.IsTVFile(Airing) == true)

The following works to determine IF it is a DVD
if (MediaFileAPI.IsDVD(Airing) == true)
------------------------------------------------------------------------------
Question 2:
I couldn't find anything in the API to get the length of a DVD. But I did find it stored in the properties file, in RunningTime.
Do all Sage7 installs use the .properties file for media, or is this only available on some? Can I assume there will be a .properties file for each recording and DVD?

Thanks for any help.

Quote:
Originally Posted by Slugger View Post
For #2, I'm pretty sure you can already read and write the watched times of an airing:

http://download.sage.tv/api/sage/api/AiringAPI.html

Have a look at GetWatchedDuration, GetWatchedEndTime, GetWatchedStartTime, and SetWatchedTimes.

Based on those api calls, it should already be possible for another source (i.e. Plex) to read and write this data back to Sage. In theory, Plex could read this data to implement the "start watching on Sage in the living room and finish watching on your tablet from where you left off". And vice versa: Watch a recording in Plex and Plex reports back to Sage what you watched; Sage then picks up where you left off. From what I've read about the Plex plugin here in the past is that the hard part is getting Plex to talk to Sage's API -- just not all that easy, which is why the Plex plugin never even managed to sync watched status, much less this kind of data. But it doesn't seem to be Sage preventing this kind of thing from happening.

Last edited by davidb; 04-30-2015 at 08:57 AM.
Reply With Quote
  #42  
Old 04-30-2015, 09:22 AM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,186
I'm pretty sure that stuff doesn't work on DVDs. DVDs don't have a "length" since there are menus that loop, different titles, etc, they're effectively of infinite/variable length.
Reply With Quote
  #43  
Old 04-30-2015, 11:05 AM
LWM4P LWM4P is offline
Sage User
 
Join Date: Jun 2008
Location: Denver, CO
Posts: 62
After just general updating of the application... my vote is the following:

- Touchscreen interface. I can install sage on a windows tablet, but no touchscreen. I guess any mobile client would be ok here...
- Lots of work needs to be done on the music interface. We use sage on the main TV for viewing, but we also have a tablet mounted in the kitchen. In the kitchen, we do watch some TV (or bring up recipes etc..), but we mostly play music! This same tablet is connected to the speakers on the back porch too. This could include music streaming services, but also just general updating of usability in the UI.
- There was a cool program a while back called TASageTV. That was pretty cool, but always a little finicky, so I stopped using it. I would love for the mobile client to have the ability to change the music on my tablet in the kitchen, while I am sitting outside having a beer (since the kitchen tablet drives the outdoor speakers).
Reply With Quote
  #44  
Old 04-30-2015, 02:40 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by LWM4P View Post
After just general updating of the application... my vote is the following:

- Touchscreen interface. I can install sage on a windows tablet, but no touchscreen. I guess any mobile client would be ok here...
- Lots of work needs to be done on the music interface. We use sage on the main TV for viewing, but we also have a tablet mounted in the kitchen. In the kitchen, we do watch some TV (or bring up recipes etc..), but we mostly play music! This same tablet is connected to the speakers on the back porch too. This could include music streaming services, but also just general updating of usability in the UI.
- There was a cool program a while back called TASageTV. That was pretty cool, but always a little finicky, so I stopped using it. I would love for the mobile client to have the ability to change the music on my tablet in the kitchen, while I am sitting outside having a beer (since the kitchen tablet drives the outdoor speakers).
None of these things in any way are affected by SageTV being open source. That is all in the realm of what has been possible since SageTV v4.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #45  
Old 04-30-2015, 08:55 PM
LWM4P LWM4P is offline
Sage User
 
Join Date: Jun 2008
Location: Denver, CO
Posts: 62
Quote:
Originally Posted by Fuzzy View Post
None of these things in any way are affected by SageTV being open source. That is all in the realm of what has been possible since SageTV v4.
That is great man... sounds like the problem is execution. Who cares if it was possible, someone has to make it happen. I thought that was the point of this thread... and I am totally on board! I am trying to get some ideas going on what is next
Reply With Quote
  #46  
Old 05-01-2015, 05:40 AM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,186
Not to be too pedantic, but there's really only one "Day One" feature that's needed possible, and that's installers with the licensing code removed. Hopefully that's what Jeff will give us but either way, those are blocking problems, without which there's nothing to build on.

After that, Day 2, etc development and new features can start. It's not like people have been working on this from behind the scenes to where at launch there will be completed features to use.
Reply With Quote
  #47  
Old 05-01-2015, 06:10 AM
mrsupport mrsupport is offline
Sage User
 
Join Date: Dec 2008
Location: northeastern Ohio
Posts: 12
Quote:
Originally Posted by stanger89 View Post
Not to be too pedantic, but there's really only one "Day One" feature that's needed possible, and that's installers with the licensing code removed. Hopefully that's what Jeff will give us but either way, those are blocking problems, without which there's nothing to build on.

After that, Day 2, etc development and new features can start. It's not like people have been working on this from behind the scenes to where at launch there will be completed features to use.
+1
__________________
Marty
Reply With Quote
  #48  
Old 05-01-2015, 06:19 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
I wonder if Jeff will open source the server side code that runs the plugin manager. There's been lots of talk about when/if the EPG data ends but nothing about the plugin manager. I know we can edit the plugin file but losing the plugin manager would be bummer.

I'd also like the ability to use multiple plugin repositories instead of one.
__________________

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
  #49  
Old 05-01-2015, 12:03 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
all the plugin manager really needs is a web presence it seems. As far as I can tell, the entire 'plugin service' is a single XML file hosted on an HTTP server.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #50  
Old 05-01-2015, 02:27 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by Fuzzy View Post
all the plugin manager really needs is a web presence it seems. As far as I can tell, the entire 'plugin service' is a single XML file hosted on an HTTP server.
The trick is figuring out what's in that XML file

The plugin manager does several things including:
  1. Verifies manifests and does some basic sanity checking before accepting them.
  2. Makes sure only the owner of a plugin updates it.
  3. Merges the plugin manifest into the plugins XML file. (Removing the old manifest too in the case of an updated plugin.)
  4. Serves up the plugin XML file every time somebody navigates to the plugin manager menu.

It probably does other things as well I can't think of off the top of my head. None of this is rocket science and it all can be reproduced, but what a waste of time. It would be a lot easier if the code was released.
__________________

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
  #51  
Old 05-01-2015, 06:19 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Right, that's all basic database management tasks, and relatively simple. You can see what's in the XML file if you're intersted, it's in your SageTV folder, called SageTVPlugins.xml
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #52  
Old 05-02-2015, 05:59 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by Fuzzy View Post
Right, that's all basic database management tasks, and relatively simple. You can see what's in the XML file if you're intersted, it's in your SageTV folder, called SageTVPlugins.xml
I know exactly what's in there I'm talking about the code that gets it in there.
__________________

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
  #53  
Old 05-30-2015, 12:52 PM
sdsean's Avatar
sdsean sdsean is offline
Sage Expert
 
Join Date: Jul 2008
Posts: 566
Man just logged on to check in, and found out about this news. . . so stoked!

Any way for me there is lots of stuff I want, but the very 1st thing IMHO that should be done is get a build working for 64Bit JVMs (even if it is Java 7), so that we can have a larger memory heap.

So simple. . and will solve / remove quite a few headaches :P
__________________
AMD Ryzen 9 3900XT 12 Core+HT, 64GB DDR5, GeForce 1060, MSI Prestige x570 Creation Mobo, SIIG 4 port Serial PCIe Card, Win10, 1TB M.2 SSD OS HDD, 1 URay HDMI Network Encoder, 3 HD-PVR, 4 DirecTV STB serial tuned


Reply With Quote
  #54  
Old 05-30-2015, 07:27 PM
Pumpkinhead's Avatar
Pumpkinhead Pumpkinhead is offline
Sage User
 
Join Date: Nov 2004
Location: Illinois
Posts: 71
Well, the same one feature I've been wanting for several years, it would be great if it makes it to Open SageTV.

Removing the "junk" from the regular Program Guide:

http://forums.sagetv.com/forums/showthread.php?t=21651

And of course, the free EPG service.
Reply With Quote
  #55  
Old 05-30-2015, 11:57 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by sdsean View Post
Man just logged on to check in, and found out about this news. . . so stoked!

Any way for me there is lots of stuff I want, but the very 1st thing IMHO that should be done is get a build working for 64Bit JVMs (even if it is Java 7), so that we can have a larger memory heap.

So simple. . and will solve / remove quite a few headaches :P
It's discussed, but it's not as simple switch. It will likely break most native code that calls to 32 bit libraries, like directshow payback, and internal tuners. Google Fiber, instead of going to 64 bit, breaks each client instance into its own 32 bit JVM, which I'd likely what we'd do here.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #56  
Old 05-31-2015, 12:00 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by Pumpkinhead View Post
Well, the same one feature I've been wanting for several years, it would be great if it makes it to Open SageTV.

Removing the "junk" from the regular Program Guide:

http://forums.sagetv.com/forums/showthread.php?t=21651

And of course, the free EPG service.
nothing about sage going open source will affect UI changes any differently. That feature could be made just as easily right now, without sage every going open source, just no one has taken the time to do it.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #57  
Old 07-02-2015, 08:18 AM
bigbill's Avatar
bigbill bigbill is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, California
Posts: 439
Thumbs up Support for the MP4 Encoding from new HDhomerun

It would be great if their new encoding could be recorded by SageTV!! The 6-7 Gigs per hour are getting very old.
__________________
Home DVR: SageTV v9.2.2(64)
Dell T-40, 24GB RAM, Win10 Pro, 2 x 6TB WD Blue, QNAP TR004. 1 Quad HDHR, (OTA Winegard HD8200U, CM4221HD), 1 @ STP-HD200's, 1 @ HD300, 1 @ Nvidia Shield , 1 @ Nvidia Shield new round, 70", 55" & 40" Sony's

RV DVR: SageTV v9.2.2, NUC8i5BEK 16GB, SS980Pro NVMe, Mibox, 2 Dual HDHR 5TB Passport, Winegard BatWing, 40", 32", 28" Sony's, Max Transit
Reply With Quote
  #58  
Old 07-02-2015, 08:22 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,217
Quote:
Originally Posted by Fuzzy View Post
Google Fiber, instead of going to 64 bit, breaks each client instance into its own 32 bit JVM, which I'd likely what we'd do here.
If that happens then how much memory would you want to have if you wanted to run 8 extenders. Would you want 8GB just for JVMs (8X1GB) or would you be able to get by with something like 512MB for each JVM as it only needs to support one extender?
__________________
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
  #59  
Old 07-02-2015, 06:19 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by wayner View Post
If that happens then how much memory would you want to have if you wanted to run 8 extenders. Would you want 8GB just for JVMs (8X1GB) or would you be able to get by with something like 512MB for each JVM as it only needs to support one extender?
The footprint of each extender host instance would have the same duties and responsibilities as an instance of SageTVClient. My main use client, with gemstone and many other features, and about 8 weeks of uptime right now, is using 701MB of JVM. I see no reason not to set 1GB for each of the JVM's, if chunks aren't used, windows will swap them out to disk anyway. If you aren't using all the extenders at the same time, then the unused instances will be swapped out. In any case, RAM is ridiculously cheap these days, and I haven't built a machine with <12GB in a very long time.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #60  
Old 07-02-2015, 07:40 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,217
Ok, I will plan on 16 GB for my next generation Sage server.
__________________
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
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
3 features Deacon Crusher SageTV Software 4 03-16-2007 04:56 PM
V6 New Features? joe123 SageTV Software 10 01-03-2007 09:51 PM
PVR-500 Features polarhyte Hardware Support 6 07-23-2006 11:57 PM
New STV features in v3 RC2 Opus4 SageTV Beta Test Software 24 10-25-2005 02:14 AM
REQ: A few (three) features kberg31974 SageTV Software 6 06-03-2003 04:14 PM


All times are GMT -6. The time now is 07:59 AM.


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