Question about playcounts in DB

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

Onweerwolf
Posts: 705
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Question about playcounts in DB

Post by Onweerwolf »

Hi guys, I was wondering about this: when you play a track outside MM on a device that is able to sync back this play to the DB, the playcount increases. However, I know that MM does not save the played date for the play that was made on the device the way it does for plays that were made directly within MM itself. It only updates the last played date and increase the playcount #.

Does anything else actually get saved to the DB? In other words, would it be possible to retrieve the timestamps on which the playcount was updated even for those instances where it was updated because a device was synced?
Image
Eyal
Posts: 3116
Joined: Sun Jun 26, 2005 9:27 am
Location: Québec

Re: Question about playcounts in DB

Post by Eyal »

Played history is stored in PLAYED Table. (See Database structure).

These scripts can help you investigate further:
- Add/Remove PlayStat : http://www.mediamonkey.com/forum/viewto ... =2&t=31809
- Play History & Stat Node : http://www.mediamonkey.com/forum/viewto ... =2&t=12368
- Restore PlayHistory/DateAdded/Playlists : http://www.mediamonkey.com/forum/viewto ... =2&t=42085

Eyal :~)
Skins for MediaMonkey: Cafe, Carbon, Helium, Spotify, Zekton. [ Wiki Zone ].
Onweerwolf
Posts: 705
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Question about playcounts in DB

Post by Onweerwolf »

I use all of those scripts but they don't answer my question.
Image
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Question about playcounts in DB

Post by trixmoto »

Looking at the database structure, I'd say no, there is no date field that could be used to determine when the update was done. Nor is there an "OnTrackSynched" (or similar) event which could be used by a script to manufacture the date if the playcount is changed during the synch - even if you could though, this obviously wouldn't be the time that you played it.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Onweerwolf
Posts: 705
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Question about playcounts in DB

Post by Onweerwolf »

Right, thank you. I didn't think so.

The reason why I asked is because during the beta testing period I used (one of) the build(s) that had the bug that doubled playcounts on tracks synced from an iPod Nano 5G. I however didn't notice that at the time. So i'm stuck now with a number of songs that have too much playcounts and I have no way to figure out which songs exactly (besides those that are obvious to me) and how many playcounts are wrong. :(
Image
Post Reply