Viperinius / jellyfin-plugin-spotify-import

Import playlists from Spotify in Jellyfin
GNU General Public License v3.0
28 stars 2 forks source link

Track names contain From "<AlbumName>" #33

Closed Marvur closed 1 week ago

Marvur commented 1 month ago

Description A few track names on Spotify contain following patterns (From "{AlbumName}") [From "{AlbumName}"] — From "{AlbumName}"

Please add an option to use this {AlbumName} for search if such a pattern is found and replace this pattern in the track name search for Jellyfin. In almost all such tracks, the providertrack albumname is "collection" or an "artist homage" name instead of the original album name.

Affected Track(s)

Plugin settings

Logs

Viperinius commented 1 month ago

I'm not sure if I have seen that before, could you please give me an example for such a track / album? A Spotify link to a song and the track and album name on your Jellyfin server would be very helpful for testing this out.

And just to make sure the Github formatting did not mess something up, these are the patterns, right?:

(From "xyz")
[From "xyz"]
- From "xyz"
Marvur commented 1 month ago

Yes, patterns you've mentioned are correct. There are a many such tracks on Spotify and most of my failed matches are of these type.

Examples of each pattern :-

Pattern type Spotify track link Track name on Spotify Spotify Album name Actual/Jellyfin Track name Actual/Jellyfin Album name
(From "xyz") https://open.spotify.com/track/0M0ANKNzmM4Odd7FNKghzW Akhiyaan Gulaab (From "Teri Baaton Mein Aisa Uljha Jiya") Akhiyaan Gulaab (From "Teri Baaton Mein Aisa Uljha Jiya") Akhiyaan Gulaab Teri Baaton Mein Aisa Uljha Jiya
(From "xyz") https://open.spotify.com/track/4A7eOIbt19Wk5OXjVxE3SI Har kisi ko (From "Boss") Love dose Arijit Singh Har kisi ko Boss
- From "xyz" https://open.spotify.com/track/6JmNTcJj7AIYPBazhpCKhF Khoya Tu Kahaan - From "Blind" Khoya Tu Kahaan (From "Blind") Khoya Tu Kahaan Blind

I also saw a another pattern (though much rarer) today that had (From the Netflix movie "XYZ") in the track name on Spotify.

Viperinius commented 1 month ago

While implementing this I noticed something: The second one is actually "misspelled" on Spotify, it is missing the closing quote

Har Kisi Ko (From "Boss)

Which leads to the question whether or not a broken pattern should be accepted as well. I would argue no, the quotes are the only real separator to parse the album name from, especially if there are more words between From and the album title.

Regarding the pattern containing Netflix: This is something that should not be matched as XYZ right? Or is the movie title actually used as the album name locally?

Marvur commented 1 month ago

Great observation, I missed the "spelling" issue with Spotify on the second track. Well, this is an edge case for sure and therefore I agree with you that broken patterns should be ignored. Maintaining such regex rules would get a bit challenging.

For the Netflix example, it should be matched as XYZ as the Movie title is actually the Album name as well (which is the case for any musical movie).

Viperinius commented 1 month ago

For the Netflix example, it should be matched as XYZ as the Movie title is actually the Album name as well (which is the case for any musical movie).

Ah good to know, I'll change the pattern to allow any text between From and the quotes then.

Viperinius commented 3 weeks ago

The new matching option is now available in release 1.9.0.0. After Jellyfin updated the plugin (and a server restart), could you please check if it works for your tracks using this matching type (called Ignore Case + Punctuation + Parentheses Content + Album From Track) now?

Marvur commented 1 week ago

Thanks for the update. Album From Track enhancement works as expected and couldn't find any missed matches as of now.

Viperinius commented 1 week ago

Great to hear, I'll close this for now then