Improve parsing and identification of track files #11

Closed
opened 2026-02-20 00:15:18 -05:00 by deekerman · 6 comments
Owner

Originally created by @danielunderwood on GitHub (Aug 16, 2017).

Originally assigned to: @danielunderwood, @ta264 on GitHub.

Finish local file scanning to pick up files currently in library. At the moment, FLAC files may not be picked up at all.

Originally created by @danielunderwood on GitHub (Aug 16, 2017). Originally assigned to: @danielunderwood, @ta264 on GitHub. Finish local file scanning to pick up files currently in library. At the moment, FLAC files may not be picked up at all.
Author
Owner

@majora2007 commented on GitHub (Aug 16, 2017):

If I recall, only FLAC will fail due to a parsing bug with the regex.

@majora2007 commented on GitHub (Aug 16, 2017): If I recall, only FLAC will fail due to a parsing bug with the regex.
Author
Owner

@Qstick commented on GitHub (Aug 25, 2017):

FLAC seems to be working ok, I think we just need some fall-backs to the tag reading. Right now its failing to import if albumartist tag is empty

Ex. for artist we should look for MBID in tag first, if not available then look for albumartist, if not available look for first contributingartist then lastly we fall back on the artist folder. Also, during import the user is identifying the artist for a given folder and correcting during search if needed thus we should know the artist by the folder its in and which artist is assigned.

@Qstick commented on GitHub (Aug 25, 2017): FLAC seems to be working ok, I think we just need some fall-backs to the tag reading. Right now its failing to import if `albumartist` tag is empty Ex. for artist we should look for `MBID` in tag first, if not available then look for `albumartist`, if not available look for first `contributingartist` then lastly we fall back on the artist folder. Also, during import the user is identifying the artist for a given folder and correcting during search if needed thus we should know the artist by the folder its in and which artist is assigned.
Author
Owner

@ghost commented on GitHub (Dec 19, 2017):

I believe my error below may be related. There is an error with track title though not album artist.

17-12-19 10:44:34.8|Debug|Parser|Starting Tag Parse for /music/Foo Fighters/Wasting Light/07 - Back & Forth.flac
17-12-19 10:44:34.8|Debug|Parser|Audio Properties : Flac Audio, Bitrate: 1104, Sample Size: 16, SampleRate: 44100, Channels: 2
17-12-19 10:44:34.8|Debug|QualityParser|Trying to parse quality for /music/Foo Fighters/Wasting Light/07 - Back & Forth.flac
17-12-19 10:44:34.8|Debug|Parser|Quality parsed: FLAC v1
17-12-19 10:44:34.8|Debug|ParsingService|Album [91825bcf-e51d-4357-986c-ac2a49b4d205][Wasting Light] selected for Foo Fighters - Wasting Light - T07: FLAC v1
17-12-19 10:44:34.8|Debug|ParsingService|Track selected for Foo Fighters - Wasting Light - T07: FLAC v1
17-12-19 10:44:34.8|Debug|ParsingService|Track title search unsuccessful, falling back to track number for Foo Fighters - Wasting Light - T07: FLAC v1
17-12-19 10:44:34.8|Debug|ParsingService|Track selected for Foo Fighters - Wasting Light - T07: FLAC v1
17-12-19 10:44:34.8|Debug|ParsingService|Unable to find Foo Fighters - Wasting Light - T07: FLAC v1
17-12-19 10:44:34.8|Debug|ImportDecisionMaker|Size: 32252445
17-12-19 10:44:34.8|Debug|ImportDecisionMaker|File rejected for the following reasons: [Permanent] Invalid album or track`

@ghost commented on GitHub (Dec 19, 2017): I believe my error below may be related. There is an error with track title though not album artist. > 17-12-19 10:44:34.8|Debug|Parser|Starting Tag Parse for /music/Foo Fighters/Wasting Light/07 - Back & Forth.flac 17-12-19 10:44:34.8|Debug|Parser|Audio Properties : Flac Audio, Bitrate: 1104, Sample Size: 16, SampleRate: 44100, Channels: 2 17-12-19 10:44:34.8|Debug|QualityParser|Trying to parse quality for /music/Foo Fighters/Wasting Light/07 - Back & Forth.flac 17-12-19 10:44:34.8|Debug|Parser|Quality parsed: FLAC v1 17-12-19 10:44:34.8|Debug|ParsingService|Album [91825bcf-e51d-4357-986c-ac2a49b4d205][Wasting Light] selected for Foo Fighters - Wasting Light - T07: FLAC v1 17-12-19 10:44:34.8|Debug|ParsingService|Track selected for Foo Fighters - Wasting Light - T07: FLAC v1 17-12-19 10:44:34.8|Debug|ParsingService|Track title search unsuccessful, falling back to track number for Foo Fighters - Wasting Light - T07: FLAC v1 17-12-19 10:44:34.8|Debug|ParsingService|Track selected for Foo Fighters - Wasting Light - T07: FLAC v1 17-12-19 10:44:34.8|Debug|ParsingService|Unable to find Foo Fighters - Wasting Light - T07: FLAC v1 17-12-19 10:44:34.8|Debug|ImportDecisionMaker|Size: 32252445 17-12-19 10:44:34.8|Debug|ImportDecisionMaker|File rejected for the following reasons: [Permanent] Invalid album or track`
Author
Owner

@thetrev commented on GitHub (May 18, 2018):

One of the improvements to the QOL for parsing would be going through a list of non-standard characters to help match against a track. For example, "Elian" will not match, but "Elián" will. I figure that if a match is looking for a that special character, to just run a method to detect them and reference the track title against the plain character?

@thetrev commented on GitHub (May 18, 2018): One of the improvements to the QOL for parsing would be going through a list of non-standard characters to help match against a track. For example, "Elian" will not match, but "Elián" will. I figure that if a match is looking for a that special character, to just run a method to detect them and reference the track title against the plain character?
Author
Owner

@sbeaudoin commented on GitHub (May 18, 2018):

I think this would be very good to remove diacritics from the search string and all the found candidates. This is easily done in .Net. Here is an example from StackOverflow : https://stackoverflow.com/questions/249087/how-do-i-remove-diacritics-accents-from-a-string-in-net

static string RemoveDiacritics(string text) 
{
    var normalizedString = text.Normalize(NormalizationForm.FormD);
    var stringBuilder = new StringBuilder();

    foreach (var c in normalizedString)
    {
        var unicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c);
        if (unicodeCategory != UnicodeCategory.NonSpacingMark)
        {
            stringBuilder.Append(c);
        }
    }

    return stringBuilder.ToString().Normalize(NormalizationForm.FormC);
}
@sbeaudoin commented on GitHub (May 18, 2018): I think this would be very good to remove diacritics from the search string and all the found candidates. This is easily done in .Net. Here is an example from StackOverflow : https://stackoverflow.com/questions/249087/how-do-i-remove-diacritics-accents-from-a-string-in-net ``` static string RemoveDiacritics(string text) { var normalizedString = text.Normalize(NormalizationForm.FormD); var stringBuilder = new StringBuilder(); foreach (var c in normalizedString) { var unicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c); if (unicodeCategory != UnicodeCategory.NonSpacingMark) { stringBuilder.Append(c); } } return stringBuilder.ToString().Normalize(NormalizationForm.FormC); } ```
Author
Owner

@Qstick commented on GitHub (Nov 19, 2018):

Closing with #522, will open more defined issues for individual problems that come up.

@Qstick commented on GitHub (Nov 19, 2018): Closing with #522, will open more defined issues for individual problems that come up.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Lidarr#11
No description provided.