Move variable in MediaBrowser.Providers/MediaInfo/AudioResolver.cs

Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
This commit is contained in:
Jonas Resch 2021-11-30 20:44:57 +01:00 committed by GitHub
parent 1a35690834
commit 0d8170cedb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,13 +106,12 @@ namespace MediaBrowser.Providers.MediaInfo
for (int i = 0; i < files.Count; i++)
{
string file = files[i];
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(file);
if (!AudioFileParser.IsAudioFile(file, _namingOptions))
{
continue;
}
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(file);
// The audio filename must either be equal to the video filename or start with the video filename followed by a dot
if (videoFileNameWithoutExtension.Equals(fileNameWithoutExtension, StringComparison.OrdinalIgnoreCase)
|| (fileNameWithoutExtension.Length > videoFileNameWithoutExtension.Length