-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Incorrect, Mismatching Tracks Played #883
Comments
Same problem here The first track, by artist Pushpa Paghdharey, is supposed to be the FEMALE VERSION of the track. The second track is supposed to be the MALE VERSION. One more thing, the length of the track displayed is incorrect, too. (The female version) |
I'm not sure why my issue was labeled a duplicate of this issue as this is completely different from my issues (#889). The issue I'm having is that when I select the song I specified nothing plays and it locks up the playlist. I'll edit my issue since I apparently wasn't clear about that. |
The underlying reason is same and in your case it just doesn't had any results at all. That's why |
just asking but how does the client work? since it doesn't utilize spotify's api but rather youtube piped and jiosaavn wouldn't it be possible and just make the searches more accurate? |
That's the beauty of open source, you can have a look for yourself and offer a concrete fix for a problem, instead of a vague advice like "just make the searches more accurate". |
i gave that "advice" because i don't know how code works. if i knew i wouldn't be making my initial comment and neither would you. your issue is basically about the same as mine, a track with the similar name but different audio plays, the conclusion i came to was that searches just wasn't accurate |
Probably the same problem here. I tried to play Jaroslav Nohavica's album "Divné století" and the very first song "Divocí koně" and instead of album version I got some live version non present on the album at all. The same happens on Okean Elzy's album Без меж with a track Мить. Instead of album track it plays this reaction on the song: https://www.youtube.com/watch?v=OMI-lhTl7HA Hope it will help with the debugging... |
@skyisthela said:
Completely agree with this. As for the song mismatch problem, I have the same issue with this one https://open.spotify.com/track/5OT2JR7Lf4g4dCJyZ8Xu0f OTOH what I can think of is to make the search and match make sure that tracks from the same album are preferably taken from the same source and same uploader, copyright info, possibly even exist in the same playlist. |
I think the current method is search the song name on YouTube, but maybe it's better to search the Name + Singer. Not sure if it's gonna be better just a possibility. |
For anyone who wants to know how the track is matched for YouTube/Piped (YouTube) spotube/lib/services/sourced_track/sources/youtube.dart Lines 133 to 213 in 2b0d17e
Code Summary for non-codersIt's basically a ranking system that ranks the best matching track. It just assigns points on different kind of matches. Pointing table
Finally, it just sorts the matched tracks by highest point and the first one of them gets played. |
Plex has a function for fixing mismatches when identifying movies etc. Something similar would be great. Edit: I just found the "Alternative track sources"-button. I hope it saves the selected source |
Hi, I also wanted to make a report of a mismatched song being chosen. It seems like there is a problem with the search results, because "I Prevail - There's Fear in Letting Go (Official Music Video)" by "IPrevailBand" exists, but it does not even show up in the alternative sources list. Is there a log to see what videos it matched and what search terms it used? It instead chooses I Prevail - Scars by the same youtube channel. Interestingly, I Prevail- There's Fear in Letting Go does show up in the alternative sources but it has a lower score (I am assuming according to this comment, the score adds up to 4 (pointing table: 1 & 2) whereas Scars' score adds up to 5 (pointing table: 1 & 2 & 4)). On initial look into the code in the linked comment, notably whitespace is not ignored in the band name, which would lead to less score (@IPrevailBand possibly not being matched for the artist "I Prevail"). Might I instead propose a scoring system using a list of ordering criteria similar to your code in the vein of this code block? Perhaps reordering your code to be something more akin to C# OrderBy(...).ThenBy(...) syntax might be preferable to a score. The way that I see it, the main problem lies in the fact that something can be mis-scored easily when there are important indicators that the right video is present. Here is some sample code of what I mean: // Want to say sorry if this isn't valid dart code b/c I have never coded in dart, anyways I hope my point gets across
// stolen from https://github.com/mythz/dart-linq-examples/blob/master/bin/linq-ordering.dart
wrap(value, fn(x)) => fn(value);
// modified from https://github.com/mythz/dart-linq-examples/blob/master/bin/linq-ordering.dart
// see: C# OrderBy(...).ThenBy(...) syntax. The main difference is that I am using `onto` functions to see what to compare instead of directly comparing
List<T> order<T>(List<T> seq, { required List<Function> onAll }) {
return seq..sort((a,b) =>
wrap(onAll.firstWhere((_on) => _on(a).compareTo(_on(b)) != 0, orElse:() => (x) => 0),
(_on) => _on(a).compareTo(_on(b))));
}
List<YoutubeVideoInfo> rankResults(List<YoutubeVideoInfo> results, Track track) {
final notWhitespace = (c) => c != ' '; // or something similar from the standard library, I haven't worked with dart before
final artists = (track.artists ?? [])
.map((ar) => ar.name)
.toList()
.whereNotNull()
.toList();
// we do not care about whitespace, and we want the case to be the same.
// we may also want to ignore stuff like hyphens, quotes, parenthesis, various other symbols here for the best matching
final compareIdeally = (s) => s.toLowerCase().where(notWhitespace);
final byViews = (sibling) => -sibling.views; // negative to sort by descending
final isSameChannelArtist = (sibling) =>
artists.sumBy((artist) {
final isSameChannelArtist = sibling.channelName.toLowerCase() == artist.toLowerCase();
final channelContainsArtist = compareIdeally(sibling.channelName)
.contains(compareIdeally(artist));
return (isSameChannelArtist || channelContainsArtist) ? 1 : 0;
});
final titleContainsArtist = (sibling) =>
artists.sumBy((artist){
final titleContainsArtist = compareIdeally(sibling.title)
.contains(compareIdeally(artist));
return titleContainsArtist ? 1 : 0;
});
final titleContainsTrackName = (sibling) =>
compareIdeally(sibling.title).contains(compareIdeally(track.name));
final hasOfficialFlag = (sibling) => officialMusicRegex.hasMatch(sibling.title.toLowerCase());
final hasTitleAndFlag = (sibling) => titleContainsTrackName(sibling) && hasOfficialFlag(sibling);
// will sort by the value of each of the functions in order.
// not scoring, but continuously fine-tuning the order of the results.
return order(results, onAll: [
isSameChannelArtist, // order first by tracks where the channel contains the artist(s) \ _ considering swapping these two
hasTitleAndFlag, // then by tracks containing the song title and official flag /
titleContainsTrackName, // then by tracks containing track name,
titleContainsArtist, // then by artist in the video title
hasOfficialFlag, // then by (official music video) or whatever the regex is
byViews, // finally by views, in case the same channel uploaded the exact same video twice for some reason
]);
} I also wonder if it would be possible to have users opt in to an external service (by logging in and using our own accounts/api keys) like http://song.link for getting more reliably matching results, although I understand that is a large undertaking. |
I have the same issue since 3 updates ago, now I listen to Bollywood-style music even selecting European playlists |
Faced this issue, here is one more example from my side on how to reproduce:
|
Hi, can I offer an idea that may help? Has anyone tried searching songs using the ISRC? ISRC is a unique serial number for songs, used in the music industry to track plays and royalties. It appears 'isrc' can be collected with Spotify API, and be used to search Youtube for the exact song and version (this includes remixes, covers, etc). Here is a topic about it on Stack Overflow: https://stackoverflow.com/questions/35188813/get-track-information-from-spotify-api-using-isrc-code Edit: I tested this by getting the ISRC of songs and searching Youtube with that ISRC code. It worked correctly 100% of the time on a few songs that I tested. |
Is there an existing issue for this?
Current Behavior
I've been playing several chill/ambient playlists by Spotify. These are usually made from non-popular tracks, sometimes even downright esoteric, which aren't available on YouTube.
It seems like spotube will happily play a track even if there's a clear mismatch between the desired track and the found track. When playing chill/ambient music this is especially bothersome as the mismatching tracks are often upbeat, causing an inconsistent listening experience.
Examples:
These are only two examples -- there are many more like these.
Clearly there's no relation between the desired tracks and the actual tracks played.
Expected Behavior
Play only tracks with title and artist exactly matching. If none are found, skip to next track.
Steps to reproduce
Operating System
Windows
Spotube version
v3.2.0
Installation source
GitHub Releases (Binary)
Additional information
No response
The text was updated successfully, but these errors were encountered: