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

Local backend doesn't handle multiple genre tags. #1757

Open
crocket opened this issue May 13, 2019 · 4 comments

Comments

2 participants
@crocket
Copy link

commented May 13, 2019

I installed and ran mopidy-2.2.2 on gentoo linux.

On mpd, multiple genre tags are separated properly.
On mopidy, multiple genre tags are concatenated into one string with semicolons between each genre.

For example, aaa.mp3 has the following tags.
genre: rock
genre: ballad

mpd would show aaa.mp3 in both rock and ballad genres in mpd clients.
mopidy shows aaa.mp3 in “rock; ballad” genre in mpd clients.

I just read library.json.gz. It turns out that genre is not an array but a single string. genre should be an array.

/etc/mopidy/mopidy-user.conf

[core]
cache_dir=/mnt/data/mopidy/cache
config_dir=/etc/mopidy
data_dir=/mnt/data/mopidy
restore_state=false

[audio]
mixer=software
# initial volume for mixer
mixer_volume=50
output=jackaudiosink server=default client-name=mopidy connect=none

[logging]
color=false
debug_file=/mnt/data/mopidy/mopidy-debug.log

[local]
media_dir=/mnt/data/Music
excluded_file_extensions=
  .bmp
  .m3u
  .m3u8
  .jpeg
  .jpg
  .log
  .nfo
  .png
  .txt
  .url

[file]
media_dirs=/mnt/data/Music|Music

[http]
hostname=::1
port=6680

[mpd]
hostname=::
port=6600
password=*****

@crocket crocket changed the title Multiple genre tags from local backend are concatenated into one string. Local backend cannot handle multiple genre tags. May 13, 2019

@crocket crocket changed the title Local backend cannot handle multiple genre tags. Local backend doesn't handle multiple genre tags. May 13, 2019

@kingosticks

This comment has been minimized.

Copy link
Member

commented May 13, 2019

Our MPD frontend uses concat_multi_values to produce a single line from our lists which I assume mimics mpd's behaviour (at some point in time but maybe no longer). However, in our Track model, genre is not a list it's a single string - as you said. And we specifically convert it from the list GStreamer gave us to that delimited string here.

So fixing this will require a change to our Track model to support multiple Genres. This issue isn't specific to the local backend.

@crocket

This comment has been minimized.

Copy link
Author

commented May 13, 2019

It seems TAG_GENRE, TAG_TITLE, TAG_ORGANIZATION, comment, TAG_LOCATION, and TAG_COPYRIGHT are joined into a single string.

Would it not be better to convert them back to lists?

@kingosticks

This comment has been minimized.

Copy link
Member

commented May 13, 2019

For genre, yes, it makes sense. For title we are probably OK as we are. Personally I don't think there's an obvious reason to support multiple separate titles so why introduce that confusion to every client? And the others are really just hacked into the comment because we have no motivation to expose them.

@crocket

This comment has been minimized.

Copy link
Author

commented May 14, 2019

Yes, it's good to focus just on genre for now. When I want to see multiple titles, I will create a new issue.

Does mopidy expose multiple artists as a list to mpd clients?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.