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: $meta(rating) or %rating%? Please explain like I'm five. (Read 1592 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

$meta(rating) or %rating%? Please explain like I'm five.

The tl;dr is: How should I set my ratings in Foorbar2000 (v.2)?

I'm so confused between the $meta(rating) and %rating%

I'm currently using this column:
$pad($repeat(★,$meta(rating)), 5,)

But I have these columns too that I keep half an eye on:
$pad($repeat(★,%rating%), 5,)
[%rating%]

The second two seem to give the same results (one with stars, the other with numbers).

But the first one (which is what I thought I should be using) gives different results.

regor's wonderful Playlist Manager reads the $meta(rating) version, which is what I want.

But ReFacets in Foobar's default UI reads the %rating% version.

I say 'version' as an almost random word, because I don't know why they are different.

If I use the built-in Filter in ReFacets
Name: Top rated tracks
Pattern: %rating% IS 5

it returns the wrong number of tracks. Well, it returns the amount of tracks that have %rating% set as 5, not the amount of tracks that have $meta(rating) set as 5

If I make an auto-playlist in Playlist Manager with the query
rating GREATER 4

it returns the correct number of tracks (tracks with $meta(rating) 5, not tracks with %rating% 5).
 
How did tracks get a different rating? Most of them are the same. Why are some different? And why does Playlist Manager do what I want, but Foobar2000 doesn't?

I've tried to understand all the talk about whether to use foo_playcount and how to add ratings, but it's just beyond me. I do have foo_playcount installed but I haven't done anything with it.

I currently set ratings using Keyboard Shortcuts and Quick Tagger. So a Keyboard Shortcut would look like:
Key: 2
Modifiers: Ctrl
Action: Tagging / Quick Tagger / Set <rating> to / 2

When I press Ctrl+2 the $meta(rating) column shows the rating as 5, but the two %rating% columns don't change. How did so many tracks get ratings put into %rating% if I've only been using the above Keyboard Shortcuts?

In the tracks' Properties window I only have one rating field:
Field name: RATING
and that seems to show the ratings that I set with Keyboard shortcuts just fine? So what's the difference between what's displayed in my $meta(rating) and %rating% columns and what's displayed in the RATING field in Properties. It's baffling, but I suspect I'm being dumb and someone can set me straight. Hope so.

I don't know whether I want to save my ratings to tags or not. I'd just like to have them available in other programs (although the the music player I'm currently using on my phone doesn't support ratings so I'm actually not that bothered about that at the moment). Oh, and my ratings don't show up in the rating column in mp3tag either. Any idea why?

What's going on? What should I be doing?

Thanks if you can help.



Re: $meta(rating) or %rating%? Please explain like I'm five.

Reply #1


(had to use a code block for copy/paste - this forum software breaks urls ending with a bracket)
Code: [Select]
https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Playback_Statistics_v3.x_(foo_playcount)

Specifically...

https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Playback_Statistics_v3.x_(foo_playcount)#Common_sources_of_confusion

Re: $meta(rating) or %rating%? Please explain like I'm five.

Reply #2
Thanks for replying but I'm miles off understanding this.

Quote
Please note that foo_playcount takes over %RATING%, %PLAY_COUNT%, and all other mappings corresponding to its native fields listed above, using these mappings to return the fields from its own database rather than from files themselves. If you want to display such fields from the tags of files rather than from the database, use $meta(rating) and so on in your title-formatting.

I am using $meta(rating).

I don't know if I "want to display such fields from the tags of files rather than from the database". I just want to set the rating and forget about it.

Why are the $meta(rating) and %rating% ratings different?

Why does a ReFacets Filter for 5-star tracks return a different set of tracks than Playlist Manager's 5-star auto-playlist?

Instead of pointing me to the docs which I've read, bewildered, dozens of times already, is anyone able to tell me what I should be doing?

Maybe I'm doing it right already? But why the anomalies? And why don't ratings show up in mp3tag?

Re: $meta(rating) or %rating%? Please explain like I'm five.

Reply #3
The Playback statistics component uses its own database to store the ratings and playback information by default, so it doesn't write directly to the audio files. That's why you dont see them in MP3tag (which is looking at the audio files). The component has an option you can turn on to write to the files themselves if you so desire. We can't tell you which method is better or worse, you have to decide that for yourself.

Keeping it in the component's DB means the statistics are centralized, so if for example you get a FLAC version of an album you already had in MP3 (usually) the statistics carry over. It's also easier to backup. The downside is this DB lives within and is only accessible from your foobar instance, ergo, compatibility with other software such as MP3tag is worse.

If you choose to write the playback statistics directly to the files, you get a lot of write operations which might wear down the underlying storage device faster. If you lose the files, the statistics are also lost with them. Backups are larger since you need to back up the actual tracks not just the metadata (the playback statistics). If you get the same album in FLAC, the statistics from the MP3 version won't (automatically) carry over. However, other programs like MP3tag can see the same information foobar sees in your files, which might be important to you. And so on.

The disparity between your views is because some display components use %rating% by default while others use $meta(rating) so they read either from the Playback Statistics' DB or the files themselves. In almost every case what is displayed can be adjusted, so whichever method you pick, you just have to make sure they all use either %rating% or $meta(rating) to have them display the same data.

Re: $meta(rating) or %rating%? Please explain like I'm five.

Reply #4
Are you saying facets gives different results than autoplaylists for "RATING IS 5"? (let's omit the rest of your doubts for a second) That is not intended. What about "%RATING% IS 5"?

$meta(rating) -> Files
%RATING% -> Database

Finally, this is in no way related to the manager. It just uses the native autoplaylist.

Point is, RATING GREATER 5 no longer works as %RATING% GREATER 5. Since according to the query reference, the field can not point to component provided fields and it fallbacks to $meta(rating) in such case XD. To me that's just another layer of nonsense and confusion, since all other fields work different.

So we have a query reference saying:
A IS xxx  = %A% IS xxx

But RATING IS 5 = "$meta(rating)" IS 5, both pointing to files
And %RATING% IS 5 , points to datatabase

Btw, your quicktagger actions are probably writing tags to files, while other components and the contextual menu writes [rating] tags to database... so you have a mix there.

Re: $meta(rating) or %rating%? Please explain like I'm five.

Reply #5
Are you saying facets gives different results than autoplaylists for "RATING IS 5"? (let's omit the rest of your doubts for a second) That is not intended. What about "%RATING% IS 5"?

$meta(rating) -> Files
%RATING% -> Database

Finally, this is in no way related to the manager. It just uses the native autoplaylist.

Point is, RATING GREATER 5 no longer works as %RATING% GREATER 5. Since according to the query reference, the field can not point to component provided fields and it fallbacks to $meta(rating) in such case XD. To me that's just another layer of nonsense and confusion, since all other fields work different.

So we have a query reference saying:
A IS xxx  = %A% IS xxx

But RATING IS 5 = "$meta(rating)" IS 5, both pointing to files
And %RATING% IS 5 , points to datatabase

Btw, your quicktagger actions are probably writing tags to files, while other components and the contextual menu writes [rating] tags to database... so you have a mix there.
Thanks. Brief look makes me even more confused, lol.

Got to get some sleep. Back to you soon.

Re: $meta(rating) or %rating%? Please explain like I'm five.

Reply #6
whether to use foo_playcount and how to add ratings, but it's just beyond me. I do have foo_playcount installed but I haven't done anything with it.
By the sounds of it, you have no use for foo_playcount ? You prefer to save ratings to tags? You're not sorting any playlists by %added% or %last_played% ? Do you have any need to see %play_count% for each track? If not, then you might as well just remove foo_playcount - all usage of %rating% will return to tags.

With foo_playcount installed: %rating% = database, $meta(rating) = tags

Without foo_playcount: %rating% and $meta(rating) = tags

(So without foo_playcount, any playlist column or Re/Facets filter using %rating% will look to tags and every result will be the same)

If you have tag -based ratings not showing up in MP3Tag that might be another issue related to file type / tag type. I've seen it mentioned but not sure what might be happening...

Re: $meta(rating) or %rating%? Please explain like I'm five.

Reply #7
Oh this is great, thank you.

I think I do want to use foo_playcount after all. I just haven't been using it yet. I'll come to that bit later, though.

With regard to
Quote
With foo_playcount installed: %rating% = database, $meta(rating) = tags
... So apparently ReFacets is using the foo-playcount database rather than the tags? Is that right?

That seems odd. If I'm rating my tracks, as I am now, using $meta(rating), then those are the ratings I've chosen and I want ReFacets to know that.

regor's Playlist Manager is reading the tags. If I do a query, rating IS 5, it finds the 5-star tracks as I'd expect. But when I use the built-in Filter in ReFacets for Top rated tracks, %rating% IS 5, it doesn't look for the tracks I've rated with Quick Tagger and $meta(rating) and returns a different set of tracks.

Oh hang on, maybe that's it. Do I have to change the ReFacets Filter to $meta(rating) IS 5? [EDIT: No, $meta(rating) IS 5 doesn't work. So what do I do?]

What I don't get is that the Rating bit in the tracks Properties panel is listed as Field name: RATING, but it shows my $meta(rating) ratings just fine. I don't seem to need to change that, so why should I need to change the ReFacets Filter? After all, regor's Playlist Manager also behaves as I want without me having to change anything.

Before I get onto what I should be doing now that I've decided that I do want foo_playcount, can you answer the above stuff please. Really grateful. Thanks.

Re: $meta(rating) or %rating%? Please explain like I'm five.

Reply #8
You should  read the documentation... most of your questions are usually already answered.
https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Query_syntax#Title-formatting

"$meta(rating)" IS 5

With quotes.

Re: $meta(rating) or %rating%? Please explain like I'm five.

Reply #9
Do I have to change the ReFacets Filter to $meta(rating) IS 5? [EDIT: No, $meta(rating) IS 5 doesn't work. So what do I do?

Yes, but it should be "$meta(rating)" IS 5 or rating IS 5 ... like regor said above, these point to tags.

(In query syntax, any title formatting functions starting with $ need to be in quotes)

Quote
What I don't get is that the Rating bit in the tracks Properties panel is listed as Field name: RATING, but it shows my $meta(rating) ratings just fine.

Yes, the Properties > Metadata tab will always show file tags. The Properties > Details tab is where it will show database info under the Playback Statistics heading.


 

Re: $meta(rating) or %rating%? Please explain like I'm five.

Reply #11
fb2k v2 users really should avoid the use of "$meta(blah)" in library queries. Using blah on its own should be much faster.


Thanks. Having read their comments, that's what I'd used anyway. Good to know why it's the right choice.