Add option to prefer movie.nfo when reading/writing nfo files #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Many years ago, I asked for an option to always use the movie.nfo file instead of the <movie_name>.nfo, both when reading and saving the nfo files. I had something hacked together that I was using, but thought it might be time to try and get something official.
This change adds an option to "Prefer movie.nfo", which, by default is off, so it maintains original behavior.
I pulled some stuff into the helper class and attempted to reuse the same method when finding and saving the nfo files. I also added a Test project just to sanity check some changes. It was really only designed to run on windows/net8, but the purpose of the test project isn't to test all the stuff like IFileSystem or any of the core Emby stuff, just to validate the single helper function I created.