I started on a plugin to see whether a file was watched before. One problem I run into now is to retrieve how much of a file has been watched. I've implemented a StartStopListener with the public void donePlaying(DLNAMediaInfo media, DLNAResource resource) method. Now, whenever I do media.getDurationInSeconds() is always returns 0. Basically what I had in mind, was to get the total duration, and than to check were playback was at (don't know how to this either).I am running the latest build of ps3mediaserver from svn.

I've got a plugin doing that for pms-mlx if you want to have a look. http://pms-mlx.svn.sourceforge.net/view ... herPlugin/At the time I've coded it, the StartStopListener would be notified too often, that's why it has a queue where only the oldest and newest notification will be considered. I the notification bug has been resolved by now.

If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx

Yep, I think our goals are the same. Just to show what happens, when calling storage.updatePlayCount, the last played date for the file is being set to the time the file ended playing and its counter for the number of plays is being incremented (if 80% of the file has been played). This way conditions like e.g. 'show all files haven't been played the last 3 months' or 'show all files having been played at least 5 times' can be set.I always keep mlx up to date with the latest official release. As it's quite a hassle to merge the code, I won't keep it up to date with the trunk or beta releases.The queue is being initialized when the PlayCountWatcher is being initialized. Every time a start playing notification is being received, it is being enqueued with the id of the resource and when it started playing. It's then being dequeued (using FILO) when done playing is being called.For me the play lengths always works fine. You can try changing the mediainfo attribute for the renderer configuration you're using to see if it changes anything.

If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx

If the notification bug has been fixed, you only need a queue if you want to support multiple renderers streaming files at the same time from the same instance of pms. My implementation currently doesn't support that.Good luck and have fun

If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx

It seems that it depends on the renderer. When watching files on an android device running bubbleUPNP and then trough MoboPlayer (which I used for quick testing), then getDurationInSeconds() will always return 0. It will however return a value > 0 when watching on a PS3.

@taconaut: I've looked into your solution. You use the time when the file was started to compute how much was viewed. This means that when you start it and then pause it, leave it on pause for a while, then this will count as if you watched it. This could cause an over 100% watched rate. Problem is that this seems the only way to do it since I can't find a way to determine the exact moment in the file it was stopped.

I'd guess if you check the two renderer configuration files you're using one will have mediainfo = true and the other one false!?You're right with the pause problem (guess you've seen the TODO comment in my code as well). We would need an additional method in the interface called something like 'public void pausePlaying(DLNAMediaInfo media, DLNAResource resource)'. I don't know if it is even possible for pms to give this info (does the renderer send a message telling to pause? does it stop consuming the stream and this would have to be detected?); wanted to dive into the code at some point to check this out, but haven't done so yet.

If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx

Actually, then it can still go wrong. If for example you have watched a file for 80% and later on you start the file again and skip to 80% of the file and watch it to the end, the calculation will say you have watched it for 20%. In essence this is true, but not suitable for what I want.