LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
Media::IDiscographyProvider Class Referenceabstract

Interface for plugins supporting getting artist discography. More...

#include "idiscographyprovider.h"

Public Types

using Result_t = LC::Util::Either< QString, QList< ReleaseInfo > >
 The result of an audio search query. More...
 

Public Member Functions

virtual ~IDiscographyProvider ()
 
virtual QString GetServiceName () const =0
 Returns the service name. More...
 
virtual QFuture< Result_tGetDiscography (const QString &artist, const QStringList &hints)=0
 Fetches all the discography of the given artist. More...
 
virtual QFuture< Result_tGetReleaseInfo (const QString &artist, const QString &release)=0
 Fetches contents of the given release by the artist. More...
 

Detailed Description

Interface for plugins supporting getting artist discography.

Plugins that support fetching artists discography from sources like MusicBrainz should implement this interface.

Discography includes various types of releases (albums, EPs, singles, etc) as well as the corresponding lists of tracks in those releases.

Definition at line 107 of file idiscographyprovider.h.

Member Typedef Documentation

◆ Result_t

The result of an audio search query.

The result of an audio search query is either a string with a human-readable error text, or a list of result items.

See also
Results_t

Definition at line 119 of file idiscographyprovider.h.

Constructor & Destructor Documentation

◆ ~IDiscographyProvider()

virtual Media::IDiscographyProvider::~IDiscographyProvider ( )
inlinevirtual

Definition at line 110 of file idiscographyprovider.h.

Member Function Documentation

◆ GetDiscography()

virtual QFuture<Result_t> Media::IDiscographyProvider::GetDiscography ( const QString &  artist,
const QStringList &  hints 
)
pure virtual

Fetches all the discography of the given artist.

This function initiates a search for artist discography and returns a handle through which the results of the search could be obtained.

All known releases of this artist are returned through the handle.

The handle owns itself and deletes itself after results are available — see its documentation for details.

Parameters
[in]artistThe artist name.
Returns
The pending discography search handle.

◆ GetReleaseInfo()

virtual QFuture<Result_t> Media::IDiscographyProvider::GetReleaseInfo ( const QString &  artist,
const QString &  release 
)
pure virtual

Fetches contents of the given release by the artist.

This function initiates a search for the given release of the given artist and returns a release query result future.

Parameters
[in]artistThe artist name.
[in]releaseThe release name to search for.
Returns
The pending discography search future.

◆ GetServiceName()

virtual QString Media::IDiscographyProvider::GetServiceName ( ) const
pure virtual

Returns the service name.

This string returns a human-readable string with the service name, like "MusicBrainz".

Returns
The human-readable service name.

The documentation for this class was generated from the following file: