Skip to content

return 'playlistinfo' #4

@vredesbyyrd

Description

@vredesbyyrd

Hi, thanks for sharing your library.

I have been using it in a couple small scripts to send basic commands like clear, play, load [playlist name].

I wanted to get playlistinfo - mpd doc description:

Displays a list of all songs in the playlist, or if the optional argument is given, displays information only for the song SONGPOS or the range of songs START:END [2]

t = mpc:send('playlistinfo') 
for k,v in pairs(t) do print(k,v) end

This returns metadata for only the last item in a playlist. I took a look at mpd.lua, but did not have any luck figuring this one out.

If you have any ideas it would be much appreciated!

musicbrainz_albumartistid	e6de1f3b-6484-491c-88dd-6d619f142abc
pos	49
last-modified	2020-05-13T08:59:09Z
album	Rush: Original Motion Picture Soundtrack
composer	Stephen Lipson, Bryce Jacobs, Hans Zimmer, Jack Dolman
originaldate	2013-09-09
musicbrainz_trackid	f3c00e6a-7f7e-4300-8b3a-3bce0489379e
albumartistsort	Bobby Krlic
id	39986
albumartist	Hans Zimmer
musicbrainz_albumid	ab1dd476-9587-493a-aa26-0b21500a3b8e
disc	1
musicbrainz_artistid	e6de1f3b-6484-491c-88dd-6d619f142abc
title	20%
track	10
time	62
label	WaterTower Music
date	2013
artist	Hans Zimmer, Bryce Jacobs, Stephen Lipson & Jack Dolman
musicbrainz_releasetrackid	17f6db58-c1fa-4c80-9915-be5bd351099a
file	Scores/Hans Zimmer/2013 - Rush_ Original Motion Picture Soundtrack/10 - 20%.flac
duration	61.573
genre	Score, Classical

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions