Post Reply 
Album duration possible?
22-03-2022, 11:10 (This post was last modified: 23-03-2022 09:47 by simbun.)
Post: #15
RE: Album duration possible?
(21-03-2022 23:38)entdgc Wrote:  @simbun just for completeness and for anyone else reading this thread a slight problem has come to light with the process you came up with earlier. Your process seems to identify and album simply by its title. So if there are several albums with the same name they get added together. So all the 'Greatest Hits' albums from several artists get combined and end up with an VERY long album duration. I have manually corrected these mistakes in my library but maybe there is a simple change you could make to the process for any future users? Maybe you can identify an album by a concatenation of Artist+Album?
Sorry to do it to you again, but RTFM ;-)

(27-02-2022 19:32)simbun Wrote:  
Code:
select album,
       format_length_hours(sum(length_seconds)) as album_duration
  ffrom Playlist
  where playlist_index = active_playlist()
  group by album
NOTE: Change ffrom to from (I had to change that to be able to post)

In the above example (and the final example) you'll obviously need to replace 'album' with whatever set of tags you use to uniquely identify an album so that the aggregation is correct e.g. MUSICBRAINZ_ALBUMID, 'albumartist, album, date' e.t.c

I use a custom id (similar to MUSICBRAINZ_ALBUMID) so that I can have MinimServer group albums correctly for my tagging setup, but 'ALBUMARTIST, ALBUM, DATE' should work for most people.

Glad you got it sorted.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Album duration possible? - entdgc - 26-02-2022, 17:02
RE: Album duration possible? - simbun - 27-02-2022, 11:45
RE: Album duration possible? - entdgc - 27-02-2022, 12:45
RE: Album duration possible? - simbun - 27-02-2022, 13:52
RE: Album duration possible? - simbun - 27-02-2022, 19:32
RE: Album duration possible? - simbun - 05-03-2022, 15:37
RE: Album duration possible? - simbun - 12-03-2022, 15:47
RE: Album duration possible? - entdgc - 01-03-2022, 01:31
RE: Album duration possible? - simbun - 01-03-2022, 10:37
RE: Album duration possible? - entdgc - 01-03-2022, 14:42
RE: Album duration possible? - entdgc - 21-03-2022, 23:38
RE: Album duration possible? - simbun - 22-03-2022 11:10
RE: Album duration possible? - entdgc - 23-03-2022, 20:33
RE: Album duration possible? - simbun - 23-03-2022, 21:44
RE: Album duration possible? - entdgc - 23-03-2022, 21:50
RE: Album duration possible? - KreTR - 07-08-2022, 16:24
RE: Album duration possible? - simbun - 07-08-2022, 17:19
RE: Album duration possible? - entdgc - 07-08-2022, 16:35
RE: Album duration possible? - KreTR - 08-08-2022, 21:22
RE: Album duration possible? - simbun - 08-08-2022, 23:33

Forum Jump:


User(s) browsing this thread: 2 Guest(s)