Page 4 of 4
Re: [SOLVED] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag
Posted: Tue Jun 15, 2021 9:33 am
by Andre_H
Can confirm that the thread does not need to be set to [REQ] again!
Tested on .2416, works fine.
Re: [SOLVED] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag
Posted: Sat Nov 12, 2022 10:38 am
by sonos
I am not sure if I have understood it correctly here. I assumed that the values Playcounter, LastPlayed (PlayDate) are stored in the DB table Played.
What is the idea of:
[REQ] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag ?
Carsten
Re: [SOLVED] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag
Posted: Sun Nov 13, 2022 4:50 am
by Andre_H
sonos wrote: ↑Sat Nov 12, 2022 10:38 am
What is the idea of:
[REQ] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag ?
Hi Carsten,
They are in the database, and that's the point: only there. Call it "my personal paranoia" or "lessons learned from iTunes". I used iTunes over years before switching to MMW. whenever i renamed, moved or even replaced (higher bitrate or forewhat reason ever) a file, iTunes resetted all track statistics for this track, the track was classified as "new added". i lost a lot of statistics that way.
My playlists, on the other hand, are mostly dynamic and are heavily based on this values.
So i just wanted these data saved to the track itself, in case of "whatever happens", i can recover them. i even export a full csv list of all the fields from [songs] to csv on daily base.
To be honest: I barely had any use of it so far, since MMW doesn't reset anything within the file actions from above, but ... you know ... "besser haben als brauchen" ...

Re: [SOLVED] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag
Posted: Sun Nov 13, 2022 9:40 am
by sonos
Hi Andre,
Thanks for your quick reply. I use the Addon
SQL Editor to display some values.
For example, list all total runtimes of audiobooks, because sometimes I am looking for audiobooks that do not exceed a certain total runtime (e.g. because of traveling etc.)
Code: Select all
SELECT
Songs.IDAlbum, TrackType,
Author, Songs.Album ,
time(SUM(SongLength) / 1000, 'unixepoch' ) AS total_time
FROM
Songs
INNER JOIN Albums ON albums.ID = Songs.IDAlbum AND TrackType = 2
GROUP BY
Songs.IDAlbum
ORDER BY total_time DESC;
or list all date/time stamps from the
Played table of certain songs.
Code: Select all
SELECT Strftime('%Y/%m/%d %H:%M:%S', ( Julianday(playdate) + 2415018.5 ),
'localtime') AS plays
FROM played AS p
JOIN songs AS s
ON s.id = p.idsong
WHERE album = 'A Tribute To Jack Johnson'
AND songtitle = 'Yesternow';
Although the SQL editor is very handy, I would like to add some of the SQL queries to the CustomNodes.
But I am beginner in java script and just tried to paste the query into the sql album part in customNodesDefinitions.js. However it doesn't work unfortunately.
Where do you write the data: Playcounter, LastPlayed, SkipCounter, LastSkipped? Did you write an addon for this task?
Carsten
Re: [SOLVED] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag
Posted: Sun Nov 13, 2022 11:27 am
by Andre_H
sonos wrote: ↑Sun Nov 13, 2022 9:40 am
Did you write an addon for this task?
Basically Ludek and drakinite wrote it, I just put it together, but yes.

Send me a PM with an email address; I can send you this as a ZIP.