Music 'Most played in...' on home always wrong month

Bit of a strange one, when in the recommended tab of my Music library, the 'Most played in ’ is always out of date.

Despite it being January, it’s still saying ‘Most Played in August’:
image

The songs listed are correct, but it’s supposed to show the last month, not just forever say August (which is around when I first installed the server). Occasionally it’ll randomly say the correct month, but always eventually goes back to August. Very strange.

A while ago when custom filters were broken, then fixed it randomly came back to life, then died again.

This happens on all the players that I have (Windows, Mac, Web, iOS), it always goes back to ‘Most Played in August’.

Plex Media Server Version: Version 1.18.4.2171
Running on Ubuntu Server 18.04

This hub is not supposed to show you the current month. It only serves as a reminder what kind of music was important to you in the past. And it will pick a random period of time.
Just for those times when you don’t have an idea what to play next.

Ah! That certainly makes more sense! Thanks for clearing that up.

With that in mind, is there a way of doing creating a “Most played in … X” using custom filters at all? I’ve been struggling to find a way to find out what was most played in a given month.

It seems that the server knows the appropriate information and it’d be awesome to get that out somehow (as you can create a Smart Playlist from the Home/Recommended tab).

Sure, you could do this:


(which you can turn into an (auto-updating) smart playlist, just by clicking on the ‘Add to Playlist’ icon)
The key here is to add the column ‘Plays’ (using the encircled ellipsis) and to click twice on the header of this column to sort the list after number of Plays in reverse order.

If you want a selectable time period, it gets a bit more complicated. You could either add another condition which contains ‘not in the last’ x [time period]
or you define an actual date in a condition that says
‘Track Last Played’ ‘is before’ [date]
and/or
‘Track Last Played’ ‘is after’ [date]

But the latter is rather static. And since you currently cannot edit smart playlists, you will have to create more and more smart playlists for each time period of interest.

If you only want to have a look at some statistics, I recommend you to install Tautulli.

Or simply go to the Dashboard
(Web app, at the top, ‘Activity’ icon)

1 Like

This is great, thanks so much for the detailed reply! It get’s pretty close, but if the song is played more recently it’s then filtered out, so doesn’t properly work as a ‘Most played in X month’, if it’s then played later.

For example, the ‘Most Played in August’ playlist that’s generated by Plex for the Home screen includes things that I’ve played again recently (like the Katy Perry track shown in the screenshot), but it unfortunately get’s filtered out of those rules as it’s played again recently.

Out of idle curiosity, I created the Smart playlist from the home ‘Most Played in August’ section, then downloaded a copy of my database and began a little digging. I’ve found what I presume to be the playlist listed in the “play_queue_generators” table. What makes it stand out to me is the ‘uri’, which is quite different from eveything else:

library://x/directory/%2Fhubs%2Fsections%2F1%2Fpopular%3FmonthsAgo%3D5

This suggests to me that it’s generating the playlist based on popular tracks from 5 months ago, which would line up with August. I honestly don’t know enough about how Plex and databases work, but if I’m correct, is there a way of me pushing a playlist to be created with a specific string/uri? I’ve used this to import playlists without too many issues, would you happen to know if the API elan is talking about here is also capable of creating smart playlists with custom strings and filters?

It’d be awesome to have a built in filter for ‘most played between X and Y’ implemented in the native Plex GUI.

I’ll get Tautulli installed, as I’d love to dig a little further into the stats!

Thanks so much for your help!

I’m pretty sure the API can do a lot more, yes. You can get an occasional glimpse if you try out plexamp.com, which is the testbed for these things.
Stay tuned for the next public release of that one.

You can also give this a read for inspiration [TIP] [MUSIC] --- how to create an autoplaylist with random sort

Oh awesome, I’m a heavy plexamp user already, didn’t realise it was the testbed for new and interesting things to come! I’ll spend some more time poking and prodding at it. Are there any public docs for the API at all?

I shall keep my eyes peeled for any new releases!

That post looks very interesting, I shall spend a bit of time seeing what I can get Plex to do there too.

Thanks again!

Unfortunately not.

That’s a shame, not to worry! Thanks for letting me know. :grinning:

Quick follow up on your inspiration, found a way to get any months most played!

When using the Plex Web App, if you go to the hub on the home page/recommended tab, then open it fully by clicking it’s name (so clicking on wherever it says ‘Most Played in XXX’) you can then manipulate the URL to make it show you other months.

I have made the parts of the URL we need to pay attention bold below (please note sensitive parts of the URL have been omitted):

…/com.plexapp.plugins.library?key=%2Fhubs%2Fsections%2F1%2Fpopular%3FmonthsAgo%3D1&type=album&title=Most%20Played%20in%20December&context=discover%3Amusic.popular.1&source=%2Fhubs%2Fsections%2F1

By changing the numerical digit for ‘FmonthsAgo’ and the title to be the correct month, we can then get the month of our choosing!

So for example, if I wanted to see Novembers most played, I would change the URL to this:

…/com.plexapp.plugins.library?key=%2Fhubs%2Fsections%2F1%2Fpopular%3FmonthsAgo%3D2&type=album&title=Most%20Played%20in%20November&context=discover%3Amusic.popular.1&source=%2Fhubs%2Fsections%2F1

Changing the month isn’t strictly speaking necessary, if you just change the ‘FmonthsAgo’ the tracks will be updated correctly, life just gets pretty confusing otherwise! You can change the title to anything really, or just leave it as it is if you just want to pull the tracks out of it.

One thing to bear in mind with creating smart playlists from these is that they seem to behave a little strangely, being much larger than the original ‘Most played in XXX’ hub, I presume because it displays everything as albums. I’ve not looked into too much detail as to why they behave the way they do though.

Either way, a cool way to jump to any month of your ‘Most Played in XXX’!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.