3.0.0
v3.0.0 (2020-04-26)
This release has a completely rewritten JSON backend, using custom converters for flexibility.
Search processing was changed significantly. Instead of every searchable entity having a Score property, searches now return lists of ISearchResult<T>
, which contain the found item and its score. In addition, all the FindXXX()
methods now take an optional simple
parameter, to disable the advanced query syntax.
This release also adds proper support for genres, including lookups, using a new IGenre
interface.
Note that there are several breaking API changes in this release (hence the major version bump).
API Additions
- Entity Interface:
IAliasedEntity
- this contains the
Aliases
property, moved fromINamedEntity
andITitledEntity
- this contains the
- Entity Interface:
IGenre
(derives fromITag
) - Property:
IArea.SortName
- Property:
ILabel.SortName
- Property:
IRelationship.AttributeIds
- Search Interface:
ISearchAttribute<T>
- this adds an
Item
property of typeT
to theScore
provided by the baseISearchResult
- this adds an
- Method:
Query.LookupGenre()
- Method:
Query.LookupGenreAsync()
API Removals
- Entity Interface:
IUserRating
- Entity Interface:
IUserTag
- Property:
ICollection.ContentTypeText
ContentType
will be set toEntityType.Unknown
when an unknown value was found (which will then be stored inUnhandledProperties
)
- Property:
IDisc.OffsetCount
(the count is already available viaOffsets
) - Property:
IDiscIdLookupResult.Id
- Property:
INamedEntity.Aliases
(moved toIAliasedEntity
) - Property:
IRelationship.TargetTypeText
TargetType
will be set toEntityType.Unknown
when an unknown value was found (which will then be stored inUnhandledProperties
)
- Property:
ITitledEntity.Aliases
(moved toIAliasedEntity
) - Search Interface:
IFoundAnnotation
- Search Interface:
IFoundArea
- Search Interface:
IFoundArtist
- Search Interface:
IFoundCdStub
- Search Interface:
IFoundEvent
- Search Interface:
IFoundInstrument
- Search Interface:
IFoundLabel
- Search Interface:
IFoundPlace
- Search Interface:
IFoundRecording
- Search Interface:
IFoundRelease
- Search Interface:
IFoundReleaseGroup
- Search Interface:
IFoundSeries
- Search Interface:
IFoundTag
- Search Interface:
IFoundUrl
- Search Interface:
IFoundWork
API Changes
- Global:
- the
MbId
property was renamed to justId
- the
Genres
andUserGenres
properties now return objects of typeIGenre
- the
UserRating
property now returns objects of typeIRating
(with a null vote count) - the
UserTags
property now returns objects of typeITag
(with a null vote count)
- the
IAlias
:- the
Name
andPrimary
properties are no longer nullable
- the
IAnnotation
:- moved from
MetaBrainz.MusicBrainz.Interfaces.Searches
toMetaBrainz.MusicBrainz.Interfaces.Entities
- the
Type
property now has typeEntityType
- it will be set to
EntityType.Unknown
when an unknown value was found (which will then be stored inUnhandledProperties
)
- it will be set to
- moved from
IAuthorizationToken
:- the
AccessToken
,RefreshToken
andTokenType
properties are no longer nullable
- the
ICdStub
:- the
Id
,Title
andTrackCount
properties are no longer nullable
- the
IDisc
:- the
Id
andOffsets
properties are no longer nullable
- the
IIsrc
:- the
Recordings
andValue
properties are no longer nullable
- the
IRating
:- the
VoteCount
property is now nullable
- the
IRecording
:- the
Length
property is now a (nullable)TimeSpan
instead of anint
- the
IRelationship
:- the
TargetType
property is now nullable
- the
- renamed
IRelease.BarCode
toBarcode
ISearchResult
is now anIJsonBasedObject
ISearchResults<T>.Created
is now a (nullable)DateTimeOffset
ISimpleTrack
:- the
Length
property is now a (nullable)TimeSpan
instead of anint
- the
ITag
:- the
Name
property is no longer nullable - the
VoteCount
property is now nullable
- the
ITrack
:- the
Length
property is now a (nullable)TimeSpan
instead of anint
- the
- the
Query.FindXxx()
methods:- return value is now
ISearchResults<ISearchResult<IXxx>>
- in other words, the score is now moved up into a wrapper object
- extra optional parameter
simple
- if passed as
true
, the advanced query syntax is disabled, making for a simpler use case
- if passed as
- the doc comments were updated and tweaked
- return value is now
Other Changes
- a workaround for SEARCH-444 was added for URL entities too
- minor tweaks to the
OAuth2
class, slightly improving its async processing
Dependency Updates
- JetBrainz.Annotations → 2020.1.0
- MetaBrainz.Common.Json → 3.0.0
- System.Text.Json → 4.7.1