[SOLVED] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag

Get help for different MediaMonkey 5 Addons.

Moderators: jiri, drakinite, Addon Administrators

Andre_H
Posts: 415
Joined: Thu Jan 21, 2021 2:04 pm
Location: Germany

Re: [SOLVED] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag

Post by Andre_H »

Can confirm that the thread does not need to be set to [REQ] again! :wink:
Tested on .2416, works fine.
- MMW 5.0.4.2690 (non-portable, shared DB & files) on Windows 2016 # only essential addons # my 24/7 media server
- MMW MMW 5.0.4.2690 (non-portable, shared DB & files) on Windows 10 # playing, testing skins & addons # my desktop app
- MMA Pro (2.0.0.1063) on Android 10, 11, 12 Phones & Tabs # WiFi Sync # playing

- MP3Tag, MP3Diags, MP3DirectCut, IrfanView
sonos
Posts: 171
Joined: Wed Aug 07, 2013 11:54 am

Re: [SOLVED] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag

Post 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
Andre_H
Posts: 415
Joined: Thu Jan 21, 2021 2:04 pm
Location: Germany

Re: [SOLVED] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag

Post 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" ... ;-)
- MMW 5.0.4.2690 (non-portable, shared DB & files) on Windows 2016 # only essential addons # my 24/7 media server
- MMW MMW 5.0.4.2690 (non-portable, shared DB & files) on Windows 10 # playing, testing skins & addons # my desktop app
- MMA Pro (2.0.0.1063) on Android 10, 11, 12 Phones & Tabs # WiFi Sync # playing

- MP3Tag, MP3Diags, MP3DirectCut, IrfanView
sonos
Posts: 171
Joined: Wed Aug 07, 2013 11:54 am

Re: [SOLVED] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag

Post 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
Andre_H
Posts: 415
Joined: Thu Jan 21, 2021 2:04 pm
Location: Germany

Re: [SOLVED] Addon to save Playcounter, LastPlayed, SkipCounter, LastSkipped to tag

Post 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.
- MMW 5.0.4.2690 (non-portable, shared DB & files) on Windows 2016 # only essential addons # my 24/7 media server
- MMW MMW 5.0.4.2690 (non-portable, shared DB & files) on Windows 10 # playing, testing skins & addons # my desktop app
- MMA Pro (2.0.0.1063) on Android 10, 11, 12 Phones & Tabs # WiFi Sync # playing

- MP3Tag, MP3Diags, MP3DirectCut, IrfanView
Post Reply