SageTV Community  

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

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 05-01-2015, 08:34 AM
davidb's Avatar
davidb davidb is offline
Sage Advanced User
 
Join Date: Feb 2009
Posts: 129
SetWatchTimers 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??

Note: Yes I know many DVDs contain a menu and can contain multiple movie titles, and so the length is ambiguous,
but for both of these question, we have a DVD containing only a single main movie, not alternates titles, or menus and no trailers. Sage works properly with this now, and is able to keep the watch spot and the movie length information for the DVD.
I am able to stop watching a DVD and resume later and continue watching at the same spot. This is the functionality, that I am trying to achieve.

// 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 DVD 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.
Reply With Quote
  #2  
Old 05-02-2015, 08:46 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
If you only care about a single video in a DVD, just put it into a single video file. Everything is handled better that way.
__________________
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
  #3  
Old 05-03-2015, 11:40 AM
davidb's Avatar
davidb davidb is offline
Sage Advanced User
 
Join Date: Feb 2009
Posts: 129
That is what I said I did. The dvd is one file.
In Sage it starts at the beginning, and if you stop, it will restart at the last watched to spot.

This is what I am trying to accomplish with the SetWatchTimes function.

Getting the watched time works very differently on a DVD setting, than on a TV Show recording. The values are different. I suspect, I just need to give different values to the SetWatchTimes function also, but trial and error, I have already tried all the combinations that I can think of.

Please, has anyone done this?

Thanks
Reply With Quote
  #4  
Old 05-04-2015, 01:12 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
My point was to not use a DVD format. Remux the file into an .mpg or .mkv container. Sage handles DVD's differently, and if they are showing as 'true' for the IsDVD function, than they are DVD's, and not Videos.
__________________
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
  #5  
Old 05-04-2015, 05:47 AM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,186
Quote:
Originally Posted by davidb View Post
That is what I said I did. The dvd is one file.
In Sage it starts at the beginning, and if you stop, it will restart at the last watched to spot.

This is what I am trying to accomplish with the SetWatchTimes function.

Getting the watched time works very differently on a DVD setting, than on a TV Show recording. The values are different. I suspect, I just need to give different values to the SetWatchTimes function also, but trial and error, I have already tried all the combinations that I can think of.

Please, has anyone done this?

Thanks
I thought I replied somewhere else, but I'm pretty sure this doesn't work with DVDs. DVDs don't have a fixed length or position, they're containers that hold many video streams (titles) which can be configured for looping or varied playlists, so there's no way to know what "3600 seconds" means.
Reply With Quote
Reply

Tags
airing, properties, setwatchtimers


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
Properties file heffneil SageTV Software 9 02-15-2012 08:07 PM
properties file question dvd_maniac SageTV Software 2 12-10-2004 11:34 PM
Properties file RRR SageTV Software 10 08-24-2004 10:37 AM
Wiz.bin and properties file question Crowdx42 SageTV Beta Test Software 3 04-15-2004 11:38 PM
Question about Quality settings in properties file justme SageTV Software 0 06-05-2003 02:19 AM


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


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