Skip to content

3.0.0

Compare
Choose a tag to compare
@Zastai Zastai released this 26 Apr 15:58

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 from INamedEntity and ITitledEntity
  • Entity Interface: IGenre (derives from ITag)
  • Property: IArea.SortName
  • Property: ILabel.SortName
  • Property: IRelationship.AttributeIds
  • Search Interface: ISearchAttribute<T>
    • this adds an Item property of type T to the Score provided by the base ISearchResult
  • Method: Query.LookupGenre()
  • Method: Query.LookupGenreAsync()

API Removals

  • Entity Interface: IUserRating
  • Entity Interface: IUserTag
  • Property: ICollection.ContentTypeText
    • ContentType will be set to EntityType.Unknown when an unknown value was found (which will then be stored in UnhandledProperties)
  • Property: IDisc.OffsetCount (the count is already available via Offsets)
  • Property: IDiscIdLookupResult.Id
  • Property: INamedEntity.Aliases (moved to IAliasedEntity)
  • Property: IRelationship.TargetTypeText
    • TargetType will be set to EntityType.Unknown when an unknown value was found (which will then be stored in UnhandledProperties)
  • Property: ITitledEntity.Aliases (moved to IAliasedEntity)
  • 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 just Id
    • the Genres and UserGenres properties now return objects of type IGenre
    • the UserRating property now returns objects of type IRating (with a null vote count)
    • the UserTags property now returns objects of type ITag (with a null vote count)
  • IAlias:
    • the Name and Primary properties are no longer nullable
  • IAnnotation:
    • moved from MetaBrainz.MusicBrainz.Interfaces.Searches to MetaBrainz.MusicBrainz.Interfaces.Entities
    • the Type property now has type EntityType
      • it will be set to EntityType.Unknown when an unknown value was found (which will then be stored in UnhandledProperties)
  • IAuthorizationToken:
    • the AccessToken, RefreshToken and TokenType properties are no longer nullable
  • ICdStub:
    • the Id, Title and TrackCount properties are no longer nullable
  • IDisc:
    • the Id and Offsets properties are no longer nullable
  • IIsrc:
    • the Recordings and Value properties are no longer nullable
  • IRating:
    • the VoteCount property is now nullable
  • IRecording:
    • the Length property is now a (nullable) TimeSpan instead of an int
  • IRelationship:
    • the TargetType property is now nullable
  • renamed IRelease.BarCode to Barcode
  • ISearchResult is now an IJsonBasedObject
  • ISearchResults<T>.Created is now a (nullable) DateTimeOffset
  • ISimpleTrack:
    • the Length property is now a (nullable) TimeSpan instead of an int
  • ITag:
    • the Name property is no longer nullable
    • the VoteCount property is now nullable
  • ITrack:
    • the Length property is now a (nullable) TimeSpan instead of an int
  • 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
    • the doc comments were updated and tweaked

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