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

Unplayed Albums

Is there a method to display any album that has none of it's tracks played?

 

Unplayed Albums

Reply #1
It's only possible to show tracks that has not been played yet. unfortunately, you can't query the database albumwide or artistwide.

maybe, if you use columns ui you could use foo_playlist_tree_mod. I didn't use this component, but it's predecessor, foo_playlist_tree could query albumwide/artistwide/genrewide and so on. Actually, it didn't query the database for that, but it's own nested results (query in query).

Unplayed Albums

Reply #2
Add the "Played" statistics column to an album pane in foo_facets
elevatorladylevitateme

Re: Unplayed Albums

Reply #3
Is there a method to display any album that has none of it's tracks played?

Reviving an old question...

I can get the albums displayed in a playlist column or facets (re: Shakey above) but is there currently a way to do this which is autoplaylist compatible?

I tried
Library > album list > filter by %last_played_enhanced% MISSING

but results are still track based and not album grouped.

Re: Unplayed Albums

Reply #4
I can get the albums displayed in a playlist column or facets (re: Shakey above) but is there currently a way to do this which is autoplaylist compatible?

I tried
Library > album list > filter by %last_played_enhanced% MISSING

but results are still track based and not album grouped.
"Library Tree" album list can apply filters and maintain album grouping, it already has a 'never played' preset.

Re: Unplayed Albums

Reply #5
is there currently a way to do this which is autoplaylist compatible?

Nope. That will always be track based.

I guess facets can't handle %last_played_enhanced% field so trying the Library Tree suggestion above might be your easier route (assuming customising the playcount field is easy and doesn't require editing the script).

foo_uie_sql_tree or the murky world of scripting with Spider Monkey Panel/JScript Panel are the harder ways to do it!

Re: Unplayed Albums

Reply #6
Thanks to you both...

"Library Tree" album list can apply filters and maintain album grouping, it already has a 'never played' preset.

I tried this and it is still track based - results are all albums with the played tracks removed.

I'm trying to remove an album from results if it had any played tracks.

Re: Unplayed Albums

Reply #7
Here's a script for JScript Panel that generates a static playlist containing albums with no plays. Customise the fields at the beginning to suit. It might work with SMP but not tested. just remembered it won't work with SMP

It's a plain white panel and you double click to execute the code. Obviously it's just an example of what is possible, not meant for full time usage.

Code: [Select]
var group_by = "%album artist%|%album%|%date%";
var filter_by = "album PRESENT";
var playcount = "$if2(%last_played_enhanced%,0)"; // must evaluate to zero for unplayed tracks

///////////////////////////////////

var tfo = {
group_by : fb.TitleFormat(group_by),
order_by : fb.TitleFormat(group_by + "|%discnumber%|%tracknumber%"),
playcount : fb.TitleFormat(playcount),
}

function on_mouse_lbtn_dblclk() {
var items = fb.GetQueryItems(fb.GetLibraryItems(), filter_by);
items.OrderByFormat(tfo.order_by, 1);
var album_list = fb.CreateHandleList();
var to_add = fb.CreateHandleList();
var current = "";
var good = true;

for (var i = 0; i < items.Count; i++) {
var item = items.Item(i);

var tmp = tfo.group_by.EvalWithMetadb(item);
if (tmp != current) {
if (good && album_list.Count) {
to_add.AddRange(album_list);
}

album_list.RemoveAll();
good = tfo.playcount.EvalWithMetadb(item) == 0;
if (good) album_list.Add(item);
current = tmp;
} else {
if (tfo.playcount.EvalWithMetadb(item) == 0) {
if (good) album_list.Add(item);
} else {
if (album_list.Count) album_list.RemoveAll();
good = false;
}
}
}
if (to_add.Count) {
var p = plman.CreatePlaylist(plman.PlaylistCount, "Albums with no plays");
plman.ActivePlaylist = p;
plman.InsertPlaylistItems(p, 0, to_add);
}
}

Re: Unplayed Albums

Reply #8
Here's a script for JScript Panel that generates a static playlist containing albums with no plays.

Very nice - works well. Is there a mod to generate autoplaylist? ;)

Re: Unplayed Albums

Reply #9
Nope. No amount of scripting trickery can do that. What it is doing is looping over every track in the library and evaluating on a per track basis and keeping track of what the current state is for every track belonging to the same album - something not possible with standard title formatting.

I suppose it is possible to create a fake autoplaylist in the sense it clears and updates itself whenever playcounts change but playing from the playlist would be probematic because the focused/playing track would be lost each time.