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: Foobar2000 Wrapped (Read 5953 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Foobar2000 Wrapped

Reply #50
And that's the problem.

I can either just limit listens to a single configurable tag and discard the others or deduplicate all values with some kind of heuristics.
I will see. I will need you to test it, since I don't have any track with lastfm listens...

Re: Foobar2000 Wrapped

Reply #51
And that's the problem.

I can either just limit listens to a single configurable tag and discard the others or deduplicate all values with some kind of heuristics.
I will see. I will need you to test it, since I don't have any track with lastfm listens...

No problemo.

Re: Foobar2000 Wrapped

Reply #52
Ok, current algorithm will consider a duplicate any listen equal to another one within a 3 secs window.

It should only try to deduplicate when there are last.fm listens, otherwise it just considers all of them (and does not affect performance for other users).

Check the repository. Seems to work fine with an array of dates, check it with your library. (probably all your listening times will be halved)

Re: Foobar2000 Wrapped

Reply #53
Ok, current algorithm will consider a duplicate any listen equal to another one within a 3 secs window.

It should only try to deduplicate when there are last.fm listens, otherwise it just considers all of them (and does not affect performance for other users).

Check the repository. Seems to work fine with an array of dates, check it with your library. (probably all your listening times will be halved)

Jesu - Falling From Grace
["2015-06-03 20:36:42", "2023-03-06 19:08:35", "2023-03-06 19:32:46", "2023-03-06 19:40:09"]  |||  ["2015-06-03 20:44:01", "2023-03-06 19:15:55", "2023-03-06 19:27:51", "2023-03-06 19:40:10"]

Ageless Oblivion - All Was Froze
["2023-05-20 09:01:43", "2023-05-20 09:09:44"]  |||  ["2023-05-20 09:01:53", "2023-05-20 09:09:47"]

Aviador Dro 4000 - Vivir Para Morir

["2023-02-10 14:42:28", "2023-04-25 13:50:59"]  |||  ["2023-02-10 14:42:40", "2023-04-25 13:51:00"]

There is some of them with 12 seconds
The totals have been cut a lot

Re: Foobar2000 Wrapped

Reply #54
Since historical last.fm times are most likely to predate listens generated by foo_enhanced_playcount, I simply count all last.fm data up until the very first play recorded by the component. After that, I'd count component listens only.

Re: Foobar2000 Wrapped

Reply #55
Since historical last.fm times are most likely to predate listens generated by foo_enhanced_playcount, I simply count all last.fm data up until the very first play recorded by the component. After that, I'd count component listens only.
That could do too, but then there could be situations where people play things on the phone and there would also be valid last.fm times posterior to first play by the component (if they are imported)

It's fine for me to allow a bigger time window, but anyway this is just starting to be a last.fm quirk and how listens are scrobbled which is not something on my side. Will put a 30 secs window and it's done for me.

EDIT: finally added support for foo_skipcount https://hydrogenaud.io/index.php/topic,124741
Right now is only used to calculate the score for a single character, the "hunter".:"You\'re always searching for new favorites. You skip tracks more than other listeners. Maybe it\'s the thrill of the chase?' "

But maybe there is also interest in adding skip stats to the report?

Re: Foobar2000 Wrapped

Reply #56
Since historical last.fm times are most likely to predate listens generated by foo_enhanced_playcount, I simply count all last.fm data up until the very first play recorded by the component. After that, I'd count component listens only.
That could do too, but then there are also situations where people is playing things on the mobile and therefore there would be also valid last.fm times posterior to first play on component.

It's fine for me to allow a bigger time window, but anyway this is just starting to be a last.fm quirk and how listens are scrobbled which is not something on my side. Will put a 30 secs window and it's done for me.

Below that, last.fm doesn't record the song, so seems safe....

Re: Foobar2000 Wrapped

Reply #57
One question.

the %played_times% is from the internal component, right?

If I did a reset statistic in all files....why is this data still there?

Re: Foobar2000 Wrapped

Reply #58
Played times comes from enhanced playcount. I have zero idea what reset statistics does for specific tags or where it comes from.

EDIT: updated the repository with latest changes.

Re: Foobar2000 Wrapped

Reply #59
Played times comes from enhanced playcount. I have zero idea what reset statistics does for specific tags or where it comes from.

Ok, is from the last.fm component.

It reset the statistic that record Playback Statistics v3.x (foo playcount). The one that Peter introduced in v2 or in the transition, doesn't remember well

Is correct, the only tag from that one that i have are from the album I listen today, after the reset.

So I reset the statistic for nothing XD. At least I made a backup before.

Re: Foobar2000 Wrapped

Reply #60
but then there could be situations where people play things on the phone and there would also be valid last.fm times posterior to first play by the component (if they are imported)

Fair point. I've never scrobbled from any other device. My phone is very much offline only. :P

Re: Foobar2000 Wrapped

Reply #61
Seems pretty good to me.

Only remains the day with a lot of hours that belong to the previous one.


Re: Foobar2000 Wrapped

Reply #62
Quote
Only remains the day with a lot of hours that belong to the previous one.
Is that my fault or something related to tagging?



Now adding key, bpm and mood stats and a few missing characters related to that ('vampire' and 'luminary').

Re: Foobar2000 Wrapped

Reply #63
I mean that the repot take a month forward. For example In the 2024 it gives values to march, for example it says special day March 17 and the artist graphs have an offset month too.

Re: Foobar2000 Wrapped

Reply #64
I mean that the repot take a month forward. For example In the 2024 it gives values to march, for example it says special day March 17 and the artist graphs have an offset month too.
That was already fixed ?

Nevermind, dates were not being parsed right at tag values due to months being 0-11 in js and 1-12 in tags...

 

Re: Foobar2000 Wrapped

Reply #65
That was already fixed ?

Nevermind, dates were not being parsed right at tag values due to months being 0-11 in js and 1-12 in tags...

Fixed now.

I noticed that in the country report Los Deltonos have 92 listens, they are from Spain. They have more listens than the United Kingdom's combine, but Spain doesn't show up in the countries report.

All Los Deltonos' songs have LOCALE LAST.FM tag, "Cantabria; Spain" from the biography panel

Seems multivalue, respond to $meta 0,1, but I doesn't have it in the advanced preferences multivalue, so it must be how is written by biography

setting genre tag remap to STYLE I get a crash

Code: [Select]
Error: Spider Monkey Panel v1.6.1-mod ({341046C8-56E8-4AC9-8E11-E25A8789D068}: Playlist Tools: Buttons Bar v1.0.0 by regorxxx)
Wrapped.getGenreImg: group not recognized downtempo_cluster

File: wrapped.js
Line: 1362, Column: 11
Stack trace:
  getGenreGroupImg@wrapped.js:1362:11
  getMainGenreGroupImg@wrapped.js:1377:15
  getMainGenreImg@wrapped.js:1623:42
  formatLatexReport@wrapped.js:1770:53
  createPdfReport/<@wrapped.js:1577:17

Re: Foobar2000 Wrapped

Reply #66
That was already fixed ?

Nevermind, dates were not being parsed right at tag values due to months being 0-11 in js and 1-12 in tags...

Fixed now.

I noticed that in the country report Los Deltonos have 92 listens, they are from Spain. They have more listens than the United Kingdom's combine, but Spain doesn't show in the counties report.

All Los Deltonos' songs have LOCALE LAST.FM tag, multivalue "Cantabria; Spain" from the biography panel

Edit: The tag have a ; but it is not multivalue.
Locale tags are not used. You must have the track on the world map library.

Re: Foobar2000 Wrapped

Reply #67

Locale tags are not used. You must have the track on the world map library.

Merge file tags to JSON?

Answering myself, yes, now Spain is the second country.

So the best is to write the tags at playback in the JSON database and let the file tags to biography, right?

Re: Foobar2000 Wrapped

Reply #68
Yes. write to json. It will be the default option on new installations from now on and document it on wrapped installation instructions.

If your files have the tag, you don't really need to start playback, just scroll through all tracks. Or use the merge tags to JSON as you did.

If tag is retrieved from bio, preview all tracks for 1 o 2 secs and done.

Note you don't need to preview "all" tracks, just 1 track per artist. Such playlist is created with the "find artist without locale..."

There are multiple scripts using the JSON database, so it's useful to fill it. You have multiple scoring and filter options per country in search by distance with it for ex. Worldmap also comes with a pre-bundled database by default (and if people share their json file, I can add those artists to it).

I may add more code to merge file tags (if present) with the world map JSON for wrapped. But it has zero priority for me.

EDIT: Updated readme, let me know if it's clear enough.
Spoiler (click to show/hide)

Re: Foobar2000 Wrapped

Reply #69
Yes. write to json. It will be the default option on new installations from now on and document it on wrapped installation instructions.

If your files have the tag, you don't really need to start playback, just scroll through all tracks. Or use the merge tags to JSON as you did.

If tag is retrieved from bio, preview all tracks for 1 o 2 secs and done.

Note you don't need to preview "all" tracks, just 1 track per artist. Such playlist is created with the "find artist without locale..."

There are multiple scripts using the JSON database, so it's useful to fill it. You have multiple scoring and filter options per country in search by distance with it for ex.

I may add more code to merge file tags (if present) with he JSON for wrapped. But it has zero priority for me.

EDIT: Updated readme, let me know if it's clear enough.
Spoiler (click to show/hide)

Seems pretty clear to me.

Did you notice the crash report some posts above?, I added it after you reply.

Re: Foobar2000 Wrapped

Reply #70
Nope, thanks.
Fixed, was a upper case typo

Can not update github but if you want to fix it locally, just substitute the 'getGenreGroupImg' function around line 1362 at wrapped.js with this one (only changes 2 values to lower case):
Code: [Select]
getGenreGroupImg: function (group, root = this.basePath, bRelative = true) {
group = group.toLowerCase();
let fileName = '';
switch (group) {
case 'industrial_cluster':
case 'metal_cluster':
case 'rock_cluster':
case 'pop_cluster':
case 'country_cluster':
case 'r&b_cluster':
case 'blue_note_cluster':
case 'jamaican_cluster':
case 'rap_cluster':
case 'downtempo_cluster':
case 'folk_cluster':
fileName = group.replace(/([_&])|(cluster)/g, '');
break;
case 'breakbeat dance_cluster':
fileName = 'breakbeat';
break;
case 'four-to-the-floor dance_cluster':
fileName = 'fourfloor';
break;
case 'classical music_cluster':
fileName = 'classical';
break;
default:
throw new Error('Wrapped.getGenreImg: group not recognized ' + group);
}
return (bRelative ? '' : root) + 'img\\genres\\' + fileName.replace(/ /g, '') + '.png';
}

Re: Foobar2000 Wrapped

Reply #71
Nope, thanks.
Fixed, was a upper case typo

Can not update github but if you want to fix it locally, just substitute the 'getGenreGroupImg' function around line 1362 at wrapped.js with this one (only changes 2 values to lower case):
Code: [Select]
getGenreGroupImg: function (group, root = this.basePath, bRelative = true) {
group = group.toLowerCase();
let fileName = '';
switch (group) {
case 'industrial_cluster':
case 'metal_cluster':
case 'rock_cluster':
case 'pop_cluster':
case 'country_cluster':
case 'r&b_cluster':
case 'blue_note_cluster':
case 'jamaican_cluster':
case 'rap_cluster':
case 'downtempo_cluster':
case 'folk_cluster':
fileName = group.replace(/([_&])|(cluster)/g, '');
break;
case 'breakbeat dance_cluster':
fileName = 'breakbeat';
break;
case 'four-to-the-floor dance_cluster':
fileName = 'fourfloor';
break;
case 'classical music_cluster':
fileName = 'classical';
break;
default:
throw new Error('Wrapped.getGenreImg: group not recognized ' + group);
}
return (bRelative ? '' : root) + 'img\\genres\\' + fileName.replace(/ /g, '') + '.png';
}

Okis.

Now looks pretty accurate, all results match with the data I have locally and in last.fm. The day without data that showed a lot of listens is now correct, it was simply one month off.

I don't see anything strange now.



Re: Foobar2000 Wrapped

Reply #73
There are a few small errors (like '&' not being shown on the Sound city stats' artists), but they will be updated later.

Re: Foobar2000 Wrapped

Reply #74
In the style field an improvement will be one line per data in the page that show best tracks,

                     Track title
Photo-----    Artist
                     # listens