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
  #261  
Old 07-12-2011, 07:11 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'm only working on one other thing right now. If I could get DVD playback to work right on this I would have done it a while ago. I'm stuck and need some inspiration
Anything I can help you with? I'm willing to learn your code to assist. I mainly program (write scripts) in Perl, so hopefully it isn't too much of a stretch to look at some Java code and see what I can do to provide some insight. I'm assuming that you already posted the question in the studio forum right?

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
  #262  
Old 07-13-2011, 06:02 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Sure, the code is here: http://code.google.com/p/tmiranda/so...tmiranda%2Fmus

Go to Plugin.java and look for the "sageEvent" method. When DVD playback stops it gets the playback position and stores it on a per user basis. (The method handles all events, so you'll have to hunt through it a bit.)

Next look at API.java and find the "watch" method. It retrieves the playback position for the specific user and sets the values in the core before invoking the "real" watch method. I tried setting the Chapter and Title before invoking the core watch method and I've even resorted to trying to set the Title and Chapter after playback has begun.

It may be I am making a subtle mistake, or it may be I'm completely off base. A second set of eyes will help

Tom
__________________

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
  #263  
Old 07-13-2011, 10:46 AM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Tom,
I'm sure you have already gone through the logs quite a bit, but I wanted to ask a few questions as well as point out some things.

First, I just tried doing DVD Playback as the Admin user and this worked as expected. This seems obvious since if the user is Admin, you call:
Code:
        if (User==null || User.equalsIgnoreCase(Plugin.SUPER_USER)) {
            Log.getInstance().write(Log.LOGLEVEL_TRACE, "watch: null user or Admin " + User);
            return sagex.api.MediaPlayerAPI.Watch(new UIContext(ContextName), Content);
        }
This sounds to be me like you are just ignoring the plugin if you are logged in as Admin.

As Admin, this is logged when ending playback:
Code:
Wed 7/13 8:57:47.186 [VideoFrame-0023a5000500@fe824c] VF processing job VFJob[CloseMF r=0.0 t=0 file=null ifn=null] nPlayin=true
Wed 7/13 8:57:47.186 [VideoFrame-0023a5000500@fe824c] VF processing on UI Thread VFJob[CloseMF r=0.0 t=0 file=null ifn=null]
Wed 7/13 8:57:47.186 [VideoFrame-0023a5000500@fe824c] Setting DVD watched info for MediaFile[id=8720776 A[8720781,8720780,"Homeward Bound: The Incredible Journey",0@0820.22:07,0] mask=D host=pvr encodedBy= format=DVD 0:00:00 0 kbps [{IMDBID=tt0107131, SeasonFinal=false, MediaType=Movie, Actor=Don Alder -- Molly's Father;Ed Bernard -- Desk Sergeant;Kevin Chevalia -- Jamie Seaver;Anne Christianson -- Research Assistant;Ted D'Arms -- Vet;Woody Eney -- Forest Ranger 'Mark';Kim Greist -- Laura Burnford-Seaver;Rich Hawkins -- Forest Ranger;Robert Hays -- Bob Seaver;Nurmi Husa -- The Caterer;Jane Jones -- Molly's Mother;Veronica Lauren -- Hope Burnford;David MacIntyre -- Foote;Kit McDonough -- Female Forest Ranger;Mary Marsh -- Laura's Mom, MediaProviderDataID=tt0107131, MediaTitle=Homeward Bound: The Incredible Journey, Writer=WGA, SeriesInfoID=0, Director=Duwayne Dunham, UserRating=65, DiscNumber=0, MediaProviderID=imdb, TrailerUrl=}] F:\SageTV\Movies\^Lizzie Movies\Homeward Bound The Incredible Journey\VIDEO_TS, Seg0[Fri 8/20 22:07:35.124-Fri 8/20 22:07:35.125]] title=1 Time=1271369
Wed 7/13 8:57:47.187 [VideoFrame-0023a5000500@fe824c] Added:Watched[id=9001332 Airing=A[8720781,8720780,"Homeward Bound: The Incredible Journey",0@0820.22:07,0], WatchStart=Wed 12/31 16:00:00.000, WatchEnd=Wed 12/31 16:21:11.369, RealStart=Wed 7/13 8:57:14.869, RealEnd=Wed 7/13 8:57:47.186, Title=1]
Wed 7/13 8:57:47.187 [VideoFrame-0023a5000500@fe824c] MiniDVD stop
Wed 7/13 8:57:47.187 [VideoFrame-0023a5000500@fe824c] stopPush0()
Wed 7/13 8:57:47.242 [VideoFrame-0023a5000500@fe824c] closeDriver0()
Wed 7/13 8:57:47.242 [VideoFrame-0023a5000500@fe824c] Closing down MiniDVDPlayer
Wed 7/13 8:57:47.242 [VideoFrame-0023a5000500@fe824c] VF processing job null nPlayin=false
As Admin, this is logged when resuming playback:
Code:
Wed 7/13 9:00:14.090 [VideoFrame-0023a5000500@fe824c] Seeking DVD playback to the last watched point....Watched[id=9001332 Airing=A[8720781,8720780,"Homeward Bound: The Incredible Journey",0@0820.22:07,0], WatchStart=Wed 12/31 16:00:00.000, WatchEnd=Wed 12/31 16:21:11.369, RealStart=Wed 7/13 8:57:14.869, RealEnd=Wed 7/13 8:57:47.186, Title=1]
Wed 7/13 9:00:14.090 [VideoFrame-0023a5000500@fe824c] VideoFrame.timeSelected(Wed 12/31 16:21:11.369, true) currFile=MediaFile[id=8720776 A[8720781,8720780,"Homeward Bound: The Incredible Journey",0@0820.22:07,0] mask=D host=pvr encodedBy= format=DVD 0:00:00 0 kbps [{IMDBID=tt0107131, SeasonFinal=false, MediaType=Movie, Actor=Don Alder -- Molly's Father;Ed Bernard -- Desk Sergeant;Kevin Chevalia -- Jamie Seaver;Anne Christianson -- Research Assistant;Ted D'Arms -- Vet;Woody Eney -- Forest Ranger 'Mark';Kim Greist -- Laura Burnford-Seaver;Rich Hawkins -- Forest Ranger;Robert Hays -- Bob Seaver;Nurmi Husa -- The Caterer;Jane Jones -- Molly's Mother;Veronica Lauren -- Hope Burnford;David MacIntyre -- Foote;Kit McDonough -- Female Forest Ranger;Mary Marsh -- Laura's Mom, MediaProviderDataID=tt0107131, MediaTitle=Homeward Bound: The Incredible Journey, Writer=WGA, SeriesInfoID=0, Director=Duwayne Dunham, UserRating=65, DiscNumber=0, MediaProviderID=imdb, TrailerUrl=}] F:\SageTV\Movies\^Lizzie Movies\Homeward Bound The Incredible Journey\VIDEO_TS, Seg0[Fri 8/20 22:07:35.124-Fri 8/20 22:07:35.125]]
Wed 7/13 9:00:14.091 [VideoFrame-0023a5000500@fe824c] VideoFrame.timeSelected2(Wed 12/31 16:21:11.369, true) currFile=MediaFile[id=8720776 A[8720781,8720780,"Homeward Bound: The Incredible Journey",0@0820.22:07,0] mask=D host=pvr encodedBy= format=DVD 0:00:00 0 kbps [{IMDBID=tt0107131, SeasonFinal=false, MediaType=Movie, Actor=Don Alder -- Molly's Father;Ed Bernard -- Desk Sergeant;Kevin Chevalia -- Jamie Seaver;Anne Christianson -- Research Assistant;Ted D'Arms -- Vet;Woody Eney -- Forest Ranger 'Mark';Kim Greist -- Laura Burnford-Seaver;Rich Hawkins -- Forest Ranger;Robert Hays -- Bob Seaver;Nurmi Husa -- The Caterer;Jane Jones -- Molly's Mother;Veronica Lauren -- Hope Burnford;David MacIntyre -- Foote;Kit McDonough -- Female Forest Ranger;Mary Marsh -- Laura's Mom, MediaProviderDataID=tt0107131, MediaTitle=Homeward Bound: The Incredible Journey, Writer=WGA, SeriesInfoID=0, Director=Duwayne Dunham, UserRating=65, DiscNumber=0, MediaProviderID=imdb, TrailerUrl=}] F:\SageTV\Movies\^Lizzie Movies\Homeward Bound The Incredible Journey\VIDEO_TS, Seg0[Fri 8/20 22:07:35.124-Fri 8/20 22:07:35.125]] realDur=0
Wed 7/13 9:00:14.189 [VideoFrame-0023a5000500@fe824c] MiniDVD seek to 1271369
Wed 7/13 9:00:14.190 [VideoFrame-0023a5000500@fe824c] Block after link is 0
When logged in as a user, this is logged when stopping playback:
Code:
Wed 7/13 9:00:54.630 [VideoFrame-0023a5000500@fe824c] VF processing job VFJob[CloseMF r=0.0 t=0 file=null ifn=null] nPlayin=true
Wed 7/13 9:00:54.630 [VideoFrame-0023a5000500@fe824c] VF processing on UI Thread VFJob[CloseMF r=0.0 t=0 file=null ifn=null]
Wed 7/13 9:00:54.630 [VideoFrame-0023a5000500@fe824c] Setting DVD watched info for MediaFile[id=8720776 A[8720781,8720780,"Homeward Bound: The Incredible Journey",0@0820.22:07,0] mask=D host=pvr encodedBy= format=DVD 0:00:00 0 kbps [{IMDBID=tt0107131, SeasonFinal=false, MediaType=Movie, Actor=Don Alder -- Molly's Father;Ed Bernard -- Desk Sergeant;Kevin Chevalia -- Jamie Seaver;Anne Christianson -- Research Assistant;Ted D'Arms -- Vet;Woody Eney -- Forest Ranger 'Mark';Kim Greist -- Laura Burnford-Seaver;Rich Hawkins -- Forest Ranger;Robert Hays -- Bob Seaver;Nurmi Husa -- The Caterer;Jane Jones -- Molly's Mother;Veronica Lauren -- Hope Burnford;David MacIntyre -- Foote;Kit McDonough -- Female Forest Ranger;Mary Marsh -- Laura's Mom, MediaProviderDataID=tt0107131, MediaTitle=Homeward Bound: The Incredible Journey, Writer=WGA, SeriesInfoID=0, Director=Duwayne Dunham, UserRating=65, DiscNumber=0, MediaProviderID=imdb, TrailerUrl=}] F:\SageTV\Movies\^Lizzie Movies\Homeward Bound The Incredible Journey\VIDEO_TS, Seg0[Fri 8/20 22:07:35.124-Fri 8/20 22:07:35.125]] title=1 Time=2715144
Wed 7/13 9:00:54.631 [VideoFrame-0023a5000500@fe824c] Added:Watched[id=9001333 Airing=A[8720781,8720780,"Homeward Bound: The Incredible Journey",0@0820.22:07,0], WatchStart=Wed 12/31 16:00:00.000, WatchEnd=Wed 12/31 16:45:15.144, RealStart=Wed 7/13 9:00:43.857, RealEnd=Wed 7/13 9:00:54.631, Title=1]
Wed 7/13 9:00:54.631 [VideoFrame-0023a5000500@fe824c] MiniDVD stop
Wed 7/13 9:00:54.631 [VideoFrame-0023a5000500@fe824c] stopPush0()
Wed 7/13 9:00:54.681 [VideoFrame-0023a5000500@fe824c] closeDriver0()
Wed 7/13 9:00:54.681 [VideoFrame-0023a5000500@fe824c] Closing down MiniDVDPlayer
Wed 7/13 9:00:54.681 [VideoFrame-0023a5000500@fe824c] VF processing job null nPlayin=false
Wed 7/13 9:00:54.691 [PluginEventQueue@1b688c0] MUS: sageEvent: Users watching this Airing [JasonSarah]
Wed 7/13 9:00:54.691 [PluginEventQueue@1b688c0] MUS: sageEvent: UIContext=0023a5000500, Duration=5079741, MediaTime=2715144, ChapterNum=9, TitleNum=1
Wed 7/13 9:00:54.691 [PluginEventQueue@1b688c0] MUS: sageEvent: Duration=1 hour 24 minutes 39 seconds
Wed 7/13 9:00:54.691 [PluginEventQueue@1b688c0] MUS: sageEvent: MediaTime=Wednesday, December 31, 1969 - 4:45:15 PM PST
Wed 7/13 9:00:54.692 [PluginEventQueue@1b688c0] MUS: setWatchedDuration: Setting to Monday, May 13, 1929 - 11:37:40 AM PST for JasonSarah
Not sure why the mediaTime and set watched duration from the plugin log such off dates and times. Maybe that has something to do with the issue.

I believe this is what is logged just before I try and resume playback:
Code:
Wed 7/13 9:00:57.201 [EventRouter-0023a5000500@3265ac] MUS: watch: Setting primary user watching JasonSarah
Wed 7/13 9:00:57.202 [EventRouter-0023a5000500@3265ac] MUS: watch: Is an Airing.
Wed 7/13 9:00:57.202 [EventRouter-0023a5000500@3265ac] MUS: setRealWatchedStartTime: Setting to Wednesday, July 13, 2011 - 9:00:57 AM PDT for JasonSarah
Wed 7/13 9:00:57.203 [EventRouter-0023a5000500@3265ac] MUS: setRealWatchedStartTime: Setting to Wednesday, July 13, 2011 - 9:00:57 AM PDT for JasonSarah
Wed 7/13 9:00:57.204 [EventRouter-0023a5000500@3265ac] MUS: watch: Setting WatchedEndTime and RealStartTime Wednesday, December 31, 1969 - 4:45:15 PM PST:Wednesday, July 13, 2011 - 9:00:57 AM PDT
Wed 7/13 9:00:57.204 [EventRouter-0023a5000500@3265ac] MUS: watch: About to watch Homeward Bound: The Incredible Journey:Homeward Bound: The Incredible Journey
Wed 7/13 9:00:57.205 [EventRouter-0023a5000500@3265ac] MUS: watch: DVD title is currently 0 and target is 0
One thing that is odd is how some events are logged twice. Also, for the DVD title, it is being logged as 0, but when watching the DVD and hitting info, the title shows as 1.

Let me know if any of this information helps. If this is stuff you are already aware of, I will continue looking.

Thanks
Jason
__________________
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
  #264  
Old 07-13-2011, 11:48 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Jason,

Yes, if logged in as Admin it just ignores all the User settings.

When you see the MediaTime being set to December 31, 1969 that means the time is 0. Java uses the same concept as *nix systems which is that time is counted in milliseconds and "starts" on Jan 1 1970. So this tells me that MediaTime (which is obtained from the event that sage passes to the plugin) is 0 or null. See if I messed up getting the value as that would prevent things from working properly. I do write out the value of MediaTime in the logfile after retrieving it from the event.

Some events seem to be logged twice because they are executed twice by the plugin. Sage has the concept of a MediaFile Object and an Airing Object. The sage core API methods generally allow you to use them interchangably, even though they are not the same thing (the core automatically creates the Object it needs from the Object you pass it.) The plugin therefore has to keep information about MediaFile Objects and Airing Objects AND it has to keep them in sync. For example, if a user watches a recording the plugin has to set the users watched time for the MediaFile that corresponds to that recording as well as the Airing that corresponds to that recording (because in the future either of these Objects can be used to reference the same recording.)
__________________

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
  #265  
Old 07-18-2011, 04:20 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Tom,
I just took another look and it appears that you aren't setting this value properly in Plugin.java:
Code:
Long MediaTime      = (Long)eventVars.get("MediaTime");
This value seems to always be the start of epoch.

I think this causes the problem as when you try and send the getWatchedDuration, you are
Code:
MMF.setWatchedDuration(MediaTime - sagex.api.AiringAPI.GetAiringStartTime(MediaFile));
This results in this type of log:

Wed 7/13 9:00:57.200 [EventRouter-0023a5000500@3265ac] MUS: getWatchedDuration: Duration Homeward Bound: The Incredible Journey:Monday, May 13, 1929 - 11:37:40 AM PST

I'm kind of guessing here, but I think it has merit.

From what I can tell, the DVD watched info is being logged properly by the VideoFrame event:
Code:
Admin User:
Wed 7/13 8:57:47.186 [VideoFrame-0023a5000500@fe824c] Setting DVD watched info for MediaFile[id=8720776 A[8720781,8720780,"Homeward Bound: The Incredible Journey",0@0820.22:07,0] mask=D host=pvr encodedBy= format=DVD 0:00:00 0 kbps [{IMDBID=tt0107131, SeasonFinal=false, MediaType=Movie, Actor=Don Alder -- Molly's Father;Ed Bernard -- Desk Sergeant;Kevin Chevalia -- Jamie Seaver;Anne Christianson -- Research Assistant;Ted D'Arms -- Vet;Woody Eney -- Forest Ranger 'Mark';Kim Greist -- Laura Burnford-Seaver;Rich Hawkins -- Forest Ranger;Robert Hays -- Bob Seaver;Nurmi Husa -- The Caterer;Jane Jones -- Molly's Mother;Veronica Lauren -- Hope Burnford;David MacIntyre -- Foote;Kit McDonough -- Female Forest Ranger;Mary Marsh -- Laura's Mom, MediaProviderDataID=tt0107131, MediaTitle=Homeward Bound: The Incredible Journey, Writer=WGA, SeriesInfoID=0, Director=Duwayne Dunham, UserRating=65, DiscNumber=0, MediaProviderID=imdb, TrailerUrl=}] F:\SageTV\Movies\^Lizzie Movies\Homeward Bound The Incredible Journey\VIDEO_TS, Seg0[Fri 8/20 22:07:35.124-Fri 8/20 22:07:35.125]] title=1 Time=1271369

JasonSarah User:
Wed 7/13 9:00:54.630 [VideoFrame-0023a5000500@fe824c] Setting DVD watched info for MediaFile[id=8720776 A[8720781,8720780,"Homeward Bound: The Incredible Journey",0@0820.22:07,0] mask=D host=pvr encodedBy= format=DVD 0:00:00 0 kbps [{IMDBID=tt0107131, SeasonFinal=false, MediaType=Movie, Actor=Don Alder -- Molly's Father;Ed Bernard -- Desk Sergeant;Kevin Chevalia -- Jamie Seaver;Anne Christianson -- Research Assistant;Ted D'Arms -- Vet;Woody Eney -- Forest Ranger 'Mark';Kim Greist -- Laura Burnford-Seaver;Rich Hawkins -- Forest Ranger;Robert Hays -- Bob Seaver;Nurmi Husa -- The Caterer;Jane Jones -- Molly's Mother;Veronica Lauren -- Hope Burnford;David MacIntyre -- Foote;Kit McDonough -- Female Forest Ranger;Mary Marsh -- Laura's Mom, MediaProviderDataID=tt0107131, MediaTitle=Homeward Bound: The Incredible Journey, Writer=WGA, SeriesInfoID=0, Director=Duwayne Dunham, UserRating=65, DiscNumber=0, MediaProviderID=imdb, TrailerUrl=}] F:\SageTV\Movies\^Lizzie Movies\Homeward Bound The Incredible Journey\VIDEO_TS, Seg0[Fri 8/20 22:07:35.124-Fri 8/20 22:07:35.125]] title=1 Time=2715144
You will see that the time at the end is unique. I'm guessing this is the time that you are trying to pass back, but the time is thrown off, so Sage ignores it and thinks that the video hasn't been watched before.

I'm not sure why the DVD title appears to be wrong as well, but here is the log entry:
Code:
Wed 7/13 9:00:43.854 [EventRouter-0023a5000500@3265ac] MUS: watch: DVD title is currently 0 and target is 0
The video frame event pulls title = 1. Not sure if that matters, but something else to look into.

I wish I could provide some additional insight, but I'm still trying to pick up the code. Hopefully this info can give you a start on where to look or to possibly post in the studio forums and get a response from one of the other devs. I would think that the Phoenix people figured this all out since I'm sure their UI needs to capture and post back.

I'm happy to do any testing!

Thanks
Jason
__________________
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
  #266  
Old 07-18-2011, 05:35 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Thanks Jason. When I retrieve "MediaTime" from eventVars it is supposed to be set by the Sage core. Either it's not getting set correctly, I'm retrieving it wrong, or it's not valid for DVDs. I know it works for normal video but maybe DVDs are treated differently.

The message "DVD title=x and target=y" is displayed just after the DVD starts playing. As far as I can tell there is no way to set the title and chapter before the DVD starts playing so what I'm attempting to do is start the DVD playback and then skip to the right title and chapter. So title=0 and target=0 tells me that either the data is incorrect or it really should start playing at title 0.
__________________

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
  #267  
Old 07-18-2011, 05:51 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Tom,
Where in the code does the data get sent to the database? Do you know of a way to capture "[VideoFrame-0023a5000500@fe824c] Setting DVD watched info for MediaFile..." My thought is, if you can capture that and send it back when the user requests the file again, that might work. Is there anyway that you can log what is happening for the admin user? I know it really isn't using the plug-in, but if we can see in greater detail what is being recorded where and what is being requested on playback, I believe we can solve this mystery.

Also, should be move our chat to private messages or leave it on the forum?

Thanks
Jason
__________________
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
  #268  
Old 07-18-2011, 07:11 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Jason,

Look in the event handler and there are comments that show you what variables are available for each event. The variables are supplied by the core. IF you don't see them I'll post a direct link to the Sage docs tomorrow. (Putting the kids to bed now...)

We shouldn't have to manually capture the playback position, it should be supplied to the plugin in the "PlaybackStopped" event handler.

Tom
__________________

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
  #269  
Old 07-18-2011, 09:42 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
OK, sounds good. I will take a look tomorrow as well. If it starts to take too long to figure out, would it be possible to just ignore the plugin for dvd's? This would result in the same playback position for all users, but we know if we ignore the plugin, resuming dvd playback works. Ideally, we will be able to figure out what is going on, but wanted to have a plan B just in case.

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
  #270  
Old 07-19-2011, 11:26 AM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Tom,
I was doing some additional digging. The media time that you are capturing is the same as the timestamp from VideoFrame:
Code:
Wed 7/13 9:00:54.630 [VideoFrame-0023a5000500@fe824c] Setting DVD watched info for MediaFile[id=8720776 A[8720781,8720780,"Homeward Bound: The Incredible Journey",0@0820.22:07,0] mask=D host=pvr encodedBy= format=DVD 0:00:00 0 kbps [{IMDBID=tt0107131, SeasonFinal=false, MediaType=Movie, Actor=Don Alder -- Molly's Father;Ed Bernard -- Desk Sergeant;Kevin Chevalia -- Jamie Seaver;Anne Christianson -- Research Assistant;Ted D'Arms -- Vet;Woody Eney -- Forest Ranger 'Mark';Kim Greist -- Laura Burnford-Seaver;Rich Hawkins -- Forest Ranger;Robert Hays -- Bob Seaver;Nurmi Husa -- The Caterer;Jane Jones -- Molly's Mother;Veronica Lauren -- Hope Burnford;David MacIntyre -- Foote;Kit McDonough -- Female Forest Ranger;Mary Marsh -- Laura's Mom, MediaProviderDataID=tt0107131, MediaTitle=Homeward Bound: The Incredible Journey, Writer=WGA, SeriesInfoID=0, Director=Duwayne Dunham, UserRating=65, DiscNumber=0, MediaProviderID=imdb, TrailerUrl=}] F:\SageTV\Movies\^Lizzie Movies\Homeward Bound The Incredible Journey\VIDEO_TS, Seg0[Fri 8/20 22:07:35.124-Fri 8/20 22:07:35.125]] title=1 Time=2715144
Wed 7/13 9:00:54.691 [PluginEventQueue@1b688c0] MUS: sageEvent: UIContext=0023a5000500, Duration=5079741, MediaTime=2715144, ChapterNum=9, TitleNum=1
When you convert epoch 2715144 to normal time, you get Sunday, February 01, 1970 2:12:24 AM. Not sure why Sage reports
Code:
MediaTime=Wednesday, December 31, 1969 - 4:45:15 PM PST
Now when you are first recording the ChapterNum and TitleNum, you have the correct values, but then those are getting reset I believe right here in the API.java:
Code:
            chapter = MMF.getChapterNum();
            title = MMF.getTitleNum();
as they are just staying at 0 that you defined earlier in the script.

I'm thinking this might just be a pulling variable issue or an understanding of what the values are. I believe that the time being returned for DVD playback has to do with the playback position and it probably shouldn't be converted as an epoch value as I don't think it is.

I'm really hoping this info helps and can get us closer to getting DVD playback working for multiple users. Let me know if there is anything else I can do to assist.

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
  #271  
Old 07-19-2011, 03:41 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Please try the attached jar. It won't fix the problem but I put more debug info in there. After installing please do the following test:

- Logon as user
- Clear watched for the DVD
- Start DVD playback
- Skip ahead a chapter or two
- Let it play for 30 seconds or so
- Stop playback
- Start playback
- Stop playback

Attach the whole zipped log. Thanks for your patience
Attached Files
File Type: zip MultiUserSupport.zip (63.3 KB, 123 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
  #272  
Old 07-19-2011, 03:44 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Sure thing. I will do this tonight.

Thanks for the updated debugging code!
__________________
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
  #273  
Old 07-19-2011, 10:47 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Here is the log file. I see lots of good debug data in the log. Have you tried setting the watched duration to the initial value of media time? It appears that value is always getting converted as if it is an epoch value. I think if you just leave it as is, it will work. It's worth a try if you haven't already.

Thanks
Attached Files
File Type: txt sagetv_0.txt (458.9 KB, 189 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
  #274  
Old 07-20-2011, 05:45 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
Here is the log file. I see lots of good debug data in the log. Have you tried setting the watched duration to the initial value of media time? It appears that value is always getting converted as if it is an epoch value. I think if you just leave it as is, it will work. It's worth a try if you haven't already.

Thanks
I'll look at this tomorrow. I won't have any time today
__________________

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
  #275  
Old 07-21-2011, 07:12 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
Here is the log file. I see lots of good debug data in the log. Have you tried setting the watched duration to the initial value of media time? It appears that value is always getting converted as if it is an epoch value. I think if you just leave it as is, it will work. It's worth a try if you haven't already.

Thanks
Jason,

I've looked a bit at the log and I think I see where things are going wrong. I don't know why just yet but I intend to look at the code over the weekend.

Everything looks good until 21:35:30.192. Here I see one potential problem, the plugin thinks the DVD is an Airing. This may cause some problems downstream.

The next thing that looks suspect is at 21:37:13.178. I calculate the watched duration incorrectly because the MediaTime reported for the DVD is based on 0 and not the epoch. (Which is different from Airings and MediaFiles.)

Then I see an issue at 21:37:15.738. The plugin things the playback should begin at Title 0, rather than Title 1 (where you seeked to).

I'll let you know what I find out.
Tom
__________________

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
  #276  
Old 07-21-2011, 11:39 AM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Sounds good. Looking forward to your update.

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
  #277  
Old 07-22-2011, 12:45 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Tom,
Just to throw it in there, it looks like the log file also shows the sorting issue where the videos aren't in alphabetical order.

Starting from Tue 7/19 21:35:12.784 [BGLoader2-0023a5000500@14e1d93]
Ending with Tue 7/19 21:35:20.026 [BGLoader2-0023a5000500@14e1d93]
It's kind of odd that not all the videos in the Folder list are showing up in the log. It stops about 8 videos short.

I'm hoping while you are looking at the code, you will be able to figure that issue out as well. Again, the sorting issue only happens in the folder view, if I browse Titles or DVD, everything is sorted properly. I do have DVD's and non DVD videos in my folders.

Thanks again!
__________________
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
  #278  
Old 07-22-2011, 08:32 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Tom,
I changed the sort method to Series SxxEyy Episode and now everything is alphabetical once again! Not nearly as important to fix anymore.
__________________
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
  #279  
Old 07-23-2011, 12:47 PM
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
Tom,
I changed the sort method to Series SxxEyy Episode and now everything is alphabetical once again! Not nearly as important to fix anymore.
Good to hear that. I made two changes to the jar which should improve things, can you try it out and let me know what happens? If it does not work please do the same testcase as before and send me the log. I can't easily test this because the wife and kids are busy watching TV

Make sure you try regular videos as well to make sure I didn't break that.

Thanks,

Tom
Attached Files
File Type: zip MultiUserSupport.zip (63.4 KB, 104 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
  #280  
Old 07-23-2011, 12:58 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Tom,
I've attached the new log. I actually got prompted to resume playback this time around for DVD Playback, but it started me back at 0:00 instead of where I actually was. I confirmed that playback of a regular media file (avi) still has the same functionality of being able to resume where I left off. Looks to me like you are really close
Attached Files
File Type: zip sagetv_0.zip (103.2 KB, 108 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.