by fetzenschaedl » Mon Jul 27, 2026 2:14 am
Hello,
unfortunately I couldn't access your video. Also the issue is not really with the addon I submitted, which just made me notice the behaviour while testing the remove plays function. But I understand the concerns about data loss when not used properly. Let me try to explain better:
I start with song "aaa", artist "bbb", never played, zero playcounts
Then I put the following into the sql editor
Code: Select all
SELECT
Songs.SongTitle,
Songs.Artist,
Songs.PlayCounter,
datetime(
(Songs.LastTimePlayed - 25569) * 86400,
'unixepoch',
'localtime'
) AS LastPlayed,
datetime(
(Played.PlayDate - 25569) * 86400,
'unixepoch',
'localtime'
) AS PlayDate
FROM Songs
LEFT JOIN Played
ON Songs.ID = Played.IdSong
WHERE Songs.SongTitle = 'aaa'
AND Songs.Artist = 'bbb'
ORDER BY Played.PlayDate DESC;
Which will result in
Then I open the properties dialog, and set the play counter to 1 in the details tab
which leads to
everything as expected so far, playcounter, LastTimePlayed and PlayDate are updated. However if I set the play counter back to zero in the properties/details tab
I end up with
so the PlayCounter and the LastTimePlayed Tables get reset as I expected, the PlayDate however does not. It seems to me that Mediamonkey always adds an entry to the PlayDate everytime the Playcounter is edited by the Properties/Details dialog, regardless if the playcounter is increased, decreased or set to zero. So I don't know if this behaviour is intentional or not.
MM 2024.2.2.3222
Hello,
unfortunately I couldn't access your video. Also the issue is not really with the addon I submitted, which just made me notice the behaviour while testing the remove plays function. But I understand the concerns about data loss when not used properly. Let me try to explain better:
I start with song "aaa", artist "bbb", never played, zero playcounts
[url=https://postimg.cc/943zGX5Y][img]https://i.postimg.cc/943zGX5Y/start-empty.png[/img][/url]
Then I put the following into the sql editor
[code]SELECT
Songs.SongTitle,
Songs.Artist,
Songs.PlayCounter,
datetime(
(Songs.LastTimePlayed - 25569) * 86400,
'unixepoch',
'localtime'
) AS LastPlayed,
datetime(
(Played.PlayDate - 25569) * 86400,
'unixepoch',
'localtime'
) AS PlayDate
FROM Songs
LEFT JOIN Played
ON Songs.ID = Played.IdSong
WHERE Songs.SongTitle = 'aaa'
AND Songs.Artist = 'bbb'
ORDER BY Played.PlayDate DESC;[/code]
Which will result in
[url=https://postimg.cc/dLmWM3nt][img]https://i.postimg.cc/dLmWM3nt/start-empty-sql0.png[/img][/url]
Then I open the properties dialog, and set the play counter to 1 in the details tab
[url=https://postimg.cc/GTRkzPWX][img]https://i.postimg.cc/GTRkzPWX/prop-pc1.png[/img][/url]
which leads to
[url=https://postimg.cc/sv6Tfqds][img]https://i.postimg.cc/sv6Tfqds/sql-pc1.png[/img][/url]
everything as expected so far, playcounter, LastTimePlayed and PlayDate are updated. However if I set the play counter back to zero in the properties/details tab
[url=https://postimg.cc/ctJfV1J7][img]https://i.postimg.cc/ctJfV1J7/prop-pc0.png[/img][/url]
I end up with
[url=https://postimg.cc/30WDtLLm][img]https://i.postimg.cc/30WDtLLm/sql-pc02nd.png[/img][/url]
so the PlayCounter and the LastTimePlayed Tables get reset as I expected, the PlayDate however does not. It seems to me that Mediamonkey always adds an entry to the PlayDate everytime the Playcounter is edited by the Properties/Details dialog, regardless if the playcounter is increased, decreased or set to zero. So I don't know if this behaviour is intentional or not.
MM 2024.2.2.3222