Ejemplo n.º 1
0
        public AudioFileOption CheckManualOptions(ApprovedLoadSheetRow approvedLSR)
        {
            foreach (AudioFileOption manualOption in _ManualOptions.GetAudioFileOptions)
            {
                AudioLibraryFile libraryFile = manualOption.LibraryFile;

                if (libraryFile.FullPath == approvedLSR.SourceFilePath)                      //Same source file path
                {
                    if (libraryFile.FullPath.Length < Globals.MaxPathLenth)                  //Check if path length is too long to be able to get a modified date / filesize
                    {
                        if (libraryFile.ModifiedDate == approvedLSR.SourceFileModifiedDate)  //Same source file modified date
                        {
                            if (libraryFile.FileSize == approvedLSR.SourceFileSize)          //Same source file filesize
                            {
                                return(manualOption);
                            }
                        }
                    }
                    else  //long path, we can't check modified date / filesize
                    {
                        return(manualOption);
                    }
                }
            }

            return(null);
        }
        public AudioFileOption(AudioLibraryFile libraryFile, TokensCollection tokens)
        {
            _LibraryFile = libraryFile;
            _LSRTokens   = tokens;

            _ScoringTokenCount = 0;

            _ArtistAlbumPoints = 0;
            _TrackPoints       = 0;
            _BonusPoints       = 0;

            _HasScoredTrackNumber = false;

            _RemainingChars = _LibraryFile.NormalizedSubDirectoriesFilePath;

            _AccuracyScore = 0;

            _IsPossiblyWrongCycle            = false;
            _IsPossiblyWrongAirline          = false;
            _IsPossiblyWrongTrackNumber      = false;
            _IsPossiblyWrongArtistAlbum      = false;
            _IsPossiblyWrongTrackNumberTrack = false;

            _IsOptionFinished = false;
        }