I have installed the Movie Database Plugin and a corresponding shortcut as it is described under this link and this video.
If I add a movie by clicking on the Media DB plugin, it automatically replaces “:“ by " -”. For example, "Star Wars - Episode I“ instead of "Star Wars: Episode I“. This is how I want it to be.
However, if I add a movie through the shortcut (cmd+p → "add movie“), then the ":“ does not get replaced, just removed, meaning the new file gets named e.g. "Star Wars Episode I“.
How can I get the automatisation of " -" instead of ":“, even if I add a movie through the shortcut?
I have a feeling that it has to be fixed through the movie.js script, but I am really no expert.
I don’t know. I had the same problem as the OP and edited the movie.js file as above and it worked fine. Does look clunky.
I just removed the colon from the first function, which removes illegal characters and doesn’t replace them with anything, and then created an identical function to find the colon only and replace it with a space and a hyphen.
Used that for about 1,000 files without any problems. But I totally believe you when you say it isn’t standard.
Repeating the function shouldn’t work, so I’m a little baffled that did work. Are you sure you actually managed to enter both functions when you just repeated running it? That would be considered a rather serious bug in Javascript.
Did your test case really encompass the need to run both functions to make it work? Or did something else somewhere kick in? I’m pretty sure you shouldn’t be able to run an arbitrarily choice of those two functions.
Well, I followed the exact same set up as the OP, but back in December. When I realized that the colons were being deleted, I played around with the movies.js file and came up with the solution above.
I don’t really understand the intricacies of what happens, but when I add a new movie, a window opens asking for a title or IMDb code number. If I put that in, I then get a couple of prompts to do with the metadata I want, such as my rating, where the movie was watched, etc. The note then appears in the right folder, and if the title has a colon in it, the file name appears with a hyphen instead.
I don’t run or do anything extra to the description given in the links provided by the OP.
My hacked js file has worked to add nearly 1000 notes. Have not noticed any problems: fast and efficient. The new code is obviously cleaner, so I will use that in the future.
Don’t know why the hacked code works. I tried tons of different ideas until I hit on the repetition, and because it worked, I just stuck with it.