Added scrobbling button in main window and a global shortcut for

toggling it. Fixes issue 1090
Improved last.fm error handling
This commit is contained in:
Andrea Decorte 2011-04-07 16:25:52 +00:00
parent 55021ef67d
commit 5d8f1fe872
64 changed files with 737 additions and 72 deletions

View File

@ -303,5 +303,7 @@
<file>icons/32x32/network-server.png</file>
<file>icons/48x48/network-server.png</file>
<file>providers/musicbrainz.png</file>
<file>last.fm/as_disabled.png</file>
<file>last.fm/as_light.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
data/last.fm/as_light.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -58,6 +58,7 @@ GlobalShortcuts::GlobalShortcuts(QObject *parent)
AddShortcut("show_osd", tr("Show OSD"), SIGNAL(ShowOSD()));
AddShortcut("shuffle_mode", tr("Change shuffle mode"), SIGNAL(CycleShuffleMode()));
AddShortcut("repeat_mode", tr("Change repeat mode"), SIGNAL(CycleRepeatMode()));
AddShortcut("toggle_last_fm_scrobbling", tr("Enable/disable Last.fm scrobbling"), SIGNAL(ToggleScrobbling()));
AddRatingShortcut("rate_zero_star", tr("Rate the current song 0 stars"), rating_signals_mapper_, 0);
AddRatingShortcut("rate_one_star", tr("Rate the current song 1 star"), rating_signals_mapper_, 1);

View File

@ -71,6 +71,7 @@ signals:
void RateCurrentSong(int);
void CycleShuffleMode();
void CycleRepeatMode();
void ToggleScrobbling();
private:
void AddShortcut(const QString& id, const QString& name, const char* signal,

View File

@ -155,7 +155,7 @@ void Player::TrackEnded() {
}
if (current_item_ && current_item_->IsLocalLibraryItem() &&
current_item_->Metadata().id() != -1 && !playlists_->active()->has_scrobbled()) {
current_item_->Metadata().id() != -1 && playlists_->active()->get_lastfm_status() != Playlist::LastFM_Scrobbled) {
// The track finished before its scrobble point (30 seconds), so increment
// the play count now.
playlists_->library_backend()->IncrementPlayCountAsync(
@ -298,7 +298,9 @@ void Player::SeekTo(int seconds) {
// If we seek the track we don't want to submit it to last.fm
qDebug() << "Track seeked to" << nanosec << "ns - not scrobbling";
playlists_->active()->set_scrobbled(true);
if (playlists_->active()->get_lastfm_status() == Playlist::LastFM_New) {
playlists_->active()->set_lastfm_status(Playlist::LastFM_Skipped);
}
emit Seeked(nanosec / 1000);
}

View File

@ -89,7 +89,7 @@ Playlist::Playlist(PlaylistBackend* backend,
current_virtual_index_(-1),
is_shuffled_(false),
scrobble_point_(-1),
has_scrobbled_(false),
lastfm_status_(LastFM_New),
playlist_sequence_(NULL),
ignore_sorting_(false),
undo_stack_(new QUndoStack(this))
@ -1335,7 +1335,7 @@ void Playlist::UpdateScrobblePoint() {
240ll * kNsecPerSec);
}
has_scrobbled_ = false;
set_lastfm_status(LastFM_New);
}
void Playlist::Clear() {

View File

@ -118,6 +118,19 @@ class Playlist : public QAbstractListModel {
Role_CanSetRating,
};
enum LastFMStatus {
//new song to scrobble
LastFM_New = 0,
//song already scrobbled
LastFM_Scrobbled,
//song we don't want to scrobble, e.g. if we seeked through it
LastFM_Skipped,
//error submitting
LastFM_Error,
//invalid Song, e.g. tags not available
LastFM_Invalid
};
static const char* kRowsMimetype;
static const char* kPlayNowMimetype;
@ -183,8 +196,8 @@ class Playlist : public QAbstractListModel {
// Scrobbling
qint64 scrobble_point_nanosec() const { return scrobble_point_; }
bool has_scrobbled() const { return has_scrobbled_; }
void set_scrobbled(bool v) { has_scrobbled_ = v; }
LastFMStatus get_lastfm_status() const { return lastfm_status_; }
void set_lastfm_status(LastFMStatus status) {lastfm_status_ = status; }
// Changing the playlist
void InsertItems (const PlaylistItemList& items, int pos = -1, bool play_now = false, bool enqueue = false);
@ -334,7 +347,7 @@ class Playlist : public QAbstractListModel {
bool is_shuffled_;
qint64 scrobble_point_;
bool has_scrobbled_;
LastFMStatus lastfm_status_;
PlaylistSequence* playlist_sequence_;

View File

@ -81,6 +81,7 @@ void LastFMConfig::Load() {
ui_->username->setText(lastfm::ws::Username);
ui_->scrobble->setChecked(service_->IsScrobblingEnabled());
ui_->love_ban_->setChecked(service_->AreButtonsVisible());
ui_->scrobble_button->setChecked(service_->IsScrobbleButtonVisible());
ui_->sign_out->setEnabled(!lastfm::ws::SessionKey.isEmpty());
}
@ -89,6 +90,7 @@ void LastFMConfig::Save() {
s.beginGroup(LastFMService::kSettingsGroup);
s.setValue("ScrobblingEnabled", ui_->scrobble->isChecked());
s.setValue("ShowLoveBanButtons", ui_->love_ban_->isChecked());
s.setValue("ShowScrobbleButton", ui_->scrobble_button->isChecked());
s.endGroup();
service_->ReloadSettings();

View File

@ -94,6 +94,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="scrobble_button">
<property name="text">
<string>Show the scrobble button in the main window</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@ -29,6 +29,7 @@
#include <lastfm/Audioscrobbler>
#include <lastfm/misc.h>
#include <lastfm/RadioStation>
#include <lastfm/Scrobble>
#include <lastfm/ws.h>
#include <lastfm/XmlQuery>
@ -36,6 +37,7 @@
#include <QSettings>
using boost::scoped_ptr;
using lastfm::Scrobble;
using lastfm::XmlQuery;
uint qHash(const lastfm::Track& track) {
@ -73,6 +75,8 @@ LastFMService::LastFMService(RadioModel* parent)
neighbours_list_(NULL)
{
ReloadSettings();
//we emit the signal the first time to be sure the buttons are in the right state
emit ScrobblingEnabledChanged(scrobbling_enabled_);
context_menu_->addActions(GetPlaylistActions());
remove_action_ = context_menu_->addAction(
@ -97,15 +101,20 @@ LastFMService::~LastFMService() {
}
void LastFMService::ReloadSettings() {
bool scrobbling_enabled_old = scrobbling_enabled_;
QSettings settings;
settings.beginGroup(kSettingsGroup);
lastfm::ws::Username = settings.value("Username").toString();
lastfm::ws::SessionKey = settings.value("Session").toString();
scrobbling_enabled_ = settings.value("ScrobblingEnabled", true).toBool();
buttons_visible_ = settings.value("ShowLoveBanButtons", true).toBool();
scrobble_button_visible_ = settings.value("ShowScrobbleButton", true).toBool();
emit ScrobblingEnabledChanged(scrobbling_enabled_);
//avoid emitting signal if it's not changed
if(scrobbling_enabled_old != scrobbling_enabled_)
emit ScrobblingEnabledChanged(scrobbling_enabled_);
emit ButtonVisibilityChanged(buttons_visible_);
emit ScrobbleButtonVisibilityChanged(scrobble_button_visible_);
}
void LastFMService::ShowConfig() {
@ -394,6 +403,7 @@ bool LastFMService::InitScrobbler() {
if (!scrobbler_)
scrobbler_ = new lastfm::Audioscrobbler(kAudioscrobblerClientId);
connect(scrobbler_, SIGNAL(status(int)), SLOT(Status(int)));
return true;
}
@ -415,6 +425,15 @@ void LastFMService::NowPlaying(const Song &song) {
last_track_ = TrackFromSong(song);
//check immediately if the song is valid
Scrobble::Invalidity invalidity;
if (!lastfm::Scrobble(last_track_).isValid( &invalidity )) {
//for now just notify this, we can also see the cause
emit ScrobblerStatus(-1);
return;
}
lastfm::MutableTrack mtrack(last_track_);
mtrack.stamp();
last_track_ = mtrack;
@ -769,3 +788,21 @@ PlaylistItemPtr LastFMService::PlaylistItemForUrl(const QUrl& url) {
return ret;
}
void LastFMService::ToggleScrobbling() {
//toggle status
scrobbling_enabled_ = !scrobbling_enabled_;
//save to the settings
QSettings s;
s.beginGroup(kSettingsGroup);
s.setValue("ScrobblingEnabled", scrobbling_enabled_);
s.endGroup();
emit ScrobblingEnabledChanged(scrobbling_enabled_);
}
void LastFMService::Status(int value) {
//reemit it since the sender is private
emit ScrobblerStatus(value);
}

View File

@ -96,6 +96,7 @@ class LastFMService : public RadioService {
bool IsAuthenticated() const;
bool IsScrobblingEnabled() const { return scrobbling_enabled_; }
bool AreButtonsVisible() const { return buttons_visible_; }
bool IsScrobbleButtonVisible() const { return scrobble_button_visible_; }
void Authenticate(const QString& username, const QString& password);
void SignOut();
@ -110,11 +111,14 @@ class LastFMService : public RadioService {
void Love();
void Ban();
void ShowConfig();
void ToggleScrobbling();
signals:
void AuthenticationComplete(bool success);
void ScrobblingEnabledChanged(bool value);
void ButtonVisibilityChanged(bool value);
void ScrobbleButtonVisibilityChanged(bool value);
void ScrobblerStatus(int value);
protected:
QModelIndex GetCurrentIndex();
@ -127,6 +131,8 @@ class LastFMService : public RadioService {
void TunerTrackAvailable();
void TunerError(lastfm::ws::Error error);
void Status(int value);
void AddArtistRadio();
void AddTagRadio();
void AddCustomRadio();
@ -184,6 +190,7 @@ class LastFMService : public RadioService {
bool scrobbling_enabled_;
bool buttons_visible_;
bool scrobble_button_visible_;
QStandardItem* artist_list_;
QStandardItem* tag_list_;

View File

@ -929,6 +929,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2226,6 +2229,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2505,6 +2511,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -943,6 +943,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2240,6 +2243,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2519,6 +2525,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -952,6 +952,9 @@ msgstr "Разреши еквалазйзера"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Разреши бързите клавиши,само когато Клемнтин е активен прозорец"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Въведете ново име за тази плейлиста"
@ -2268,6 +2271,9 @@ msgstr "Показвай само песни без етикети"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Показване на бутоните \"харесвам\" и \"бан\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Показване на икона в областта за уведомяване"
@ -2565,6 +2571,9 @@ msgstr "Превключване на пълен екран"
msgid "Toggle queue status"
msgstr "Покажи статус на опашката"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Инструменти"

View File

@ -946,6 +946,9 @@ msgstr "Aktivañ ar c'hevataler"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Aotren ar beradennoù pa vez enaouet prenestr Clementine nemetken"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Lakait un anv evit al listenn lenn"
@ -2250,6 +2253,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2529,6 +2535,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -956,6 +956,9 @@ msgstr "Habilitar l'equalitzador"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Habilitar les dreceres només quan Clementine tengui el focus"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Introduïu un nom per aquesta llista de reproducció"
@ -2263,6 +2266,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Mostrar la icona a la safata"
@ -2552,6 +2558,9 @@ msgstr "Commuta a pantalla completa"
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Eines"

View File

@ -953,6 +953,9 @@ msgstr "Povolit ekvalizér"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Povolit zkratky jen když je Clementine zaměřena"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Zadejte název pro tento seznam skladeb"
@ -2265,6 +2268,9 @@ msgstr "Ukázat pouze neoznačené"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Ukázat tlačítka \"Oblíbit\" a \"Zakázat\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Ukázat ikonu v oznamovací oblasti"
@ -2557,6 +2563,9 @@ msgstr "Zapnout/Vypnout zobrazení na celou obrazovku"
msgid "Toggle queue status"
msgstr "Přepnout stav řady"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Nástroje"
@ -2915,6 +2924,9 @@ msgstr "Zastavit"
msgid "track %1"
msgstr "Skladba %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "&Show tray icon"
#~ msgstr "Zobrazit ikonu v &systémovém panelu"
@ -2987,9 +2999,6 @@ msgstr "Skladba %1"
#~ msgid "Help"
#~ msgstr "Nápověda"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Enter your Last.fm details below:"
#~ msgstr "Níže zadejte přihlašovací údaje pro Last.fm:"

View File

@ -929,6 +929,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2226,6 +2229,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2505,6 +2511,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -930,6 +930,9 @@ msgstr "Aktivér equalizer"
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2231,6 +2234,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Vis \"elsker\" og \"bandlys\"-knapperne"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Vis statusikon"
@ -2510,6 +2516,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Værktøjer"
@ -2848,6 +2857,9 @@ msgstr ""
msgid "track %1"
msgstr "spor %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Last.fm Recommended Radio - %1"
#~ msgstr "Last.fm anbefaletradio - %1"
@ -2915,9 +2927,6 @@ msgstr "spor %1"
#~ msgid "Options"
#~ msgstr "Indstillinger"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Enter your Last.fm details below:"
#~ msgstr "Indtast dine Last.fm-detaljer herunder:"

View File

@ -958,6 +958,9 @@ msgstr "Equalizer aktivieren"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Tastenkürzel nur aktivieren, wenn Clementine fokussiert ist"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Neuer Name für diese Wiedergabeliste"
@ -2272,6 +2275,9 @@ msgstr "Nur Stücke ohne Metadaten zeigen"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "\"Lieben\" und \"Bannen\" Knöpfe anzeigen"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Benachrichtigungssymbol anzeigen"
@ -2568,6 +2574,9 @@ msgstr "Vollbild an/aus"
msgid "Toggle queue status"
msgstr "Einreihungsstatus ändern"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Werkzeuge"
@ -2929,6 +2938,9 @@ msgstr "Anhalten"
msgid "track %1"
msgstr "Stück %1"
#~ msgid "..."
#~ msgstr "…"
#~ msgid "Similar Artists to %1"
#~ msgstr "Ähnliche Interpreten wie %1"
@ -2975,9 +2987,6 @@ msgstr "Stück %1"
#~ msgid "Options"
#~ msgstr "Einstellungen"
#~ msgid "..."
#~ msgstr "…"
#~ msgid "Enter your Last.fm details below:"
#~ msgstr "Geben Sie hier Ihre Last.fm Daten ein:"

View File

@ -966,6 +966,9 @@ msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
"Ενεργοποίηση των συντομεύσεων μόνο όταν ο Clementine είναι στο προσκήνιο"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Εισαγωγή νέου ονόματος για την λίστα αναπαραγωγής"
@ -2284,6 +2287,9 @@ msgstr "Εμφάνιση μόνο μη επισημασμένων"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Εμφάνισε τα κουμπιά \"αγάπη\"και \"απαγόρευση\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Εμφάνιση εικονιδίου συστήματος"
@ -2586,6 +2592,9 @@ msgstr "Εναλλαγή πλήρης οθόνης"
msgid "Toggle queue status"
msgstr "Εναλλαγή της κατάστασης της λίστας αναμονής"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Εργαλεία"
@ -2948,6 +2957,9 @@ msgstr "διακοπή"
msgid "track %1"
msgstr "κομμάτι %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "&Show tray icon"
#~ msgstr "&Εμφάνιση εικονιδίου συστήματος"
@ -3036,9 +3048,6 @@ msgstr "κομμάτι %1"
#~ msgid "Options"
#~ msgstr "Επιλογές"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Enter your Last.fm details below:"
#~ msgstr "Εισάγετε τις λεπτομέρειες για το Last.fm:"

View File

@ -929,6 +929,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2226,6 +2229,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2505,6 +2511,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -931,6 +931,9 @@ msgstr "Enable equalizer"
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Enter a new name for this playlist"
@ -2230,6 +2233,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Show the \"love\" and \"ban\" buttons"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Show tray icon"
@ -2509,6 +2515,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Tools"

View File

@ -929,6 +929,9 @@ msgstr "Enable equalizer"
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2227,6 +2230,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Show the \"love\" and \"ban\" buttons"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Show tray icon"
@ -2506,6 +2512,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Tools"
@ -2844,6 +2853,9 @@ msgstr ""
msgid "track %1"
msgstr "track %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Hide..."
#~ msgstr "Hide..."
@ -2911,9 +2923,6 @@ msgstr "track %1"
#~ msgid "Options"
#~ msgstr "Options"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Enter your Last.fm details below:"
#~ msgstr "Enter your Last.fm details below:"

View File

@ -929,6 +929,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2226,6 +2229,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2505,6 +2511,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -963,6 +963,9 @@ msgstr "Habilitar el ecualizador"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Activar atajos solo cuando Clementine tenga el foco"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Ingrese un nuevo nombre para esta lista de reproducción"
@ -2282,6 +2285,9 @@ msgstr "Mostrar canciones sin etiquetar solamente"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Mostrar los botones \"Me encanta\" y \"Prohibir\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Mostrar icono en el área de notificación"
@ -2578,6 +2584,9 @@ msgstr "Pantalla completa"
msgid "Toggle queue status"
msgstr "Cambiar estado de la cola"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Herramientas"
@ -2939,6 +2948,9 @@ msgstr "detener"
msgid "track %1"
msgstr "Pista %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "&Show tray icon"
#~ msgstr "&Mostrar icono de la bandeja"
@ -3008,9 +3020,6 @@ msgstr "Pista %1"
#~ msgid "Options"
#~ msgstr "Opciones"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Enter your Last.fm details below:"
#~ msgstr "Ingrese su información de Last.fm debajo:"

View File

@ -929,6 +929,9 @@ msgstr "Luba ekvalaiser"
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2227,6 +2230,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Paneeliikooni näitamine"
@ -2506,6 +2512,9 @@ msgstr "Lülita täisekraani"
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Töövahendid"

View File

@ -929,6 +929,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2226,6 +2229,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2505,6 +2511,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -934,6 +934,9 @@ msgstr "Käytä taajuuskorjainta"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Käytä pikanäppäimiä vain Clementinen ollessa avoinna"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Anna uusi nimi tälle soittolistalle"
@ -2237,6 +2240,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Näytä \"tykkää\"- ja \"en tykkää\"-painikkeet"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Näytä ilmoitusalueen kuvake"
@ -2525,6 +2531,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Työkalut"

View File

@ -965,6 +965,9 @@ msgstr ""
"Autoriser les raccourcis uniquement lorsque la fenêtre de Clementine est "
"active"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Saisissez un nom pour la liste de lecture"
@ -2286,6 +2289,9 @@ msgstr "Afficher uniquement les morceaux sans tag"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Afficher les boutons « j'aime » et « je déteste »"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Afficher l'icône dans la zone de notifications"
@ -2587,6 +2593,9 @@ msgstr "Basculer en mode plein écran"
msgid "Toggle queue status"
msgstr "Basculer l'état de la file d'attente"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Outils"
@ -2949,6 +2958,9 @@ msgstr "stop"
msgid "track %1"
msgstr "piste %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "&Show tray icon"
#~ msgstr "&Afficher l'icône"
@ -3030,9 +3042,6 @@ msgstr "piste %1"
#~ msgid "Help"
#~ msgstr "Aide"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Enter your Last.fm details below:"
#~ msgstr "Inscrivez vos identifiants Last.fm ci-dessous :"

View File

@ -937,6 +937,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2235,6 +2238,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2514,6 +2520,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -944,6 +944,9 @@ msgstr "אפשור אקולייזר"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "אפשר קיצורי מקלדת רק כאשר Clementine נמצא בפוקוס"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "הזן שם חדש לרשימת ההשמעה הזו"
@ -2246,6 +2249,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "להציג את הלחצנים \"אוהב\" ו-\"חסום\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "הצגת סמל במגשית המערכת"
@ -2529,6 +2535,9 @@ msgstr "הפעלה או כיבוי של מסך מלא"
msgid "Toggle queue status"
msgstr "החלף מצב התור"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "כלים"

View File

@ -929,6 +929,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2226,6 +2229,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2505,6 +2511,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -956,6 +956,9 @@ msgstr "Omogući ekvilajzer"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Omogući prečac samo ako je Clementine fokusiran"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Unesite novi naziv za popis izvođenja"
@ -2265,6 +2268,9 @@ msgstr "Prikaži samo neoznačene pjesme"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Prikaži \"Sviđa mi se\" i \"Zabrana\" tipku"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Prikaži tray ikonu"
@ -2557,6 +2563,9 @@ msgstr "Prikaži preko cijelog ekrana"
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Alati"

View File

@ -955,6 +955,9 @@ msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
"Gyorsbillentyűk engedélyezése csak akkor, ha a Clementine fókuszba kerül"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Adjon meg új nevet ennek a lejátszási listának"
@ -2271,6 +2274,9 @@ msgstr "Csak a címke nélküliek mutatása"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Jelenítse meg a \"kedvenc\" és \"tiltás\" gombokat"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Tálcaikon megjelenítése"
@ -2565,6 +2571,9 @@ msgstr "Teljes képernyő"
msgid "Toggle queue status"
msgstr "Sorállapot megjelenítése"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Eszközök"

View File

@ -929,6 +929,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2226,6 +2229,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2505,6 +2511,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -958,6 +958,9 @@ msgstr "Abilita equalizzatore"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Abilita le scorciatoie solo quando Clementine è in primo piano"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Inserisci un nuovo nome per questa scaletta"
@ -2277,6 +2280,9 @@ msgstr "Mostra solo i brani senza tag"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Mostra i pulsanti \"Mi piace\" e \"Vieta\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Mostra icona nel vassoio"
@ -2580,6 +2586,9 @@ msgstr "Attiva la modalità a schermo intero"
msgid "Toggle queue status"
msgstr "Cambia lo stato della coda"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Strumenti"
@ -2939,6 +2948,9 @@ msgstr "ferma"
msgid "track %1"
msgstr "traccia %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Hide..."
#~ msgstr "Nascondi..."
@ -3006,9 +3018,6 @@ msgstr "traccia %1"
#~ msgid "Options"
#~ msgstr "Opzioni"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Enter your Last.fm details below:"
#~ msgstr "Inserisci di seguito i tuoi dettagli Last.fm:"

View File

@ -946,6 +946,9 @@ msgstr "イコライザーを有効にする"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Clementine にフォーカスがあるときのみショートカットを有効にする"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "このプレイリストの名前を入力します"
@ -2255,6 +2258,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "\"Love\" および \"Ban\" ボタンを表示する"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "トレイ アイコンを表示する"
@ -2542,6 +2548,9 @@ msgstr "全画面表示の切り替え"
msgid "Toggle queue status"
msgstr "キュー状態の切り替え"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "ツール"

View File

@ -929,6 +929,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2226,6 +2229,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2505,6 +2511,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -953,6 +953,9 @@ msgstr "Įjungti glodintuvą"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Įgalinti kombinacijas tik tada kai Clementine yra aktyvus"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Įveskite naują pavadinimą šiam grojaraščiui"
@ -2265,6 +2268,9 @@ msgstr "Rodyti tik be žyių"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Rodyti \"meilė\" ir \"blokavimas\" mygtukus"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Rodyti piktogramą sistemos dėkle"
@ -2553,6 +2559,9 @@ msgstr "Visame ekrane"
msgid "Toggle queue status"
msgstr "Perjungti eilės statusą"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Įrankiai"

View File

@ -929,6 +929,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2226,6 +2229,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2505,6 +2511,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Rīki"

View File

@ -940,6 +940,9 @@ msgstr "Slå på equalizer"
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2238,6 +2241,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Vis \"Elsk\" og \"Bannlys\" knappene"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Vis systemkurvikon"
@ -2518,6 +2524,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Verktøy"
@ -2856,6 +2865,9 @@ msgstr "stopp"
msgid "track %1"
msgstr "spor %1"
#~ msgid "..."
#~ msgstr "…"
#~ msgid "Hide %1"
#~ msgstr "Skjul %1"
@ -2932,9 +2944,6 @@ msgstr "spor %1"
#~ msgid "Help"
#~ msgstr "Hjelp"
#~ msgid "..."
#~ msgstr "…"
#~ msgid "Options"
#~ msgstr "Instillinger"

View File

@ -957,6 +957,9 @@ msgstr "Equalizer inschakelen"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Sneltoetsen alleen inschakelen wanneer Clementine de focus heeft"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Voer een nieuwe naam in voor deze afspeellijst"
@ -2274,6 +2277,9 @@ msgstr "Alleen zonder tags tonen"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "\"Mooi\" en \"ban\" knoppen weergeven"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Systeemvakpictogram weergeven"
@ -2575,6 +2581,9 @@ msgstr "Volledig scherm aan/uit"
msgid "Toggle queue status"
msgstr "Wachtrijstatus aan/uit"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Hulpmiddelen"

View File

@ -929,6 +929,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2226,6 +2229,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Afichar l'icòna dins la bóstia de miniaturas"
@ -2505,6 +2511,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Aisinas"
@ -2843,6 +2852,9 @@ msgstr ""
msgid "track %1"
msgstr "pista %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Options"
#~ msgstr "Opcions"
@ -2866,6 +2878,3 @@ msgstr "pista %1"
#~ msgid "Help"
#~ msgstr "Ajuda"
#~ msgid "..."
#~ msgstr "..."

View File

@ -929,6 +929,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2226,6 +2229,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2505,6 +2511,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -954,6 +954,9 @@ msgstr "Włącz korektor dźwięku"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Włącz skróty tylko, gdy Clementine jest aktywny"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Wpisz nową nazwę dla listy odtwarzania"
@ -2268,6 +2271,9 @@ msgstr "Pokaż tylko nieoznaczone"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Pokaż przyciski \"Dodaj do ulubionych\" i \"Ignoruj\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Pokaż ikonkę w tacce systemowej"
@ -2561,6 +2567,9 @@ msgstr "Przełącz tryb pełnoekranowy"
msgid "Toggle queue status"
msgstr "Przełącz stan kolejki"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Narzędzia"
@ -2921,6 +2930,9 @@ msgstr "zatrzymaj"
msgid "track %1"
msgstr "utwór %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "&Show tray icon"
#~ msgstr "&Pokaż ikonę w trayu"
@ -2990,9 +3002,6 @@ msgstr "utwór %1"
#~ msgid "Options"
#~ msgstr "Opcje"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Enter your Last.fm details below:"
#~ msgstr "Podaj swoje dane dla Last.fm:"

View File

@ -957,6 +957,9 @@ msgstr "Ativar equalizador"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Apenas ativar os atalhos se o Clementine estiver realçado"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Indique o nome para esta lista de reprodução"
@ -2272,6 +2275,9 @@ msgstr "Mostrar apenas músicas sem detalhes"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Mostrar os botões \"adorar\" e \"banir\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Mostrar ícone na área de notificação"
@ -2571,6 +2577,9 @@ msgstr "Trocar para ecrã completo"
msgid "Toggle queue status"
msgstr "Trocar o estado da fila"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Ferramentas"
@ -2930,6 +2939,9 @@ msgstr "parar"
msgid "track %1"
msgstr "música %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Enter a name for the new playlist"
#~ msgstr "Indique o nome para a lista de reprodução"
@ -3000,9 +3012,6 @@ msgstr "música %1"
#~ msgid "Options"
#~ msgstr "Opções"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Behaviour"
#~ msgstr "Comportamento"

View File

@ -952,6 +952,9 @@ msgstr "Habilitar equalizador"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Habilitar atalhos só quando o Clementine tiver foco"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Digite um novo nome para esta lista"
@ -2268,6 +2271,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Exibir os botões \"adoro\" e \"odeio\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Exibir ícone na área de notificação"
@ -2563,6 +2569,9 @@ msgstr "Alternar tela cheia"
msgid "Toggle queue status"
msgstr "Mudar status da fila"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Ferramentas"

View File

@ -933,6 +933,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2230,6 +2233,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Arată pictogramă în tava de sistem"
@ -2509,6 +2515,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Unelte"
@ -2847,6 +2856,9 @@ msgstr ""
msgid "track %1"
msgstr "pistă %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Hide %1"
#~ msgstr "Ascunde %1"
@ -2899,8 +2911,5 @@ msgstr "pistă %1"
#~ msgid "Options"
#~ msgstr "Opțiuni"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Version"
#~ msgstr "Versiune"

View File

@ -952,6 +952,9 @@ msgstr "Включить эквалайзер"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Разрешить горячие клавиши только когда окно программы активно"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Введите новое имя для этого списка воспроизведения"
@ -2264,6 +2267,9 @@ msgstr "Показывать только без тэгов"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Показывать кнопки \"Избранное\" и \"Запретить\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Показать иконку в системном лотке"
@ -2557,6 +2563,9 @@ msgstr "Переключение в полноэкранный режим"
msgid "Toggle queue status"
msgstr "Переключить состояние очереди"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Инструменты"
@ -2912,6 +2921,9 @@ msgstr "Остановить"
msgid "track %1"
msgstr "композиция %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Hide..."
#~ msgstr "Скрыть..."
@ -2942,9 +2954,6 @@ msgstr "композиция %1"
#~ msgid "Help"
#~ msgstr "Помощь"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Enter your Last.fm details below:"
#~ msgstr "Введите ваши данные Last.fm:"

View File

@ -950,6 +950,9 @@ msgstr "Povoliť ekvalizér"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Povoliť skratky len keď je Clementine zameraný"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Zadajte nový názov pre tento playlist"
@ -2260,6 +2263,9 @@ msgstr "Zobraziť iba neotagované"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Zobrazovať tlačítka \"obľúbené\" a \"zakázané\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Zobrazovať tray ikonu"
@ -2556,6 +2562,9 @@ msgstr "Prepnúť na celú obrazovku"
msgid "Toggle queue status"
msgstr "Prepínať stav radu"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Nástroje"
@ -2912,6 +2921,9 @@ msgstr "zastaviť"
msgid "track %1"
msgstr "skladba %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "&Show tray icon"
#~ msgstr "&Zobraziť tray ikonu"
@ -2994,9 +3006,6 @@ msgstr "skladba %1"
#~ msgid "Options"
#~ msgstr "Možnosti"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Enter your Last.fm details below:"
#~ msgstr "Vložte svoje Last.fm detaily nižšie:"

View File

@ -952,6 +952,9 @@ msgstr "Omogoči izenačevalnik"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Omogoči bližnjice le, ko je Clementine v žarišču"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Vnesite novo ime za ta seznam predvajanja"
@ -2264,6 +2267,9 @@ msgstr "Pokaži samo tiste brez oznak"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Pokaži gumbe \"Priljubljena\" in \"Blokiraj\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Pokaži ikono v sistemski vrstici"
@ -2560,6 +2566,9 @@ msgstr "Preklopi celozaslonski način"
msgid "Toggle queue status"
msgstr "Preklopi stanje vrste"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Orodja"

View File

@ -931,6 +931,9 @@ msgstr "Укључи еквилајзер"
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Унеси нови назив листе нумера"
@ -2230,6 +2233,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Прикажи икону системске касете"
@ -2509,6 +2515,9 @@ msgstr "Преко читавог екрана"
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Алатке"

View File

@ -955,6 +955,9 @@ msgstr "Aktivera equalizer"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Aktivera endast snabbknappar när Clementine är fokuserat"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Ange ett nytt namn för denna spellista"
@ -2263,6 +2266,9 @@ msgstr "Visa otaggade endast"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Visa knapparna \"Älska\" och \"Blockera\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Visa notifieringsikon"
@ -2556,6 +2562,9 @@ msgstr "Växla fullskärm"
msgid "Toggle queue status"
msgstr "Växla köstatus"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Verktyg"
@ -2910,6 +2919,9 @@ msgstr "stoppa"
msgid "track %1"
msgstr "spår %1"
#~ msgid "..."
#~ msgstr "..."
#~ msgid "Hide %1"
#~ msgstr "Dölj %1"
@ -2974,9 +2986,6 @@ msgstr "spår %1"
#~ msgid "Enter your Last.fm details below:"
#~ msgstr "Fyll i dina Last.fm uppgifter nedan:"
#~ msgid "..."
#~ msgstr "..."
#~ msgid ""
#~ "Note that you must be a <span style=\" font-weight:600;\">paid "
#~ "subscriber</span> to listen to Last.fm radio from within Clementine."

View File

@ -949,6 +949,9 @@ msgstr "Ekolayzırı etkinleştir"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Kısayolları sadece Clementine odaktayken etkinleştir"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Bu çalma listesi için yeni bir isim gir"
@ -2262,6 +2265,9 @@ msgstr "Sadece etiketi olmayanları göster"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "\"Beğen\" ve \"Yasakla\" tuşlarını göster"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Sistem çekmecesi simgesini göster"
@ -2548,6 +2554,9 @@ msgstr "Tam ekran göster/gizle"
msgid "Toggle queue status"
msgstr "Kuyruk durumunu göster/gizle"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Araçlar"

View File

@ -919,6 +919,9 @@ msgstr ""
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -2216,6 +2219,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr ""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr ""
@ -2495,6 +2501,9 @@ msgstr ""
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr ""

View File

@ -952,6 +952,9 @@ msgstr "Увімкнути еквалайзер"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Використовувати глобальні скорочення лише коли Clementine у фокусі"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Введіть нову назву для цього списку відтворення"
@ -2262,6 +2265,9 @@ msgstr "Показати тільки без міток"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Показувати кнопки \"love\" та \"ban\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Показувати значок в лотку"
@ -2550,6 +2556,9 @@ msgstr "Повноекранний режим"
msgid "Toggle queue status"
msgstr "Перемикнути статус черги"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Інструменти"

View File

@ -950,6 +950,9 @@ msgstr "Bật bộ cân chỉnh âm"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "Bật các phím tắt chỉ khi cửa sổ Clementine đang được chọn"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "Nhập tên mới cho danh sách này"
@ -2264,6 +2267,9 @@ msgstr "Chỉ hiện những mục không được gán thẻ"
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "Hiện các nút \"yêu thích\" và \"cấm\""
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "Hiện biểu tượng dưới khay hệ thống"
@ -2556,6 +2562,9 @@ msgstr "Tắt/bật toàn màn hình"
msgid "Toggle queue status"
msgstr "Tắt/bật trạng thái chờ"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "Công cụ"

View File

@ -931,6 +931,9 @@ msgstr "启用均衡器"
msgid "Enable shortcuts only when Clementine is focused"
msgstr "仅当 Clementine 在焦点时启用快捷键"
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "输入播放列表的新名称"
@ -2228,6 +2231,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "显示“标记喜爱”和“禁止”按钮"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "显示托盘图标"
@ -2507,6 +2513,9 @@ msgstr "切换全屏"
msgid "Toggle queue status"
msgstr "切换队列状态"
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "工具"

View File

@ -933,6 +933,9 @@ msgstr "啟用等化器"
msgid "Enable shortcuts only when Clementine is focused"
msgstr ""
msgid "Enable/disable Last.fm scrobbling"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr "為這個播放清單輸入新的名稱"
@ -2230,6 +2233,9 @@ msgstr ""
msgid "Show the \"love\" and \"ban\" buttons"
msgstr "顯示 [喜愛] 和 [禁止] 按鈕"
msgid "Show the scrobble button in the main window"
msgstr ""
msgid "Show tray icon"
msgstr "顯示工作列圖示"
@ -2509,6 +2515,9 @@ msgstr "切換全螢幕模式"
msgid "Toggle queue status"
msgstr ""
msgid "Toggle scrobbling"
msgstr ""
msgid "Tools"
msgstr "工具"

View File

@ -299,7 +299,6 @@ MainWindow::MainWindow(
ui_->action_full_library_scan->setIcon(IconLoader::Load("view-refresh"));
ui_->action_rain->setIcon(IconLoader::Load("weather-showers-scattered"));
// File view connections
connect(file_view_, SIGNAL(AddToPlaylist(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
connect(file_view_, SIGNAL(PathChanged(QString)), SLOT(FilePathChanged(QString)));
@ -319,6 +318,7 @@ MainWindow::MainWindow(
#ifdef HAVE_LIBLASTFM
connect(ui_->action_ban, SIGNAL(triggered()), RadioModel::Service<LastFMService>(), SLOT(Ban()));
connect(ui_->action_love, SIGNAL(triggered()), SLOT(Love()));
connect(ui_->action_toggle_scrobbling, SIGNAL(triggered()), RadioModel::Service<LastFMService>(), SLOT(ToggleScrobbling()));
#endif
connect(ui_->action_clear_playlist, SIGNAL(triggered()), playlists_, SLOT(ClearCurrent()));
connect(ui_->action_remove_from_playlist, SIGNAL(triggered()), SLOT(PlaylistRemoveCurrent()));
@ -358,10 +358,12 @@ MainWindow::MainWindow(
ui_->stop_button->setDefaultAction(ui_->action_stop);
ui_->love_button->setDefaultAction(ui_->action_love);
ui_->ban_button->setDefaultAction(ui_->action_ban);
ui_->scrobbling_button->setDefaultAction(ui_->action_toggle_scrobbling);
ui_->clear_playlist_button->setDefaultAction(ui_->action_clear_playlist);
ui_->playlist->SetActions(ui_->action_new_playlist, ui_->action_save_playlist,
ui_->action_load_playlist);
#ifdef ENABLE_VISUALISATIONS
connect(ui_->action_visualisations, SIGNAL(triggered()), SLOT(ShowVisualisations()));
#else
@ -513,18 +515,13 @@ MainWindow::MainWindow(
connect(radio_model_, SIGNAL(OpenSettingsAtPage(SettingsDialog::Page)), SLOT(OpenSettingsDialogAtPage(SettingsDialog::Page)));
connect(radio_model_, SIGNAL(AddToPlaylist(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
#ifdef HAVE_LIBLASTFM
connect(RadioModel::Service<LastFMService>(), SIGNAL(ScrobblingEnabledChanged(bool)), SLOT(ScrobblingEnabledChanged(bool)));
connect(RadioModel::Service<LastFMService>(), SIGNAL(ButtonVisibilityChanged(bool)), SLOT(LastFMButtonVisibilityChanged(bool)));
connect(RadioModel::Service<LastFMService>(), SIGNAL(ScrobbleButtonVisibilityChanged(bool)), SLOT(ScrobbleButtonVisibilityChanged(bool)));
connect(RadioModel::Service<LastFMService>(), SIGNAL(ScrobblingEnabledChanged(bool)), SLOT(ScrobblingEnabledChanged(bool)));
#endif
connect(radio_model_->Service<MagnatuneService>(), SIGNAL(DownloadFinished(QStringList)), osd_, SLOT(MagnatuneDownloadFinished(QStringList)));
connect(radio_view_->tree(), SIGNAL(AddToPlaylistSignal(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
#ifdef HAVE_LIBLASTFM
LastFMButtonVisibilityChanged(RadioModel::Service<LastFMService>()->AreButtonsVisible());
#else
LastFMButtonVisibilityChanged(false);
#endif
// Connections to the saved streams service
connect(RadioModel::Service<SavedRadio>(), SIGNAL(ShowAddStreamDialog()), SLOT(AddStream()));
@ -598,6 +595,9 @@ MainWindow::MainWindow(
connect(global_shortcuts_, SIGNAL(SeekBackward()), player_, SLOT(SeekBackward()));
connect(global_shortcuts_, SIGNAL(ShowHide()), SLOT(ToggleShowHide()));
connect(global_shortcuts_, SIGNAL(ShowOSD()), player_, SLOT(ShowOSD()));
#ifdef HAVE_LIBLASTFM
connect(global_shortcuts_, SIGNAL(ToggleScrobbling()), radio_model->RadioModel::Service<LastFMService>(), SLOT(ToggleScrobbling()));
#endif
connect(global_shortcuts_, SIGNAL(RateCurrentSong(int)), playlists_, SLOT(RateCurrentSong(int)));
@ -665,6 +665,17 @@ MainWindow::MainWindow(
connect(player_->playlists()->sequence(), SIGNAL(RepeatModeChanged(PlaylistSequence::RepeatMode)), osd_, SLOT(RepeatModeChanged(PlaylistSequence::RepeatMode)));
connect(player_->playlists()->sequence(), SIGNAL(ShuffleModeChanged(PlaylistSequence::ShuffleMode)), osd_, SLOT(ShuffleModeChanged(PlaylistSequence::ShuffleMode)));
#ifdef HAVE_LIBLASTFM
connect(RadioModel::Service<LastFMService>(), SIGNAL(ScrobblerStatus(int)), SLOT(ScrobblerStatus(int)));
LastFMButtonVisibilityChanged(radio_model_->RadioModel::Service<LastFMService>()->AreButtonsVisible());
ScrobbleButtonVisibilityChanged(radio_model_->RadioModel::Service<LastFMService>()->IsScrobbleButtonVisible());
ScrobblingEnabledChanged(radio_model_->RadioModel::Service<LastFMService>()->IsScrobblingEnabled());
#else
LastFMButtonVisibilityChanged(false);
ScrobbleButtonVisibilityChanged(false);
#endif
// Load settings
settings_.beginGroup(kSettingsGroup);
@ -848,13 +859,18 @@ void MainWindow::VolumeChanged(int volume) {
void MainWindow::SongChanged(const Song& song) {
setWindowTitle(song.PrettyTitleWithArtist());
#ifdef HAVE_LIBLASTFM
if (ui_->action_toggle_scrobbling->isVisible())
SetToggleScrobblingIcon(RadioModel::Service<LastFMService>()->IsScrobblingEnabled());
#endif
}
void MainWindow::TrackSkipped(PlaylistItemPtr item) {
// If it was a library item then we have to increment its skipped count in
// the database.
if (item && item->IsLocalLibraryItem() &&
item->Metadata().id() != -1 && !playlists_->active()->has_scrobbled()) {
item->Metadata().id() != -1 && playlists_->active()->get_lastfm_status() != Playlist::LastFM_Scrobbled) {
Song song = item->Metadata();
const qint64 position = player_->engine()->position_nanosec();
const qint64 length = player_->engine()->length_nanosec();
@ -866,8 +882,17 @@ void MainWindow::TrackSkipped(PlaylistItemPtr item) {
#ifdef HAVE_LIBLASTFM
void MainWindow::ScrobblingEnabledChanged(bool value) {
if (!player_->GetState() == Engine::Idle)
if (ui_->action_toggle_scrobbling->isVisible())
SetToggleScrobblingIcon(value);
if (!player_->GetState() == Engine::Idle) {
return;
}
else {
//invalidate current song, we will scrobble the next one
if (playlists_->active()->get_lastfm_status() == Playlist::LastFM_New)
playlists_->active()->set_lastfm_status(Playlist::LastFM_Skipped);
}
bool is_lastfm = (player_->GetCurrentItem()->options() & PlaylistItem::LastFMControls);
ui_->action_ban->setEnabled(value && is_lastfm);
@ -881,6 +906,23 @@ void MainWindow::LastFMButtonVisibilityChanged(bool value) {
ui_->last_fm_controls->setVisible(value);
}
void MainWindow::ScrobbleButtonVisibilityChanged(bool value) {
ui_->action_toggle_scrobbling->setVisible(value);
ui_->scrobbling_button->setVisible(value);
//when you reshow the buttons
if (value) {
//check if the song was scrobbled
if (playlists_->active()->get_lastfm_status() == Playlist::LastFM_Scrobbled) {
ui_->action_toggle_scrobbling->setIcon(QIcon(":/last.fm/as.png"));
} else {
#ifdef HAVE_LIBLASTFM
SetToggleScrobblingIcon(radio_model_->RadioModel::Service<LastFMService>()->IsScrobblingEnabled());
#endif
}
}
}
void MainWindow::resizeEvent(QResizeEvent*) {
SaveGeometry();
}
@ -976,6 +1018,10 @@ void MainWindow::Seeked(qlonglong microseconds) {
const int position = microseconds / kUsecPerSec;
const int length = player_->GetCurrentItem()->Metadata().length_nanosec() / kNsecPerSec;
tray_icon_->SetProgress(double(position) / length * 100);
//if we seeked, scrobbling is canceled, update the icon
if (ui_->action_toggle_scrobbling->isVisible())
SetToggleScrobblingIcon(true);
}
void MainWindow::UpdateTrackPosition() {
@ -992,15 +1038,18 @@ void MainWindow::UpdateTrackPosition() {
tray_icon_->SetProgress(0);
return;
}
#ifdef HAVE_LIBLASTFM
bool last_fm_enabled = ui_->action_toggle_scrobbling->isVisible() && RadioModel::Service<LastFMService>()->IsScrobblingEnabled() && RadioModel::Service<LastFMService>()->IsAuthenticated();
#endif
// Time to scrobble?
if (!playlists_->active()->has_scrobbled() && position >= scrobble_point) {
qDebug() << "Scrobbling at" << scrobble_point;
if (playlists_->active()->get_lastfm_status() == Playlist::LastFM_New && position >= scrobble_point) {
#ifdef HAVE_LIBLASTFM
radio_model_->RadioModel::Service<LastFMService>()->Scrobble();
if (RadioModel::Service<LastFMService>()->IsScrobblingEnabled()) {
qDebug() << "Scrobbling at" << scrobble_point;
radio_model_->RadioModel::Service<LastFMService>()->Scrobble();
}
#endif
playlists_->active()->set_scrobbled(true);
// Update the play count for the song if it's from the library
if (item->IsLocalLibraryItem() && item->Metadata().id() != -1) {
library_->backend()->IncrementPlayCountAsync(item->Metadata().id());
@ -1013,8 +1062,15 @@ void MainWindow::UpdateTrackPosition() {
// Update the tray icon every 10 seconds
if (position % 10 == 0) {
qDebug() << "position" << position << "scrobble point" << scrobble_point
<< "has_scrobbled" << playlists_->active()->has_scrobbled();
<< "has_scrobbled" << (playlists_->active()->get_lastfm_status() == Playlist::LastFM_Scrobbled);
tray_icon_->SetProgress(double(position) / length * 100);
//if we're waiting for the scrobble point, update the icon
#ifdef HAVE_LIBLASTFM
if (position < scrobble_point && playlists_->active()->get_lastfm_status() == Playlist::LastFM_New && last_fm_enabled) {
ui_->action_toggle_scrobbling->setIcon(CreateOverlayedIcon(position, scrobble_point));
}
#endif
}
}
@ -2020,3 +2076,62 @@ void MainWindow::AutoCompleteTagsAccepted() {
// This is really lame but we don't know what rows have changed
ui_->playlist->view()->update();
}
QPixmap MainWindow::CreateOverlayedIcon(int position, int scrobble_point) {
QPixmap normal_icon = QIcon(":/last.fm/as_light.png").pixmap(16);
QPixmap light_icon = QIcon(":/last.fm/as.png").pixmap(16);
QRect rect(normal_icon.rect());
//calculates the progress
double perc = 1.0 - ((double) position / (double) scrobble_point);
QPolygon mask;
mask << rect.topRight();
mask << rect.topLeft();
mask << QPoint(rect.left(), rect.height()*perc);
mask << QPoint(rect.right(), (rect.height())*perc);
QPixmap ret(light_icon);
QPainter p(&ret);
// Draw the red icon over the light red one
p.setClipRegion(mask);
p.drawPixmap(0, 0, normal_icon);
p.setClipping(false);
p.end();
return ret;
}
void MainWindow::SetToggleScrobblingIcon(bool value) {
if (!value) {
ui_->action_toggle_scrobbling->setIcon(QIcon(":/last.fm/as_disabled.png"));
} else {
ui_->action_toggle_scrobbling->setIcon(QIcon(":/last.fm/as_light.png"));
}
}
#ifdef HAVE_LIBLASTFM
void MainWindow::ScrobblerStatus(int value) {
bool last_fm_enabled = ui_->action_toggle_scrobbling->isVisible() && RadioModel::Service<LastFMService>()->IsScrobblingEnabled() && RadioModel::Service<LastFMService>()->IsAuthenticated();
if (value == -1) {
//custom error value got from initial validity check
playlists_->active()->set_lastfm_status(Playlist::LastFM_Invalid);
}
//we should get 3 for a correct scrobbling, but I just get 2 for mysterious reasons
//seems to scrobble fine though, so for now we accept it as correct
if (value == 2 || value == 3) {
playlists_->active()->set_lastfm_status(Playlist::LastFM_Scrobbled);
//update the button icon
if (last_fm_enabled)
ui_->action_toggle_scrobbling->setIcon(QIcon(":/last.fm/as.png"));
}
if (value > 3) {
//we're for sure in an error state
playlists_->active()->set_lastfm_status(Playlist::LastFM_Error);
qWarning() << "Last.fm scrobbling error: " << value;
}
}
#endif

View File

@ -191,7 +191,10 @@ class MainWindow : public QMainWindow, public PlatformInterface {
void Seeked(qlonglong microseconds);
void UpdateTrackPosition();
//Handle visibility of LastFM icons
void LastFMButtonVisibilityChanged(bool value);
void ScrobbleButtonVisibilityChanged(bool value);
void SetToggleScrobblingIcon(bool value);
#ifdef HAVE_LIBLASTFM
void ScrobblingEnabledChanged(bool value);
void Love();
@ -219,6 +222,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
#ifdef HAVE_LIBLASTFM
void ShowCoverManager();
void ScrobblerStatus(int value);
#endif
void ShowAboutDialog();
void ShowTranscodeDialog();
@ -250,6 +254,9 @@ class MainWindow : public QMainWindow, public PlatformInterface {
void CheckFullRescanRevisions();
//creates the icon by painting the full one depending on the current position
QPixmap CreateOverlayedIcon(int position, int scrobble_point);
private:
Ui_MainWindow* ui_;
Windows7ThumbBar* thumbbar_;

View File

@ -357,6 +357,31 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="scrobbling_button">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="TrackSlider" name="track_slider" native="true">
<property name="sizePolicy">
@ -777,6 +802,11 @@
<string>Ctrl+T</string>
</property>
</action>
<action name="action_toggle_scrobbling">
<property name="text">
<string>Toggle scrobbling</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>