Hi, after using v18 for a while I was hitting serious problems with performance, and also frustrations with the way locking and resuming worked. So.... I went to work.
I've made the changes below. I just based it on the released version and haven't done nice cvs patches or anything at the moment - partly I haven't had time, partly I wanted some comments first anyway. Happy to do it properly when I have time in the new year.
Fix performance issues
There were two major performance issues. First, a loop error meant that when the resume file was being saved (on every pause & stop), instead of entries being written:
1
2
3
They were being written:
1
1
2
1
2
3
This led to the file getting very large very quickly (mine was 400KB after a few days).
Next, the file was being loaded from disk and parsed once for every single entry in a program list whenever a list was displayed. Multiply that by a massive file... It's now loaded once only and cached.
I also tweaked a couple of loops to move as much as possible outside, but the above were the main problems.
Removed the resume file locking
Personally, I found this nothing more than an inconvenience. The plugin does occasionally fail for whatever reason, and having to go to settings to release the lock is a pain. Its purpose seems to be to protect the file from being manipulated by multiple instances of XBMC. However, due to the mix of static and non-static methods, it was actually allowing the file to be loaded without being locked anyway. Personally I feel having multiple instances of XBMC running is such an edge-case that the protection is actually more trouble than it's worth.
Setting to define whether to play from the beginning or resume from resume point by default
As someone else said, it can sometimes be frustrating when clicking on an item attempts to resume rather than playing from the start. The setting (under "Advanced") allows you to decide which behaviour you prefer.
New context menu entries to allow play from beginning or resume, regardless of the default setting
What it says.
Cosmetic changes
Display the resume time in the program list and context menu.
-----
Ok, now I've just realised there's no way to attach files. Not sure of the best way to get this to anyone interested! Let me know if you want to give it a go.
Doug.