-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
changed validate filename to use auto operating system detection. #2478
base: nightly
Are you sure you want to change the base?
Conversation
Without much knowledge on this aspect of Kometa - if people are using asset folders etc, will this create issue where files with |
Yes, it would break (some) existing setups. It also potentially breaks all third-party scripts that read from or add to an asset directory. I could see adding this with a toggle to turn it on if someone wants this behavior. |
What's the use case where this is important enough to risk so much breakage? The only one I can think of is where one wants to use the media directories as asset directories, and one's media folders contain "illegal" characters. |
@dextrous0z can you amend this PR so that it's a toggle (perhaps something within the |
@YozoraXCII I'm thinking the default behavior will be how it currently originally is and adding a config within the "config.yml" that allows users to set the option based on the operating system for example the spec lists the below as valid:
However if this is run in Docker I'm guessing that auto will always default to linux as this is built on alpine. So allowing a user to pick is a better option. |
As someone who maintains one of those third-party scripts that works with the asset directory, I'm not crazy about this complication, but it's not my decision. |
9d0154e
to
d952fa8
Compare
im also not crazy about this complication but while its being discussed there also needs to be validation on the input. Use the |
also please specifiy the attribute |
Python really only supports two OSes:
isWindows = os.name == 'nt'
https://docs.python.org/3/library/os.html#os.name
BTW - the Python docs says |
Definitely not keen here on breaking changes which affect the very core of Kometa, the asset folders etc. @dextrous0z #2477 doesn't contain much information. What OS and file-system are you using for your setup. Personally I'd like to see #2477 bug report with more details added so that we can review the breaking-change requested here in #2478 |
…ms to check attribute.
@planetrocky I'm running Kometa on Unraid Docker, the file system is brfs. I can provide log files if it helps. Between the two different logs files, the only thing you'll see however is what is mentioned in the original issue #2477 I don't mind making changes to the pull request. If you believe the approach is wrong just tell me how'd you like to see this resolved ? For example we can just say Kometa will never allow asset folders not following a Universal layout. Then no action is needed and I can just fix my library folders and rebuild plex. Or we, My original concern with not doing this was due to Windows Docker, which WILL most likely cause issues, as the operating system will be deemed as Linux, and in turn use Linux file validation. @meisnate12 First time contributing to the code missed that one, added in the latest commit. Also will do the documentation if you want just really don't understand how to see an accurate preview of the .md files correctly. |
Description
Added a change to the function is_valid_filepath function to check that the filepath is compatible based on the operating system. allowing support for a wider range of possible filenames.
References the issue #2477
docs