[RELEASE] Movie Set Artwork Automator
Just an observation from here, it appears that MSAA 0.1.8 is capable of creating slightly mangled artwork filenames depending on whether MSAA is run on Windows or Linux.

Example:
Code:
smb://SERVER2/video2/Movies Anime Sets/Blender Open Movies\poster.jpg
where the path (smb://SERVER2/video2/Movies Anime Sets/Blender Open Movies) has been joined with the artwork name (poster.jpg) using a backward slash (\) rather than a forward slash.

Looking at the code, it's because MSAA is using os.path.join() which is normally correct, but of course with a share (smb, nfs, etc.) you want to use a forward slash - which is what you'll get on Linux - but in Windows you'll get a backward slash, which isn't what you want. Conversely, when processing a local drive (E:\something) you would want to join paths using a backward slash, but if such a path were processed by MSAA running on a Linux machine it would create a mixture of backward slashes and forward slashes, which may cause problems for the Windows PC (not that it's likely you'd be using local drives where a Linux machine is concerned, but you get the idea).

Anyway, I'd suggest all the os.path.join() calls are replaced by a function that joins the paths using either a forward or backward slash as appropriate for the path and not the current OS. The simplest option would be to inspect the path and if it's a share (matches regex "^.*:.*") always use a forward slash, and if not a share then count the number of forward and backward slashes using the slash that occurs the most often to join the paths (if there's a tie, use the first slash - forward or backward - found in the path). Or maybe always use the first slash occurrence for non-shares. There may be simpler/better solutions too.

Enhancement request: Would it be possible to add an option - perhaps a one-shot setting which is reset (disabled) after each run - to "Overwrite existing database artwork"? This would be handy if you have existing (but incorrect) artwork defined for your sets, and just want everything reloaded.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply


Messages In This Thread
RE: [RELEASE] Movie Set Artwork Automator - by Milhouse - 2013-08-04, 20:40
Logout Mark Read Team Forum Stats Members Help
[RELEASE] Movie Set Artwork Automator6