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

Feature request: mapping/rewrite rules for file location #14

Open
fvdpol opened this issue Nov 16, 2018 · 1 comment
Open

Feature request: mapping/rewrite rules for file location #14

fvdpol opened this issue Nov 16, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request feature request

Comments

@fvdpol
Copy link
Owner

fvdpol commented Nov 16, 2018

Reported on Media Monkey forum by Teknojnky on Mon Oct 22, 2018 4:53 am

link: http://www.mediamonkey.com/forum/viewtopic.php?f=2&t=31680&sid=4c4111f5c9aba2c4fc277304e5064733&start=105#p450930

Ok for the feature request, I would like to suggest an option to modify the path (or more specifically, the drive) of the exported files.

for example, mediamonkey and itunes runs on windows, and the music files are on a network server.

the paths in both are \sauron\media\audio\ and so on

<key>Location</key><string>file://localhost//sauron/media/audio/MP3/B/Bad%20Religion/1990%20-%20Against%20the%20Grain%20%5BMP3%5D/13%20-%20Bad%20Religion%20-%2021st%20Century%20(Digital%20Boy).mp3</string>

plex however runs on that network server itself, so the path is local

<key>Location</key><string>file://localhost/data/media/audio/MP3/B/Bad%20Religion/1990%20-%20Against%20the%20Grain%20%5BMP3%5D/13%20-%20Bad%20Religion%20-%2021st%20Century%20(Digital%20Boy).mp3</string>

while it's not difficult to do a find/replace, its an additional step I have to stop and do any time I want to update the xml for plex.

I have to replace the //sauron with /data

I would think this could be easy to do, since MM stores the drive and path separately.

I could probably go in the script and hardcode it, but I figure this might be useful for other users who have network stored music, which makes the path different from what itunes/mediamonkey see.

@fvdpol fvdpol added the enhancement New feature or request label Nov 16, 2018
@fvdpol fvdpol self-assigned this Nov 16, 2018
@fvdpol
Copy link
Owner Author

fvdpol commented Nov 16, 2018

Thinking a bit on how to this could be made generic/flexible, as the the replacements/substitutions will greatly depend on the way a user is using various storage locations for the files...

Possible idea is to have a table with a number of substitution (find-replace) rules ordered by priority: first try if 1st rule matches, if not try 2nd etc.

Rule would try to match locations starting with file://localhost<FindString>, and if this matches replace this with file://localhost<ChangeToString>

for the original requestor's use-case this would the lead to a configuration of:
FindString: //sauron
ChangeToString: /data

quick draft mock-up of user interface:
image

names of the fields need some more thought, as this is probably not intuitive

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

No branches or pull requests

1 participant