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
  #281  
Old 07-23-2011, 04:25 PM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Hello, I could use a little help.
I've not been using this much, just being 'admin' till lately, but I'm trying to give it a go and finding that as a secondary user I'm just seeing the lock icon for shows and the watched indicator isn't updating. Brief description of the problem I know, but not sure what's useful info in this case.... Any suggestions on waz up?
Reply With Quote
  #282  
Old 07-24-2011, 08:30 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by bikesquid View Post
Hello, I could use a little help.
I've not been using this much, just being 'admin' till lately, but I'm trying to give it a go and finding that as a secondary user I'm just seeing the lock icon for shows and the watched indicator isn't updating. Brief description of the problem I know, but not sure what's useful info in this case.... Any suggestions on waz up?
I'm not sure what you are describing. What do you mean by "lock icon"?

If the primary user watches a show the watched indicator for all logged on secondary users should also be updated. Is this not happening?
__________________

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
  #283  
Old 07-25-2011, 09:09 AM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Thumbs down

Quote:
Originally Posted by tmiranda View Post
I'm not sure what you are describing. What do you mean by "lock icon"?
I'm using Diamond theme... just in case that matters, when logged in as a secondary user, there's a little padlock icon next to the show title. See attached.[/quote]

Quote:
Originally Posted by tmiranda View Post
If the primary user watches a show the watched indicator for all logged on secondary users should also be updated. Is this not happening?
If I'm primary user, watched indicator does work once a show has been watched and shows that indicator for ALL users....
Attached Images
File Type: png lock.png (588.5 KB, 154 views)
Reply With Quote
  #284  
Old 07-25-2011, 09:20 AM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,389
That Lock Icon is the Archived indicator if I recall correctly.
Been awhile since I changed the MarkerA.png in my Themes folder back to the old "A" icon
Reply With Quote
  #285  
Old 07-25-2011, 10:13 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by bikesquid View Post
I'm using Diamond theme... just in case that matters, when logged in as a secondary user, there's a little padlock icon next to the show title. See attached.
If I'm primary user, watched indicator does work once a show has been watched and shows that indicator for ALL users....[/QUOTE]

I've never tried it with Diamond so it could be a number of things.

If I understand you correctly the watched indicator is doing what it's supposed to do. The purpose of having secondary users logged in is to mirror the actions of the primary user. So if the primary users watches something, it's as if the secondary users watched it as well. Let me know if I'm misunderstanding you.
__________________

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
  #286  
Old 07-25-2011, 10:24 AM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Quote:
Originally Posted by tmiranda View Post
So if the primary users watches something, it's as if the secondary users watched it as well. Let me know if I'm misunderstanding you.
Agreed, but if a secondary user watches something shouldn't the watched indicator for that user be updated to reflect it's watched status or am I missing the whole point of the plugin?
Reply With Quote
  #287  
Old 07-25-2011, 01:48 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by bikesquid View Post
Agreed, but if a secondary user watches something shouldn't the watched indicator for that user be updated to reflect it's watched status or am I missing the whole point of the plugin?
What do you mean "if a secondary user watches"? If the primary user logs out, and a secondary user logs in (making them the primary user) then the status will be updated.

If you have three users Daddy, Mama, and Kiddo and Daddy is logged in with Mama and Kiddo as secondary users, whatever Daddy does will be reflected for Mama and Kiddo. If Mama wanders over and presses play (which is my interpretation of a secondary user watching something) while Daddy is still logged in then Mama is still a secondary user.

Maybe I'm still not understanding you.
__________________

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
  #288  
Old 07-25-2011, 02:40 PM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Quote:
Originally Posted by tmiranda View Post
What do you mean "if a secondary user watches"?

Maybe I'm still not understanding you.
If I (bigdaddy) log in, watch something, when I look at the recordings list, it's not indicating I've watched it... If I'm logged in as Admin and watch something, it reflects that it's been watched for ALL users....

It occurs to me that maybe I've set up users wrong? I'll take a look, with the way you describe primary and secondary working and see what I set up..... I assumed a user, primary or secondary, would be updating it's own watched list.....
Reply With Quote
  #289  
Old 07-25-2011, 02:48 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Quote:
Originally Posted by bikesquid View Post
If I (bigdaddy) log in, watch something, when I look at the recordings list, it's not indicating I've watched it... If I'm logged in as Admin and watch something, it reflects that it's been watched for ALL users....

It occurs to me that maybe I've set up users wrong? I'll take a look, with the way you describe primary and secondary working and see what I set up..... I assumed a user, primary or secondary, would be updating it's own watched list.....
Whatever user is logged in to the system is the primary user. The secondary users feature is just useful when you have the family sitting and watching the same thing. So if you delete a show after you watch it, it will delete the show for the primary user and anyone else that is logged in as a secondary user.

If the primary user watches a show, it should be marked as watched. Keep in mind, with this plugin, the watched marker isn't called unless the entire recording is watched while I think the default SageTV behavior is like if there is less than 5 minutes left of the recording, mark as watched. Have you tried clicking mark watched on your remote to see if the file gets marked as watched? When the recording doesn't show up as watched, do you see the watched duration marker almost near the end or is it not there at all?
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII),
Clients - 2 x HD-300, 3 x MediaMVP
Reply With Quote
  #290  
Old 07-25-2011, 03:41 PM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Quote:
Originally Posted by jpaddock3000 View Post
Keep in mind, with this plugin, the watched marker isn't called unless the entire recording is watched while I think the default SageTV behavior is like if there is less than 5 minutes left of the recording, mark as watched.
Well there's my problem.... I'm not letting the credits spool till the bitter end... I assumed the 5 minute rule.... Just tested it and if I set it as watched manually or let it grind on forever then the watched indicator does in fact show the right status.

Any way for me to change that behavior? Unless I fall asleep I rarely hang on past the last scene of the show. The five minute rule is groovy man!
Reply With Quote
  #291  
Old 07-25-2011, 05:01 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Quote:
Originally Posted by bikesquid View Post
Any way for me to change that behavior? Unless I fall asleep I rarely hang on past the last scene of the show. The five minute rule is groovy man!
A good saying is that anything is possible with code, but ultimately, the decision comes from Tom if he wants to put in that check. Seems like he would need to be able to query the length of the file, subtract 5 minutes or user defined value, and then have the mark watched function be called if the watched duration exceeded that value.

Tom,
Your thoughts?
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII),
Clients - 2 x HD-300, 3 x MediaMVP
Reply With Quote
  #292  
Old 07-26-2011, 06:08 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by jpaddock3000 View Post
A good saying is that anything is possible with code, but ultimately, the decision comes from Tom if he wants to put in that check. Seems like he would need to be able to query the length of the file, subtract 5 minutes or user defined value, and then have the mark watched function be called if the watched duration exceeded that value.

Tom,
Your thoughts?
I actually had that on my "nice to have" list because I also like the "5 minute rule" (but I think it's more like 1 or two minutes). I'm pretty wrapped up in the Boxee think right now so tis will not get addressed right away.

You are always welcome to install Eclipse or Netbeans, download the code and make changes as you wish If you look in the event handler for "PlaybackStopped | PlaybackFinished" you will see where I check for PlaybackFinished before setting the watched indicator. The change that needs to be made is to check if it's a PlaybackStopped event and the watched time is within x seconds of the end.
__________________

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
  #293  
Old 08-02-2011, 02:26 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Quote:
Originally Posted by tmiranda View Post
I actually had that on my "nice to have" list because I also like the "5 minute rule" (but I think it's more like 1 or two minutes). I'm pretty wrapped up in the Boxee think right now so tis will not get addressed right away.

You are always welcome to install Eclipse or Netbeans, download the code and make changes as you wish If you look in the event handler for "PlaybackStopped | PlaybackFinished" you will see where I check for PlaybackFinished before setting the watched indicator. The change that needs to be made is to check if it's a PlaybackStopped event and the watched time is within x seconds of the end.
Tom,
I didn't have too much luck getting Eclipse to work on exporting to a JAR. I may have gotten the wrong version of the app. I'm downloading Netbeans now. Hopefully this will be easier to use. I think I will be able to tackle the watched status to be within XX seconds. The DVD watched issue seems to be a little over my head and I think you have it >90% figured out. I realize you are working on a great improvement for Sage with the Boxee app, but do you think you might have some time to take another look at the DVD playback issue this weekend?

Thanks
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII),
Clients - 2 x HD-300, 3 x MediaMVP
Reply With Quote
  #294  
Old 08-02-2011, 04:42 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Not exactly sure how to create the JAR, but I think this will work. I updated the plugin.java file right after line 463:

Code:
if (eventName.startsWith("PlaybackStopped")) {
   if((sagex.api.AiringAPI.GetAiringDuration(MediaFile) - MediaTime) < 300000) {
      MMF.setWatched();
   }
}
So I'm querying the SageAPI to find out the airing duration and subtracting the MediaTime (which I believe is how much was watched) and if that is less than 5 minutes (300000 ms), mark the file as watched.

Let me know what you think and if you want to provide me some pointers on how to build the JAR in either Eclipse or Netbeans.

Thanks
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII),
Clients - 2 x HD-300, 3 x MediaMVP
Reply With Quote
  #295  
Old 08-03-2011, 06:25 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by jpaddock3000 View Post
Not exactly sure how to create the JAR, but I think this will work. I updated the plugin.java file right after line 463:

Code:
if (eventName.startsWith("PlaybackStopped")) {
   if((sagex.api.AiringAPI.GetAiringDuration(MediaFile) - MediaTime) < 300000) {
      MMF.setWatched();
   }
}
So I'm querying the SageAPI to find out the airing duration and subtracting the MediaTime (which I believe is how much was watched) and if that is less than 5 minutes (300000 ms), mark the file as watched.

Let me know what you think and if you want to provide me some pointers on how to build the JAR in either Eclipse or Netbeans.

Thanks
That code will probably work. To build the JAR you need to do the following:

1. Install either Eclipse or NetBeans. (I know you did this already but I'm putting it in here in case anybody else looks at this post.)

2. Download the source from google code. You can use Tortoise to do this or you can use NetBeans. (I'm assuming Eclipse has svn support as well but I'm not familiar with Eclipse.)

3. Create the project in NetBeans/Eclipse. In NetBeans you choose "JAR with existing sources". I forget the exact details at the moment and I'm not in front of my dev machine.

4. Setup the project properties to include the sagex api JAR file.

Let me know how far you get and I'll help move you along.
__________________

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
  #296  
Old 08-03-2011, 09:30 AM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Quote:
Originally Posted by tmiranda View Post
That code will probably work. To build the JAR you need to do the following:

1. Install either Eclipse or NetBeans. (I know you did this already but I'm putting it in here in case anybody else looks at this post.)

2. Download the source from google code. You can use Tortoise to do this or you can use NetBeans. (I'm assuming Eclipse has svn support as well but I'm not familiar with Eclipse.)

3. Create the project in NetBeans/Eclipse. In NetBeans you choose "JAR with existing sources". I forget the exact details at the moment and I'm not in front of my dev machine.

4. Setup the project properties to include the sagex api JAR file.

Let me know how far you get and I'll help move you along.
Does that mean that SageTV needs to be installed on my dev machine or am I just able to grab a few JARs from my server?

Thanks
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII),
Clients - 2 x HD-300, 3 x MediaMVP
Reply With Quote
  #297  
Old 08-03-2011, 09:46 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by jpaddock3000 View Post
Does that mean that SageTV needs to be installed on my dev machine or am I just able to grab a few JARs from my server?

Thanks
No need to have sage installed on the dev machine, you just need the sagex jar. Once you build the MultiUser.jar you just copy that over to the sage server.
__________________

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
  #298  
Old 08-03-2011, 01:50 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Not sure I follow the setup of Netbeans. Can you send me your project file and then I can just open it and hopefully all will play nice?

Thanks
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII),
Clients - 2 x HD-300, 3 x MediaMVP
Reply With Quote
  #299  
Old 08-03-2011, 05:20 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Here is the whole directory (that sits in the NetBeansProjects folder)
Attached Files
File Type: zip MultiUserSupport.zip (267.6 KB, 122 views)
__________________

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
  #300  
Old 08-03-2011, 06:33 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Tom,
That is exactly what I needed. Here is the working code for marking a file watched if you stop playback within the last 5 minutes of the show. I'm feeling your pain with DVD's though. Not sure why they aren't working like they are suppose to. I added extra logic for a DVD, the log states its a DVD, but I'm getting a file duration of 1 millisecond for DVD's.

Code:
                if (eventName.startsWith("PlaybackStopped")) {
                    //Capture the difference of how much was watched versus the length of the file
                    Long watchedStatus;
                    if(sagex.api.MediaFileAPI.IsDVD(MediaFile)) { 
                        Log.getInstance().write(Log.LOGLEVEL_TRACE, "sageEvent: PlaybackStopped. Media is a DVD");
                        watchedStatus = sagex.api.MediaFileAPI.GetFileDuration(MediaFile) - duration; 
                    }
                    else { 
                        watchedStatus = sagex.api.AiringAPI.GetAiringDuration(MediaFile) - duration; 
                    }
                    Log.getInstance().write(Log.LOGLEVEL_TRACE, "sageEvent: PlaybackStopped. User " + UserID + " watched " + duration + " milliseconds and the video file is " + sagex.api.AiringAPI.GetAiringDuration(MediaFile) + " milliseconds");
                    Log.getInstance().write(Log.LOGLEVEL_TRACE, "sageEvent: PlaybackStopped. Watched difference is " + watchedStatus + " milliseconds");
                    if(watchedStatus < 300000) {
                        Log.getInstance().write(Log.LOGLEVEL_TRACE, "sageEvent: PlaybackStopped. Watched difference is less than 300000 milliseconds. Setting file watched");
                        MMF.setWatched();
                    }
                }
If you're able to provide any insight, that would be awesome. Otherwise, the code works as is from what I can tell. It would be great if bikesquid can test it out and make sure it works like it should on there system.

For the time being, the plugin will mark the DVD watched as soon as you hit stop, the DVD is marked as watched and when you go to resume playback, you will start at the beginning. Basically, same situation we are already in for DVD's.

Thanks
Jason
Attached Files
File Type: zip MultiUserSupport.zip (63.8 KB, 119 views)
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII),
Clients - 2 x HD-300, 3 x MediaMVP
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
TV Explorer for the Default STV - Testers Needed tmiranda SageTV Customizations 60 09-18-2009 10:52 AM
Restricted Access STVi - Testers Needed tmiranda SageTV Customizations 10 08-25-2009 05:01 PM
Plugin: SJQ v1.1.0RC1 Available - Testers Needed Slugger SageTV Customizations 35 04-21-2008 08:12 AM
Beta Testers needed for SageTV for Mac OS X!! Narflex SageTV Beta Test Software 39 04-11-2007 03:47 PM


All times are GMT -6. The time now is 01:25 PM.


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