The central class of the Adore mod, controlling all other AdoreXXX classes. More...
#include <adoreservice.h>
Public Slots | |
void | NowPlaying (const Song &song) |
This is a remnant of the scrobbler type service, maybe deploy an own type in the future... More... | |
void | Scrobble () |
This is a remnant of the scrobbler type service, maybe deploy an own type in the future... More... | |
void | Love () |
This is a remnant of the scrobbler type service, maybe deploy an own type in the future... More... | |
void | Ban () |
This is a remnant of the scrobbler type service, maybe deploy an own type in the future... More... | |
void | ShowConfig () |
This is a remnant of the scrobbler type service, maybe deploy an own type in the future... More... | |
void | ToggleScrobbling () |
This is a remnant of the scrobbler type service, maybe deploy an own type in the future... More... | |
Signals | |
void | AuthenticationComplete (bool success, const QString &error_message) |
remnant of the lastfm implementation. maybe use it in the future for better ui integration More... | |
void | SavedItemsChanged () |
Public Member Functions | |
AdoreService (Application *app, QObject *parent=nullptr) | |
~AdoreService () | |
void | ReloadSettings () |
preserved for future use, does nothing i.t.m. More... | |
virtual QString | Icon () |
bool | IsAuthenticated () const |
bool | IsScrobblingEnabled () const |
bool | AreButtonsVisible () const |
bool | IsScrobbleButtonVisible () const |
bool | PreferAlbumArtist () const |
bool | HasConnectionProblems () const |
void | UpdateSubscriberStatus () |
Static Public Attributes | |
static const char * | kServiceName = "Adore" |
as appears in the settings window More... | |
static const char * | kSettingsGroup = "Adore" |
as appears in the settings navibar More... | |
static const char * | kUrl = "https://restapitest.c3s.cc" |
URL of the REST API, can be overridden in ~/.config/Clementine/Clementine.conf section [Adore] key 'host'. More... | |
static const int | kPort = 443 |
port of the REST API, can be overridden in ~/.config/Clementine/Clementine.conf section [Adore] key 'host' More... | |
static const char * | kUtilizeImp = "/api/v1/util_adore" |
path to the utilization api call of the REST API More... | |
static const char * | kAuthorize = "/account/authorize_client" |
base path to the authorization web page More... | |
static const char * | kRegister = "/api/v1/register" |
path to the player client registration api call of the REST API (meant to submit some extra information about the client at program start) More... | |
static const char * | kPlayerName = "Clementine" |
self explanatory More... | |
static const char * | kPluginVendor = "C3S" |
the creator of the Adore code More... | |
static const char * | kPluginName = "Clementine Adore Mod" |
as Clementine doesn't have a real plugin system, just translate it as ModName or PatchName More... | |
static const char * | kPluginVersion = "0.5" |
version of the the Adore code More... | |
Private Slots | |
void | ProvideAuthenication (QNetworkReply *reply, QAuthenticator *auth) |
this slot is just provided for handling the http authorisation of the test site – disable in AdoreService::AdoreService(). More... | |
void | UtilizeImpReplyFinished (QNetworkReply *reply) |
Handle the clean-up of the reply to the RegisterClient API call. More... | |
void | RegisterClientReplyFinished (QNetworkReply *reply) |
Handle the clean-up of the reply to the RegisterClient API call. More... | |
Private Member Functions | |
lastfm::Track | TrackFromSong (const Song &song) const |
Converts a Clementine song to a lastfm track. More... | |
void | RegisterClient () |
void | ProcessQueued () |
Private Attributes | |
QNetworkAccessManager * | network_ |
lastfm::Audioscrobbler * | scrobbler_ |
zombie base object. remnant of the lastfm implementation. More... | |
lastfm::Track | last_track_ |
needed to keep track of the metadata. More... | |
lastfm::Track | next_metadata_ |
needed to keep track of the metadata. More... | |
bool | scrobbling_enabled_ |
remnant of the lastfm implementation. maybe use it in the future for better ui integration More... | |
bool | buttons_visible_ |
remnant of the lastfm implementation. maybe use it in the future for better ui integration More... | |
bool | scrobble_button_visible_ |
remnant of the lastfm implementation. maybe use it in the future for better ui integration More... | |
bool | prefer_albumartist_ |
remnant of the lastfm implementation. maybe use it in the future for better ui integration More... | |
bool | connection_problems_ |
Useful to inform the user that we can't scrobble right now. remnant of the lastfm implementation. maybe use it in the future for better ui integration. More... | |
Application * | app_ |
AdoreDb | adb |
SQLite db for batch processing. More... | |
AdoreStreamer | astreamer |
GStreamer audio buffer grabber, converter to 11050 Hz mono, and fingerprinter. More... | |
The central class of the Adore mod, controlling all other AdoreXXX classes.
Note: This class is derived from the Scrobbler
service as it fulfills a similar purpose. Only a subset of the Scrobbler
capabilities are used because, for example, no direct user interface elements in the Clementine main window have to be accessed. TODO: Maybe get rid of the Scrobbler
heritage in the future.
|
explicit |
AdoreService::~AdoreService | ( | ) |
|
inline |
|
signal |
remnant of the lastfm implementation. maybe use it in the future for better ui integration
|
slot |
This is a remnant of the scrobbler type service, maybe deploy an own type in the future...
|
inline |
|
inlinevirtual |
bool AdoreService::IsAuthenticated | ( | ) | const |
Returns the authentication status. TODO: not just look if the client uuid is set but evaluate the Register API call if the backend recognizes the uuid!
|
inline |
|
inline |
|
slot |
This is a remnant of the scrobbler type service, maybe deploy an own type in the future...
|
slot |
This is a remnant of the scrobbler type service, maybe deploy an own type in the future...
Analog to the scrobbler slot NowPlaying(). This member marks a new track needs to be fingerprinted and if there is an old track, transfers it to the REST API.
|
inline |
|
private |
This member looks in the queue db (AdoreDb) for played songs that couldn't be transferred to the backend server and processes them. Note: In the corresponding UtilizeImpReplyFinished() this member is called again till no more songs are in the queue (or an error occurs).
|
privateslot |
this slot is just provided for handling the http authorisation of the test site – disable in AdoreService::AdoreService().
|
private |
Player client registration api call of the REST API (meant to submit some extra information about the client at program start)
|
privateslot |
Handle the clean-up of the reply to the RegisterClient API call.
void AdoreService::ReloadSettings | ( | ) |
preserved for future use, does nothing i.t.m.
|
signal |
|
slot |
This is a remnant of the scrobbler type service, maybe deploy an own type in the future...
|
slot |
This is a remnant of the scrobbler type service, maybe deploy an own type in the future...
provided by Clementines service framework to display the settings dialog
|
slot |
This is a remnant of the scrobbler type service, maybe deploy an own type in the future...
|
private |
Converts a Clementine song to a lastfm track.
void AdoreService::UpdateSubscriberStatus | ( | ) |
|
privateslot |
Handle the clean-up of the reply to the RegisterClient API call.
|
private |
|
private |
GStreamer audio buffer grabber, converter to 11050 Hz mono, and fingerprinter.
|
private |
remnant of the lastfm implementation. maybe use it in the future for better ui integration
|
private |
Useful to inform the user that we can't scrobble right now. remnant of the lastfm implementation. maybe use it in the future for better ui integration.
|
static |
base path to the authorization web page
|
static |
self explanatory
|
static |
as Clementine doesn't have a real plugin system, just translate it as ModName or PatchName
|
static |
the creator of the Adore code
|
static |
version of the the Adore code
|
static |
port of the REST API, can be overridden in ~/.config/Clementine/Clementine.conf section [Adore] key 'host'
|
static |
path to the player client registration api call of the REST API (meant to submit some extra information about the client at program start)
|
static |
as appears in the settings window
|
static |
as appears in the settings navibar
|
static |
URL of the REST API, can be overridden in ~/.config/Clementine/Clementine.conf section [Adore] key 'host'.
|
static |
path to the utilization api call of the REST API
|
private |
needed to keep track of the metadata.
|
private |
|
private |
needed to keep track of the metadata.
|
private |
remnant of the lastfm implementation. maybe use it in the future for better ui integration
|
private |
remnant of the lastfm implementation. maybe use it in the future for better ui integration
|
private |
zombie base object. remnant of the lastfm implementation.
|
private |
remnant of the lastfm implementation. maybe use it in the future for better ui integration