Skip to main content

Topic: Problem With Recently Added (Read 3288 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • db78
  • [*][*][*]
Problem With Recently Added
I made a playlist of recently added songs based on what people told me in this thread. It works almost perfectly. It does list all the recently added music, but the playlist is out of order. For example I add an Aerosmith CD to my playlist by using the file operations. When I go into the recently added playlist, all tracks aren't listed under the same entry, it's scattered around.



I want it so all the songs under the same album are listed under the same album in order of tracknumber, and not scattered around.

query
Quote
%date added% HAS "-" AND "$cwb_datediff(%date added%,%cwb_systemdate%)" LESS 4


sort
Quote
$sub(99999999999999,$replace(%last_played%,'-',,':',,' ',))


thanks!

  • kanak
  • [*][*][*][*][*]
Problem With Recently Added
Reply #1
Your problem is that you're sorting by last_played instead of date added.

If you want it to be chronological, i'd suggest:
Code: [Select]
$sub(99999999999999,$replace(%date added%,'-',,':',,' ',))

Note: For a better measure, you might want to crop the date added so that it drops the "seconds" part of the value (e.g. just 2007-01-10 03:21 instead of 2007-01-10 03:21:20). Then ALSO sort by artist and album:
Code: [Select]
$sub(999999999999,$replace($left(%date added%,$sub($len(%date added%),2)),'-',,':',,' ',)),%artist%,%album%
  • Last Edit: 22 April, 2007, 01:13:53 PM by kanak

  • db78
  • [*][*][*]
Problem With Recently Added
Reply #2
Your problem is that you're sorting by last_played instead of date added.

If you want it to be chronological, i'd suggest:
Code: [Select]
$sub(99999999999999,$replace(%date added%,'-',,':',,' ',))

Note: For a better measure, you might want to crop the date added so that it drops the "seconds" part of the value (e.g. just 2007-01-10 03:21 instead of 2007-01-10 03:21:20). Then ALSO sort by artist and album:
Code: [Select]
$sub(999999999999,$replace($left(%date added%,$sub($len(%date added%),2)),'-',,':',,' ',)),%artist%,%album%


I tried using the second code. Now it's sorted by alphabetical order and not chronological, but at least the tracks are together now.

  • buktore
  • [*][*][*][*][*]
Problem With Recently Added
Reply #3
the first code should do the trick if you add the whole album at the same time.

try this. newly added should be at the top.

Quote
$sub(999999999999,$replace($left(%date added%,$sub($len(%date added%),2)),'-',,':',,' ',))


and thanks to kanak. dropping the seconds part seem to make my autoplaylist update faster.
  • Last Edit: 22 April, 2007, 10:51:08 PM by buktore

  • db78
  • [*][*][*]
Problem With Recently Added
Reply #4
the first code should do the trick if you add the whole album at the same time.

try this. newly added should be at the top.

Quote
$sub(999999999999,$replace($left(%date added%,$sub($len(%date added%),2)),'-',,':',,' ',))


and thanks to kanak. dropping the seconds part seem to make my autoplaylist update faster.


Sweet I got it to organize by album, the only problem now is that the newly added albums are at the bottom of the playlist, is there a way to make it at the top? Also under each album, the tracks aren't in order. I'm guessing foobar doesn't add the tracks in order, but is there a way to have them sorted in order within each album?
  • Last Edit: 03 May, 2007, 09:59:14 PM by db78

  • kanak
  • [*][*][*][*][*]
Problem With Recently Added
Reply #5

the first code should do the trick if you add the whole album at the same time.

try this. newly added should be at the top.

Quote
$sub(999999999999,$replace($left(%date added%,$sub($len(%date added%),2)),'-',,':',,' ',))


and thanks to kanak. dropping the seconds part seem to make my autoplaylist update faster.


Sweet I got it to organize by album, the only problem now is that the newly added albums are at the bottom of the playlist, is there a way to make it at the top?


That's strange. The $sub thing should make the latest added files appear at the top. Could you post your sort string? Also, try refreshing the playlist.

  • db78
  • [*][*][*]
Problem With Recently Added
Reply #6


the first code should do the trick if you add the whole album at the same time.

try this. newly added should be at the top.

Quote
$sub(999999999999,$replace($left(%date added%,$sub($len(%date added%),2)),'-',,':',,' ',))


and thanks to kanak. dropping the seconds part seem to make my autoplaylist update faster.


Sweet I got it to organize by album, the only problem now is that the newly added albums are at the bottom of the playlist, is there a way to make it at the top?


That's strange. The $sub thing should make the latest added files appear at the top. Could you post your sort string? Also, try refreshing the playlist.


Query:
Code: [Select]
%date added% HAS "-" AND "$cwb_datediff(%date added%,%cwb_systemdate%)" LESS 4


Sort:
Code: [Select]
$sub(999999999999,$replace($left(%date added%,$sub($len(%date added%),2)),'-',,':',,' ',))

  • kanak
  • [*][*][*][*][*]
Problem With Recently Added
Reply #7
I think i found the culprit: it's not the sort code but your autoplaylist query. If your date added is of the form YYYY-MM-DD HH:MM:SS, you should find the difference with %cwb_systemdatetime% (NOT %cwb_systemdate)

so, the autoplaylist code should now be:

Code: [Select]
%date added% HAS "-" AND "$cwb_datediff(%date added%,%cwb_systemdatetime%)" LESS 4


i also re-wrote the sort code (should be more efficient):


Code: [Select]
$sub(999999999999,$replace($left(%date added%,$sub($len(%date added%),3)),'-',,':',,' ',)),%album artist%,%album%


(I'm assuming your Date added format is: YYYY-MM-DD HH:MM:SS . What i've done is to strip the :SS part, then remove the dashes, the colons and the space, and subtract it from a large number to get it to sort by latest added. Then it sorts by album artist and the album.)
  • Last Edit: 04 May, 2007, 12:07:17 AM by kanak

  • db78
  • [*][*][*]
Problem With Recently Added
Reply #8
Yes!! Oh good lord thank you so much. It's been bugging me for so long. I also changed my custom sort to systemdatetime, and it's working perfectly now. Thank you so much!