Ok! Now I get it. Yep, I supposed the problem was that. Although I think %played_times_combined% should be provided by the plugin for consistency and simplicity.
Meanwhile, since the "fix" is not so difficult I will simply combine them following your advice of discarding plays differing by seconds. I don't use scrobbles at all so using only %played_times_js% would be good enough for me, but thinking again about it... your plugin is mostly used by people who use lastfm, so it makes sense to use both features even if it requires a bit more of work.
I honestly don't know if anyone besides you or me is even using the actual played times for anything currently
Honestly, being so easy to add thinks using js to Foobar, I plan to expand the scripts more to add complex UI/statistics features (specially if SMP is developed with those aims in mind).
This was just a "top tracks" playlist generation script, but I could add anything seen on web players... like music recommendations using played tracks history, weighting tracks for inclusion on other playlist generation scripts, etc. the sky is the limit. So I see some potential on having %played_times_combined% for simplicity.
Also it would be great to update the entire library on demand with your plugin using a menu option or a popup after installation (as far as I know the variables are only updated after playing the track for the first time).
And maybe adding 'artificial' play counts to last date, if first play count and last play count were from same year/month. I know you can't retrieve the real date, but that would at least preserve some info about the most aprox. date. Otherwise, on next play, the variables are updated, that info is lost and playcount and js variable differ in size.
playcount: 9
firstPlay : 2011-Sep
lastPlay: 2011-Dec
--> We can be sure those 9 playcounts must be from Sep to Dec.
Installation. After playing it now, with your plugin:
playcount: 10
firstPlay : 2011-Sep
lastPlay: 2021-Mar
playcount_js [2011-Sep, 2011-Dec,2021-Mar]
--> Previous info is lost.
My suggestion:
playcount: 10
firstPlay : 2011-Sep
lastPlay: 2021-Mar
playcount_js [2011-Sep, 2011-Dec, 2011-Dec, , ...8 times more on Dec ...., 2021-Mar]
--> Info is at least partially accurate for any date previous to installation
Thanks
PD: answered the pms, sorry for the delay. That's why I use the email