Skip to content
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

Present a list of LovedTracks that were not able to match (in the log or somewhere else). #24

Open
jesseward opened this issue Aug 3, 2020 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jesseward
Copy link
Owner

This is just nitpicky, but it would be nice to get a list of the songs that were not able to match (in the log or somewhere else).

[04:39:00] [INF] [21] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Retrieved 2584 lovedTracks from LastFM for user Odinoss,
[04:38:42] [INF] [26] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Syncing LastFM favourties for Odin,
[06:37:37] [INF] [21] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Finished Last.fm lovedTracks sync for Odin. Matched Songs: 1932

I'm saying this because I know for a fact that all my lovedtracks are present in my library, but it was unable to match ~600 of them. Would be easier to debug the songs matching if there was a list of unmatched songs.

Originally posted by @OdinGitDat in #23 (comment)

@jesseward jesseward added enhancement New feature or request good first issue Good for newcomers labels Aug 3, 2020
@jesseward
Copy link
Owner Author

hey @OdinGitDat, logged this new issue.

The request sounds reasonable, will log a future item here in the event someone wants to pick it up. I suspect there are some songs missed due to the comparison implementation.

public static class StringHelper
{
public static bool IsLike(string s, string t)
{
//Placeholder until we have a better way
var source = SanitiseString(s);
var target = SanitiseString(t);
return source.Equals(target, StringComparison.OrdinalIgnoreCase);
}
private static string SanitiseString(string s)
{
//This coiuld also be [a-z][0-9]
const string pattern = "[\\~#%&*{}/:<>?,-.()|\"-]";
//Remove invalid chars and then all spaces
return Regex.Replace(new Regex(pattern).Replace(s, string.Empty), @"\s+", string.Empty);
}

There is no distance or fuzzy matching. So if you have a slight difference in naming such as "remix", "live" or "Artist featuring ...", it will not match.

@blers27
Copy link

blers27 commented Feb 22, 2021

To me, this looks like extreme nitpicking whatever the plugin is doing. The plugin retrieved 315 lovedTracks from LastFM and it only matched 5 songs for me. That's a 1.6% match rate :/

@jesseward
Copy link
Owner Author

I have added a known issues section to the README and included this issue . See https://github.com/jesseward/jellyfin-plugin-lastfm#known-issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants