Post Reply 
Album duration possible?
27-02-2022, 11:45
Post: #2
RE: Album duration possible?
I guess it depends how bad you want it ;-)

If you have a Windows PC then there is a way to do it with foobar2000 and the foo_sqlite plugin. The plugin allows you to run SQL against your music collection (it stores all the tags internally during indexing) which is amazingly useful. I've used the plugin for various purposes before including to pull data for use in MinimServer tagUpdate scripts, but I hadn't tried updating tags before.

I've only run this against a small sample of albums so I have no idea how this would scale, but all you'd need to run is:

Code:
update PlaylistUpdatable
  set album_duration=(select cast(floor(sum(length_seconds)/60) as varchar) || ':' || cast(printf('%02.0f',floor(sum(length_seconds)%60)) as varchar)
                        from Playlist
                        where     playlist_index = active_playlist()
                              and PlaylistUpdatable.album = Playlist.album
                        group by album)
  where playlist_index = active_playlist();

There is another line that creates the PlaylistUpdateable virtual table, but it's causing the post to fail, so I'll leave it out for now just to keep it formatted nicely.

I doubt you want to go to these lengths, but I can't think of another way of doing it.
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)