Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Playback Statistics in seconds? (Read 2937 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Playback Statistics in seconds?

Is it possible to access things like %added% or %last_played% as simple integer (e.g. seconds since 1970), or would I have to convert the strings returned by "format_title"?

Playback Statistics in seconds?

Reply #1
They're already in that type of format.
Right click on a song > Playback Statistics > write statistics to file tags
Once you've done that you'll see the timestamp format that the data is stored in.
Quote
A file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC)

There are 10,000,000  100-nanosecond-intervals in every second.

Hope that helps.

C.

EDIT: ps. What are trying to achieve? (no. of secs since 1970 doesn't seem too useful on its own)
PC = TAK + LossyWAV  ::  Portable = Opus (130)

Playback Statistics in seconds?

Reply #2
I want to write an intelligent shuffle, aka auto dj or party mode, which prioritizes tracks based on genre, age, rating, last played, bpm etc.
So writing to tags is not helpful, but since the data seems to be stored this way in RAM, is it not possible to directly read it from the Playback Statistics component?

Playback Statistics in seconds?

Reply #3
To some extent (and perhaps entirely, though I'm not quite sure what you have in mind) this can already by done with, for example:C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

Playback Statistics in seconds?

Reply #4
Yeah, I've currently set up a solution with random pools, but you need a lot of pools and adjustments because of different pool sizes.
It's for an online radio, but even if you don't stream, it could be used to hear your own "offline radio".
What I have in mind is calculate a priority rating for each track, and then pick one or a few by taking random numbers out of the sum of all ratings.
I guess I'll keep my own age data and just update the last played track.

 

Playback Statistics in seconds?

Reply #5
You may be able to get around the pool sizes issue, simply by querying the whole library. So the pool can be %any made up bit of titleformatting that hasn't been used yet%, and then a sophisticated query (I've not used the proper query language, but just to give an idea):

(BPM > x) AND (RATING > Y) AND (NOT PLAYED DURING LAST 3 WEEKS) AND (GENRE HAS X) OR (GENRE HAS Y) etc etc

Furthemore, you could have variations and then limit the number of tracks to very few, so it's always providing random picks. The only problem here is how to avoid duplicates, but that can be partly avoided by having many possibly non-overlapping queries.

Anyway, I'm sure you've thought about it plenty, but pool size needn't be a factor (I'd have thought ???).

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)