Update jellyfin search to run recursively#22
Conversation
LumePart
left a comment
There was a problem hiding this comment.
RefreshLibrary() (line 123) would need an extra parameter to the reqParam variable to refresh metadata:
reqParam := fmt.Sprintf("/Items/%s/Refresh?metadataRefreshMode=FullRefresh", c.LibraryID)
Currently it just searches for new files and doesn't add metadata so item.AlbumArtist can't be used to reliably search for songs
Run full metadata refresh
b5931b4 to
6aef4f4
Compare
|
I can see how that would be... less than ideal! I've added in that param |
|
i realized during my tests that the playlist wasn't being found by the jellyfin search so was creating duplicates. this latest commit should address that as well |
|
|
||
| for _, item := range results.Items { | ||
| if strings.Contains(item.Path, track.File) { | ||
| if track.MainArtist == item.AlbumArtist && strings.Contains(item.Path, track.CleanTitle) { |
There was a problem hiding this comment.
sorry for requesting changes 2 times, this completely slipped my mind. I think strings.Contains(item.Path, track.CleanTitle) can be replaced with item.Name == track.CleanTitle.
Path isn't needed at all anymore (since we're not comparing it with the track.File that was done previously). CleanTitle and Path can differ from each other (special symbols can be in CleanTitle, but are removed in Path), so using item.Name should have a higher match rate.
There was a problem hiding this comment.
i somehow missed this so opened #25 to address it--sorry!
Simplifies search of media in Jellyfin library by looking for clean track title. Adds recursive parameter, the lack of which seemed to be causing Explo to fail to find tracks (just found the artists)
Potentially addresses #14