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: Mark recently added album as 'NEW' (Read 4485 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Mark recently added album as 'NEW'

How can I mark new music with some visual badge? Is it possible?
Currently I use Colums UI and Album list panel. I'd like to see every new entry in album list with badge 'NEW'. May be it possible with other extensions set? Thanks.

Re: Mark recently added album as 'NEW'

Reply #1
Hi there,

Yes it is possible, although I use Default UI and Facets for this and I just put an icon next to newly added albums.

(However I'm not sure the second component below works with Columns UI? Try it and see. CUI might have its own global variables with current date info as someone mentioned here that you could use instead. I'm not familiar enough with CUI to know how that works so someone else might help there)

Firstly you need foo_playcount (Playback Statistics) which adds the %added% field (date added to the library). Note, if you do not have this component already, the %added% dates for EVERY track will be the same the first time you install it - see documentation here. Once you add new tracks the field will be correct going forward.

Secondly, I think default foobar does not have a way to access the current date/time (like a $now() function), so for that get foo_dynfil (Dynamic Fields). Install as usual. In foobar File menu > Preferences > Media Library > Dynamic Fields, click the plus button and name the field "new" (without quotes), click OK, then under 'Title formatting expression' put -
Code: [Select]
$date_diff(%added%)
Then click OK and I think you have to restart foobar at this point.

Finally just add this bit of title formatting to your Album List (File > Preferences > Media Library > Album List > Views) or (Facets > Columns), I personally put it after the %album% field -
Code: [Select]
%album%$ifgreater(%_new%,30,,  $char(57803))
The number '30' is how many days you want it to be considered "new". The '$char(57803)' part is the icon / font symbol I use from Segoe UI Symbol font (looks like a little tag, like on new clothes :D ), you can replace that with just "NEW" if you want although using an icon is more eye catching. If you want a different icon or use a different font, you could pick one from this handy page, click one to copy and paste. Lastly, note that if you swap %album% for %artist% the view will split the artist into two entries (old tracks and new tracks), this is why I use %album% instead as it can only be one or the other, but your choice.

Side note: I use a similar code to tag icons on to Podcasts, Music Videos, Internet Radio streams, etc -
Code: [Select]
%<genre>%$if($strstr(%genre%,Podcast),  $char(57814),)

Cheers 8)

Re: Mark recently added album as 'NEW'

Reply #2
Thank you very much! I will try as soon as I have more time.

Re: Mark recently added album as 'NEW'

Reply #3
A simpler solution is to make an autoplaylist with the following query, eg.: %last_modified% DURING LAST 8 WEEKS

Re: Mark recently added album as 'NEW'

Reply #4
A simpler solution is to make an autoplaylist with the following query, eg.: %last_modified% DURING LAST 8 WEEKS
Yeah I thought I mentioned an auto-playlist in the post above but must have edited it out.

One thing I would revise is to use a better, more descriptive name for the dynamic field (as the component mentions when you add one) - something like "Days Since Added" or "Days In Library" shows up better in track properties.

Cheers :)

Re: Mark recently added album as 'NEW'

Reply #5
Hi again. I followed anamorphic's instructions, and I did succeed. But one thing is broken now. To mark favourite tracks I use hotkey that writes rating tag into music files. Script presented on the screenshot displays star symbol in the column if some track has rating tag in it. But that script has stopped working after I installed foo_playcount  extension. Can someone help me to fix it? Thanks!
 .JPG 86.59 KB, 871x667 - viewed 316 times

Re: Mark recently added album as 'NEW'

Reply #6
I'm not sure about this but doesn't foo_playcount take over the %rating% tag?
Try changing it to:
Code: [Select]
$ifequal($meta(rating),1,★,)


Re: Mark recently added album as 'NEW'

Reply #8
Hi again. Last request please :-[
Can someone help me make custom view for foo_uie_album list that would display only recently added albums?
 .JPG 99.59 KB, 869x671 - viewed 355 times

Re: Mark recently added album as 'NEW'

Reply #9
Hi again,

I've never used Album List Panel but the documentation has examples for adding sources. You could probably just use the same $if string from my first post above, something like -

$ifgreater(%_new%,30,,%date%)|%album artist%|%album%

- maybe? Change it depending on how you want the tree structure to look, just experiment.

Cheers :)

Re: Mark recently added album as 'NEW'

Reply #10
Sorry, not working.  :(
 .JPG 50.60 KB, 416x868 - viewed 298 times

Re: Mark recently added album as 'NEW'

Reply #11
Oh, because the $if then else statement returns both old and new albums. I'm not sure how best to do that, then, sorry. You can still just use an auto-playlist search to do the same thing though.


Re: Mark recently added album as 'NEW'

Reply #13
Put all title formatting string within the brackets:
Code: [Select]
$ifgreater(a,b,,<title fomratting string>)
Sorry, but as anamorphic said that code returns all albums.

 

Re: Mark recently added album as 'NEW'

Reply #14
Have you tried it? This is exactly to prevent showing all albums.


Re: Mark recently added album as 'NEW'

Reply #16
Yes. I have tried this
Code: [Select]
$ifgreater(%_new%,30,,%album artist%|%album%)

Your code is working fine for me. You can modify and try it with some other existing tag{s} to make sure it is working. For e.g. this code will show only the albums where the date is greater than 2017, assuming all files are correctly tagged.

Code: [Select]
$ifgreater(2018,%date%,,%date%|%album%)

Re: Mark recently added album as 'NEW'

Reply #17
Your code is working fine for me.
Does that code show only recently added albums? What am I doing wrong, then?  :(

Re: Mark recently added album as 'NEW'

Reply #18
Code: [Select]
$ifgreater(%_new%,30,,%album artist%|%album%)
Hey - mgpai is right, that does indeed work. (Although my playlist sorting is mucked up)

Serj, remember if you only recently installed Playback Statistics within 30 days or so, every album gets the same %added% date initially. The above is testing for 30 days, maybe try it with less.

Re: Mark recently added album as 'NEW'

Reply #19
... that does indeed work. (Although my playlist sorting is mucked up)

Use preferred sort order in the same string.

Examples:
Code: [Select]
$ifgreater(%_new%,30,,%album artist%|%date% %album%|%path_sort%)
$ifgreater(%_new%,30,,%album artist%|%date% %album%|%disc%%track% %title%)

Re: Mark recently added album as 'NEW'

Reply #20
Thanks, mgpai! :)

I use Facets for everything so I'm not used to Album List and thought it would obey sorting in preferences, but good to know.

Re: Mark recently added album as 'NEW'

Reply #21
Yes, sorry, that really work. Instead of 30 days I set 7 and now everythins is good. Thank you all very much!