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

Relative paths for local media in m3u playlists #1428

Closed
kingosticks opened this Issue Feb 4, 2016 · 10 comments

Comments

4 participants
@kingosticks
Member

kingosticks commented Feb 4, 2016

With the merge of #1386, non-absolute paths for local music files are now relative to m3u/playlist_dir instead of local/media_dir. This is a change in Mopidy's behaviour and different to mpd's behaviour.

This issue is a continuation of the discussion that started here with @tkem in which he pointed out that:

According to https://en.m.wikipedia.org/wiki/M3U, which kind of serves as our reference, "local pathname relative to the M3U file location". Plus, for the file extension, you have multiple media_dirs as potential roots.

Do we want to restore the original behaviour or not? If we chose not, then I think we need to improve the documentation somewhere to make this difference clearer as it will impact those users migrating from mpd.

@tkem tkem self-assigned this Feb 5, 2016

@tkem

This comment has been minimized.

Member

tkem commented Feb 5, 2016

Good point! I'd also add that with plans for local to be moved out of Mopidy core into a separate extension, future versions of Mopidy may not even have a local/media_dir. And as @kingosticks already mentioned, the file extension which is to replace local in some ways provides multiple root directories, so these can't be used either.
But I see the point that this diverges from MPD behavior, so I'm open to discussion.

@jodal

This comment has been minimized.

Member

jodal commented Feb 5, 2016

All valid points so far. I don't have any strong preference, but is maybe leaning a bit more towards following M3U conventions than MPD.

@tkem tkem added this to the v2.0 - Gapless and GStreamer 1.x milestone Feb 6, 2016

@jodal

This comment has been minimized.

Member

jodal commented Feb 13, 2016

I think the only solution here is to keep using m3u/playlist_dir as the base directory as we don't want to depend on an extension that'll move out of core. Moving this to v2.0.1 as the docs improvement isn't a blocker for getting 2.0.0 out and into Ubuntu 16.04.

@jodal jodal modified the milestones: v2.0.1 - Bugfixes, v2.0 - Gapless and GStreamer 1.x Feb 13, 2016

@kingosticks

This comment has been minimized.

Member

kingosticks commented Feb 13, 2016

We can aim to include it the part of the docs where we outline the current shortcomings of the MPD implementation. Or maybe even as a specific "Migrating from mpd" section somewhere. It could do with being quite prominent but that's quite difficult to achieve with the docs. I just want to avoid mpd users trying Mopidy and being instantly frustrated that their collection of carefully curated playlists doesn't 'just work' (TM).

@adamcik

This comment has been minimized.

Member

adamcik commented Feb 13, 2016

Add a base directory setting?

@tkem

This comment has been minimized.

Member

tkem commented Feb 14, 2016

@adamcik: Why didn't I think of that? ;-)

So, if m3u/base_dir is not set, use the M3U's parent directory as base directory for resolving relative paths, as in the Wikipedia "specs".

Remaining question would be what the default for base_dir should be. I think @kingosticks has a strong preference for setting this to the same as local/media_dir, which defaults to $XDG_MUSIC_DIR, which I'd be happy with. Note that if users changed local/media_dir, they would also have to update m3u/base_dir to keep existing behavior, though.

@jodal: What's the release schedule for Mopidy v2.0.0? If we can agree on adding the new base_dir config, I'd be able to post a PR within the next two to three days or so...

@kingosticks

This comment has been minimized.

Member

kingosticks commented Feb 14, 2016

It seems so obvious now!

Last thing I heard it was something like 5 days in order to get into Ubuntu 16.04.

@jodal

This comment has been minimized.

Member

jodal commented Feb 14, 2016

Ubuntu's autoimport-from-Debian freeze is Feb 18. We need to upload to Debian and sync to Ubuntu before that, so I should upload Feb 15 of 16, so I'd be quite happy if we could roll a release today, or tomorrow at latest.

@tkem

This comment has been minimized.

Member

tkem commented Feb 14, 2016

I'll see what I can do, but Valentine's Day's duties come first ;-)

@jodal jodal closed this in 6aef96a Feb 14, 2016

jodal added a commit that referenced this issue Feb 14, 2016

Merge pull request #1443 from tkem/fix/1428
Fix #1428: Add m3u/base_dir confval.

@jodal jodal modified the milestones: v2.0 - Gapless and GStreamer 1.x, v2.0.1 - Bugfixes Feb 14, 2016

@jodal

This comment has been minimized.

Member

jodal commented Feb 14, 2016

Landed in v2.0.0 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment