Page 1 of 1

supported tags (conductor)

Posted: October 23rd, 2019, 8:49 pm
by smutbert
Hi,

would it be possible to support the conductor tag?

I have built a Cubietruck-based (would choose the Raspberry Pi now, though) music player, for which I wrote (with a lot of help) a mpd-client in python, that watches some switches and rotary encoders and controls some leds, a 2x16 dot-matrix display via lcdproc/LCDd and obviously my favorite player mpd.
Now I have come so far that I can choose music to be played by performer, composer, artist, genre,... and if I could add conductor to that list, it would kind of complete the whole thing :D

As soon as I try to even look at the sourcecode of mpd I am completely lost, so I do not have the faintest idea of how much effort this would take.
(I'd also be happy to tell more about my music player if somebody is interested.)

best regards,
smutbert

Re: supported tags (conductor)

Posted: October 23rd, 2019, 9:47 pm
by max
It's pretty easy to implement, look at this commit adding the "Work" tag: https://github.com/MusicPlayerDaemon/MP ... d9ebe81f11

Re: supported tags (conductor)

Posted: October 24th, 2019, 5:54 pm
by smutbert
This is great. I made exactly the same changes only with "conductor" instead of "work" and at least in a first test it works like a charm. In my testsetup I have about 3000 flac files and about 300 of them have a conductor tag. I am using python3 with python-musicpd and it looks like

Code: Select all

>>> mpd_client.tagtypes()
['Artist', 'ArtistSort', 'Album', 'AlbumSort', 'AlbumArtist', 'AlbumArtistSort', 'Title', 'Track', 'Name', 'Genre', 'Date', 'OriginalDate', 'Composer', 'Performer', 'Conductor', 'Disc', 'Label', 'MUSICBRAINZ_ARTISTID', 'MUSICBRAINZ_ALBUMID', 'MUSICBRAINZ_ALBUMARTISTID', 'MUSICBRAINZ_TRACKID', 'MUSICBRAINZ_RELEASETRACKID', 'MUSICBRAINZ_WORKID']
>>> mpd_client.list("Conductor")
['', 'Alexander von Pitamic', 'Alfred Scholz', 'Andreas Orozco-Estrada', 'Arturo Toscanini', 'Carl Davis', 'Carlo Savina', 'Claudio Abbado', 'Daniel A. Carlin', 'David Bedford', 'Ennio Morricone', 'Eugen Duvier', 'Eugen Jochum', 'Fritz Reiner', 'George Martin', 'Hartmut Haenchen', 'Henry Adolph', 'Henry Mancini', 'Herbert von Karajan', 'Howard Shore', 'John Williams', 'Jordi Savall', 'Karl Böhm', 'Leonard Bernstein', 'Maurice Jarre', 'Mikis Theodorakis', 'Neville Marriner', 'Nikolaus Harnoncourt', 'Rafael Kubelik', 'Randy Edelman', 'Reinhard Goebel', 'Ricardo Muti', 'Trevor Pinnock', 'Yaron Gottfried']
Now I have to figure out how to build a Debianpackage for armhf :)

Is there any chance that this will make it into the official mpd?

If so is there anything I can do to help. I even have a account on github, but I never used it before, so I'd have to figure out how to make a pull-request, right?

Re: supported tags (conductor)

Posted: October 24th, 2019, 6:04 pm
by max
smutbert wrote:
October 24th, 2019, 5:54 pm
so I'd have to figure out how to make a pull-request, right?
Right.

(Of course, you can send your patch or plain git pull request via email... I'm not forcing anybody to use a commercial non-free website like GitHub.)

Re: supported tags (conductor)

Posted: October 24th, 2019, 6:45 pm
by smutbert
I just made my very first pull-request, I am not sure I did it right though (the code changes are simple enough, but the whole thing with branches, commits, comments and pull-requests is completely new to me).

Thank you very much!