Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internet radio streams ID tags #14

Open
podly opened this issue Sep 3, 2014 · 0 comments
Open

Internet radio streams ID tags #14

podly opened this issue Sep 3, 2014 · 0 comments

Comments

@podly
Copy link

podly commented Sep 3, 2014

mpdlcd has a nice feature to use alternate tags if it can't find correct value in basic one.
However most internet radio station use values coded a little different than in mp3 files.

In most cases radios use 'artist' tag for their radio station name and 'title' tag for artist and song name in one field.
So, my suggestion is to correct mpdwrapper.py in this way:

class MPDSong(object):

    BASE_TAGS = (
        SongTag('artist', u" ", 'albumartist', 'composer', 'performer', 'name'),
#        SongTag('title', u" ", 'name'),
#        SongTag('name', u" ", 'title'),
        SongTag('title', u" "),
        SongTag('name', u" "),
        SongTag('time', u"--:--"),
        SongTag('file', u" "),
    )

    def __init__(self, **kwargs):
        # Each tag may be multi-valued, keep only the first one.
        self.tags = dict((k.lower(), v[0]) for k, v in kwargs.items())
        for tag in self.BASE_TAGS:
            self.tags[tag.name] = tag.get(self.tags)

in this way it is possible to set in configuration file displaying radio station name and artist-song name.
It would be also great to have a little flexibility with this in configuration file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant