kylekingcdn / music-library-exporter

A lightweight macOS app used to automatically generate (and customize) an Apple Music/iTunes Music Library XML file.
https://music-exporter.app
GNU General Public License v3.0
60 stars 1 forks source link

Mapping directories that do not begin with '/' #71

Closed jamesharding closed 1 year ago

jamesharding commented 2 years ago

Hello again! Two issues in two days - sorry 😵‍

I have noticed one small potential anomaly with the handling of mapped paths that do not begin with a '/' character. For background, plex servers on Synology/QNAP NAS devices require the local path to be in the format: file://localhost/volume1/music/... with localhost preceeding the absolute file path (and only two slashes). When I attempt to substitute the path to achieve this both in the GUI and CLI, the following is the result: Original directory: /Users/jamesharding/Music/Music Mapped directory: localhost/volume1/music/Music File output: file:///Users/jamesharding/Library/Containers/com.kylekingcdn.MusicLibraryExporter/Data/localhost/volume1/music/Music/...

If run from the CLI tool, the path to the executable file is used unstead of the Library path.

Perhaps this is the intended output, but to get around it right now I have to perform the path substitution afterwards using sed. I would submit a PR, but I am not too familiar with Swift :(