Bug 16551 - Implement support for reportPlayDuration()
: Implement support for reportPlayDuration()
Status: RESOLVED FIXED
Product: MySqueezebox.com
Classification: Unclassified
Component: WiMP
: Test
: All All
: P1 major (vote)
: Lunik
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-16 04:44 UTC by Me
Modified: 2010-09-23 05:36 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Me 2010-09-16 04:44:06 UTC
When a song has played halfway through, the thrift method profileService.reportPlayDuration(playerKey, numSecondsPlayed, sessionId) should be called.

We need this to make sure the number of playbacks are reported correctly to the record labels.
Comment 1 Michael Herger 2010-09-16 10:01:11 UTC
numSecondsPlayed should be the amount of seconds played halfway through the track? Roughly duration/2?
Comment 2 Me 2010-09-16 11:53:36 UTC
Michael: Yes, that's correct.
Comment 3 Michael Herger 2010-09-16 12:34:56 UTC
...and no need to report what track actually is playing? Haven't seen any such argument in the docs.
Comment 4 Me 2010-09-16 12:36:28 UTC
We get the playing track from the playerKey.
Comment 5 SVN Bot 2010-09-17 03:48:17 UTC
 == Auto-comment from SVN commit #8854 to the network repo by mherger ==
 == http://svn.slimdevices.com/network?view=revision&revision=8854 ==

Bug: 16551
Description: report play duration once we are halfway through a track
Comment 6 SVN Bot 2010-09-17 03:49:00 UTC
 == Auto-comment from SVN commit #8855 to the network repo by mherger ==
 == http://svn.slimdevices.com/network?view=revision&revision=8855 ==

Bug: 16551
Description: add reportPlayDuration handler on mysb.com side
Comment 7 Michael Herger 2010-09-17 03:49:48 UTC
Henrik - can you verify you're seeing my tracks being reported? (41794075018)
Comment 8 Michael Herger 2010-09-22 06:21:16 UTC
Nils/Henrik - do you see usage being reported? I'd like to close this bug. Thanks.
Comment 9 rune.lending 2010-09-22 06:48:29 UTC
Hello.

We do not see any tracks being reported halfway. Could you verify that you are doing this callback?

Best regards
Rune

(In reply to comment #8)
> Nils/Henrik - do you see usage being reported? I'd like to close this bug.
> Thanks.
Comment 10 Michael Herger 2010-09-22 07:22:58 UTC
Some debug output is telling me that the call to reportPlayDuration succeeded:

Calling WiMP:{
  args      => ["phmlST2sIC0+UqEWDq8Bhw==", 103],
  dontretry => 0,
  method    => "reportPlayDuration",
  player    => "000420xxxxxx",
  sid       => "Rbn4a9jUiVeicFTBZVHUHg==",
  user      => "41794075018",
} at /Users/mh/Documents/workspace/SN/script/../lib/Net/WiMP.pm line 547.
1 at /Users/mh/Documents/workspace/SN/script/../lib/Net/WiMP.pm line 595.

(the "1" is the boolean true value)
Comment 11 SVN Bot 2010-09-23 00:49:21 UTC
 == Auto-comment from SVN commit #8884 to the network repo by mherger ==
 == http://svn.slimdevices.com/network?view=revision&revision=8884 ==

Bug: 16551
Description: reportPlayDuration must handle UserLoggedOutException. Stop playback on connected players, otherwise the session would automatically be renewed on track change.
Comment 12 rune.lending 2010-09-23 01:52:07 UTC
Could you please also verify that the parameters sent in are correct?

reportPlayDuration(playerKey, numSecondsPlayed, sessionId)

When reporting, playerkey and sessionid needs to be the same as they were when you started the song.



(In reply to comment #10)
> Some debug output is telling me that the call to reportPlayDuration succeeded:
> 
> Calling WiMP:{
>   args      => ["phmlST2sIC0+UqEWDq8Bhw==", 103],
>   dontretry => 0,
>   method    => "reportPlayDuration",
>   player    => "000420xxxxxx",
>   sid       => "Rbn4a9jUiVeicFTBZVHUHg==",
>   user      => "41794075018",
> } at /Users/mh/Documents/workspace/SN/script/../lib/Net/WiMP.pm line 547.
> 1 at /Users/mh/Documents/workspace/SN/script/../lib/Net/WiMP.pm line 595.
> 
> (the "1" is the boolean true value)
Comment 13 Michael Herger 2010-09-23 02:02:17 UTC
> When reporting, playerkey and sessionid needs to be the same as they were when
> you started the song.

Do you see incorrect values in the logs right now, or in the example I posted? There has been an issue which potentially could have caused the difference. But I (hopefully) fixed it earlier today.
Comment 14 rune.lending 2010-09-23 04:08:35 UTC
I actually do not see any incoming reports. That is why I wondered if you maybe sent the wrong values or something..



(In reply to comment #13)
> > When reporting, playerkey and sessionid needs to be the same as they were when
> > you started the song.
> 
> Do you see incorrect values in the logs right now, or in the example I posted?
> There has been an issue which potentially could have caused the difference. But
> I (hopefully) fixed it earlier today.
Comment 15 Michael Herger 2010-09-23 04:22:25 UTC
> I actually do not see any incoming reports. That is why I wondered if you maybe
> sent the wrong values or something..

Shouldn't the call return a false value if it didn't log? Don't you see the call being made at all?

That's quite a bit irritating. I see the calls are being made. I do get the UserLoggedOutException when I log in to WiMP from somewhere else - which means it's at least doing something.

Maybe you don't see calls from mysb.com as I'm testing with my local instance. Would you see some coming from 188.62.100.139?
Comment 16 rune.lending 2010-09-23 04:33:57 UTC
Are you getting UserLoggedOutException on the profileService.reportPlayDuration(playerKey, numSecondsPlayed, sessionId) method call?
Comment 17 Michael Herger 2010-09-23 04:43:06 UTC
Ok, please help me understand: the reportPlayDuration() call should be using the same playerKey I've been using to create the track's URL? In this case my code might indeed be wrong.

Is getNextPlayer()->nextKey the same as getNextPlayerKey()?
Comment 18 SVN Bot 2010-09-23 05:36:50 UTC
 == Auto-comment from SVN commit #8886 to the network repo by mherger ==
 == http://svn.slimdevices.com/network?view=revision&revision=8886 ==

Fixed Bug: 16551
Description: we need to use the same player key when reporting the duration as we used to create the streaming URL