Skip to content

playlist: Add option to force forward slashes in paths #3331

@MartyLake

Description

@MartyLake

Use case

Following up on #irc and MusicPlayerDaemon/MPD#607
I'm trying to use beets to export playlists for MPD. Unfortunately, I am using Windows, and beets uses backslashes on windows, and MPD can only recognize forwards.

Example of playlist that works fixed by bash+sed:

#EXTINF:346,Le Knight Club - Coco Girlz
Le Knight Club/Ilictronix/01 Coco Girlz.mp3
#EXTINF:325,Alec Carlsson - OMG
Compilations/Shiny Disco Club Presents_ Millenium Disco (vol.1)/18 OMG.mp3
#EXTINF:190,Calypso
Compilations/Shiny Disco Club Presents_ Millenium Disco (vol.1)/12 Calypso.mp3
#EXTINF:225,Kartell - Ending Season
Compilations/Shiny Disco Club Presents_ Millenium Disco (vol.1)/19 Ending Season.mp3

Example of playlist that does not work, generated by beets.io:

Compilations\Sakifo Musik Festival 2006\05 Avec Le Vent.mp3
Compilations\Disco Hits\00 Ring My Bell (badq).mp3
Anita Ward\Maximum Disco 12''\00 Ring My Bell (Original Disco Version).mp3
BlastRec\Volume Zero\09 Astrid Eve.mp3
Django Unchained\Original Motion Picture Soundtrack\23 Trinity (Titoli).mp3

Solution

add a new option called separator_char that, if set, forces this character to be used as a separator.
or
add a new option called type_of_separator that defaults to auto (current behavior), but can also be force_backslash or force_forward

Alternatives

Have a post script hook where I can call my own bash+sed solution

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurefeatures we would like to implement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions