jellyfin
jellyfin copied to clipboard
Migrate MusicBrainz plugin to MetaBrainz.MusicBrainz
Rebased the original commits onto master, updated the library and adapted the code where necessary.
Supersedes #6369
No changes to OpenAPI specification found. See history of this comment for previous changes.
Are there any chances to see this PR in upcoming 10.8.1 release? Looks like it fixes a bunch of subtle issues with metadata provider :)
Sadly not. The changes are too sever for a maintenance/bugfix release.
Sadly not. The changes are too sever for a maintenance/bugfix release.
Does this mean that it breaks compatibility with current APIs? In that case we have to wait until 10.9.0 right? According to Versioning on this page.
This PR will hopefully soon be merged into master and therefore be part of 10.9.
Well, I rebased this two commits on top of 10.8.x branch and tested on my library. So, by now:
Broken default server
Default server doesn't work with protocol, only as bare hostname. With protocol I got this error:
jellyfin | System.UriFormatException: Invalid URI: The hostname could not be parsed.
jellyfin | at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
jellyfin | at System.Uri..ctor(String uriString)
jellyfin | at System.UriBuilder.get_Uri()
jellyfin | at MetaBrainz.MusicBrainz.Query.BuildUri(String path, String extra)
jellyfin | at MetaBrainz.MusicBrainz.Query.<>c__DisplayClass706_0.<PerformRequestAsync>b__0()
jellyfin | at MetaBrainz.MusicBrainz.Query.ApplyDelayAsync[T](Func`1 request, CancellationToken cancellationToken)
jellyfin | at MetaBrainz.MusicBrainz.Query.PerformRequestAsync(String entity, String id, String extra, CancellationToken cancellationToken)
jellyfin | at MetaBrainz.MusicBrainz.Objects.PagedQueryResults`3.PerformRequestAsync(CancellationToken cancellationToken)
jellyfin | at MetaBrainz.MusicBrainz.Objects.PagedQueryResults`3.NextAsync(CancellationToken cancellationToken)
jellyfin | at MediaBrowser.Providers.Plugins.MusicBrainz.MusicBrainzAlbumProvider.GetMetadata(AlbumInfo info, CancellationToken cancellationToken)
jellyfin | at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
Slightly broken(?) search
Search by release id (album) AND release group simultaneously fails with error:
jellyfin | MetaBrainz.MusicBrainz.QueryException: releases is not a valid inc parameter for the release resource. (For usage, please see: https://musicbrainz.org/development/mmd)
jellyfin | at MetaBrainz.MusicBrainz.Query.PerformRequestAsync(Uri uri, HttpMethod method, HttpContent body, CancellationToken cancellationToken)
jellyfin | at MetaBrainz.MusicBrainz.Query.ApplyDelayAsync[T](Func`1 request, CancellationToken cancellationToken)
jellyfin | at MetaBrainz.MusicBrainz.Query.PerformRequestAsync(String entity, String id, String extra, CancellationToken cancellationToken)
jellyfin | at MetaBrainz.MusicBrainz.Query.PerformRequestAsync[T](String entity, String id, String extra, CancellationToken cancellationToken)
jellyfin | at MetaBrainz.MusicBrainz.Query.LookupReleaseAsync(Guid mbid, Include inc, CancellationToken cancellationToken)
jellyfin | at MediaBrowser.Providers.Plugins.MusicBrainz.MusicBrainzAlbumProvider.GetSearchResults(AlbumInfo searchInfo, CancellationToken cancellationToken)
jellyfin | at MediaBrowser.Providers.Manager.ProviderManager.GetSearchResults[TLookupType](IRemoteSearchProvider`1 provider, TLookupType searchInfo, CancellationToken cancellationToken)
jellyfin | at MediaBrowser.Providers.Manager.ProviderManager.GetRemoteSearchResults[TItemType,TLookupType](RemoteSearchQuery`1 searchInfo, BaseItem referenceItem, CancellationToken cancellationToken)
I used UUIDs for this album:
https://musicbrainz.org/release/c8c3a48a-2209-4474-b689-1bf74987ad9a https://musicbrainz.org/release-group/c3009a4b-d532-4bff-8510-01eb2cee8c3b
Also, search just by release
hangs forever.
Also thanks a lot for your work, @Shadowghost :) The code is really cleaner now. I'll help test this feature on my music library.
Your first issue is a known one from the original PR: https://github.com/jellyfin/jellyfin/pull/6369
I'll take a look at the second issue if I find some time.
@Orhideous the second issue should be fixed now. I accidentially set some options which are not supported.
@Shadowghost Thanks! I'll test this PR ASAP.
@Orhideous what's your verdict on this and the other PR?