diff --git a/src/core/albumcoverloader.cpp b/src/core/albumcoverloader.cpp index d070419ab..60c216599 100644 --- a/src/core/albumcoverloader.cpp +++ b/src/core/albumcoverloader.cpp @@ -94,7 +94,9 @@ void AlbumCoverLoader::ProcessTask(Task *task) { } if (result.loaded_success) { - emit ImageLoaded(task->id, ScaleAndPad(result.image)); + QImage scaled = ScaleAndPad(result.image); + emit ImageLoaded(task->id, scaled); + emit ImageLoaded(task->id, scaled, result.image); return; } @@ -109,6 +111,7 @@ void AlbumCoverLoader::NextState(Task* task) { } else { // Give up emit ImageLoaded(task->id, default_); + emit ImageLoaded(task->id, default_, default_); } } @@ -172,7 +175,9 @@ void AlbumCoverLoader::RemoteFetchFinished() { // Try to load the image QImage image; if (image.load(reply, 0)) { - emit ImageLoaded(task.id, ScaleAndPad(image)); + QImage scaled = ScaleAndPad(image); + emit ImageLoaded(task.id, scaled); + emit ImageLoaded(task.id, scaled, image); return; } } diff --git a/src/core/albumcoverloader.h b/src/core/albumcoverloader.h index 2df01e21f..a177ea657 100644 --- a/src/core/albumcoverloader.h +++ b/src/core/albumcoverloader.h @@ -62,6 +62,7 @@ class AlbumCoverLoader : public QObject { signals: void ImageLoaded(quint64 id, const QImage& image); + void ImageLoaded(quint64 id, const QImage& scaled, const QImage& original); protected slots: void ProcessTasks(); diff --git a/src/translations/ar.po b/src/translations/ar.po index 6a0c65c31..415940efa 100644 --- a/src/translations/ar.po +++ b/src/translations/ar.po @@ -1157,6 +1157,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1959,6 +1962,12 @@ msgstr "" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/be.po b/src/translations/be.po index b899b15cc..cac66b87f 100644 --- a/src/translations/be.po +++ b/src/translations/be.po @@ -1171,6 +1171,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1973,6 +1976,12 @@ msgstr "" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/bg.po b/src/translations/bg.po index ba2a4e363..40c0b2b82 100644 --- a/src/translations/bg.po +++ b/src/translations/bg.po @@ -1184,6 +1184,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Игнориране на \"The\" в имена на изпълнители" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1997,6 +2000,12 @@ msgstr "Дискретизация" msgid "Samplerate" msgstr "Дискретизация" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Запазване на изображение" diff --git a/src/translations/br.po b/src/translations/br.po index 597c45475..efa62d613 100644 --- a/src/translations/br.po +++ b/src/translations/br.po @@ -1158,6 +1158,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1961,6 +1964,12 @@ msgstr "" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/ca.po b/src/translations/ca.po index 16e5bcf24..c988ee29f 100644 --- a/src/translations/ca.po +++ b/src/translations/ca.po @@ -1190,6 +1190,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Ignora \"The\" als noms d'artistes" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1997,6 +2000,12 @@ msgstr "Freqüència de mostreig" msgid "Samplerate" msgstr "Freqüència de mostreig" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/cs.po b/src/translations/cs.po index 7d5c252f3..9ab5006a4 100644 --- a/src/translations/cs.po +++ b/src/translations/cs.po @@ -1189,6 +1189,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Nevšímat si 'The' ve jménech umělců" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1999,6 +2002,12 @@ msgstr "Vzorkovací kmitočet" msgid "Samplerate" msgstr "Vzorkovací frekvence" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Uložit obrázek" diff --git a/src/translations/cy.po b/src/translations/cy.po index fac5c4983..edacc1c14 100644 --- a/src/translations/cy.po +++ b/src/translations/cy.po @@ -1157,6 +1157,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1959,6 +1962,12 @@ msgstr "" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/da.po b/src/translations/da.po index 26da2e7a1..7f314ed66 100644 --- a/src/translations/da.po +++ b/src/translations/da.po @@ -1160,6 +1160,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1964,6 +1967,12 @@ msgstr "Samplingsrate" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/de.po b/src/translations/de.po index 8a0709dcf..b3f2b9084 100644 --- a/src/translations/de.po +++ b/src/translations/de.po @@ -1191,6 +1191,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Ignoriere \"The\" in Künstlernamen" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -2001,6 +2004,12 @@ msgstr "Abtastrate" msgid "Samplerate" msgstr "Abtastrate" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Bild speichern" diff --git a/src/translations/el.po b/src/translations/el.po index e48611a2c..826d824a2 100644 --- a/src/translations/el.po +++ b/src/translations/el.po @@ -1197,6 +1197,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Αγνόηση του \"The\" στο όνομα των καλλιτεχνών" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -2010,6 +2013,12 @@ msgstr "Ρυθμός δειγματοληψίας" msgid "Samplerate" msgstr "Δειγματοληψία" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Αποθήκευση εικόνας" diff --git a/src/translations/en.po b/src/translations/en.po index d71dfc78a..f5afcd248 100644 --- a/src/translations/en.po +++ b/src/translations/en.po @@ -1157,6 +1157,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1959,6 +1962,12 @@ msgstr "" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/en_CA.po b/src/translations/en_CA.po index 92daeb2ec..d86f53e7d 100644 --- a/src/translations/en_CA.po +++ b/src/translations/en_CA.po @@ -1160,6 +1160,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1964,6 +1967,12 @@ msgstr "Sample rate" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/en_GB.po b/src/translations/en_GB.po index 05888840e..442d79258 100644 --- a/src/translations/en_GB.po +++ b/src/translations/en_GB.po @@ -1158,6 +1158,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1961,6 +1964,12 @@ msgstr "Sample rate" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/eo.po b/src/translations/eo.po index d4f240eed..185628d97 100644 --- a/src/translations/eo.po +++ b/src/translations/eo.po @@ -1157,6 +1157,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1959,6 +1962,12 @@ msgstr "" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/es.po b/src/translations/es.po index a8754e124..dacc3a323 100644 --- a/src/translations/es.po +++ b/src/translations/es.po @@ -1197,6 +1197,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Ignorar el \"The\" en los nombres de los artistas" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -2010,6 +2013,12 @@ msgstr "Tasa de muestreo" msgid "Samplerate" msgstr "Tasa de muestreo" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Guardar imagen" diff --git a/src/translations/et.po b/src/translations/et.po index f82434737..8eb6067be 100644 --- a/src/translations/et.po +++ b/src/translations/et.po @@ -1158,6 +1158,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1961,6 +1964,12 @@ msgstr "Diskreetimissagedus" msgid "Samplerate" msgstr "Diskreetimissagedus" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Pildi salvestamine" diff --git a/src/translations/eu.po b/src/translations/eu.po index d3f90b0b1..032d09082 100644 --- a/src/translations/eu.po +++ b/src/translations/eu.po @@ -1157,6 +1157,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1959,6 +1962,12 @@ msgstr "" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/fi.po b/src/translations/fi.po index 7fd99a50d..4406ad799 100644 --- a/src/translations/fi.po +++ b/src/translations/fi.po @@ -1157,6 +1157,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1961,6 +1964,12 @@ msgstr "Näytteenottotaajuus" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/fr.po b/src/translations/fr.po index b8a9dc7c9..25a881af6 100644 --- a/src/translations/fr.po +++ b/src/translations/fr.po @@ -1201,6 +1201,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Ignorer « The » dans les noms d'artiste" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -2015,6 +2018,12 @@ msgstr "Échantillonnage" msgid "Samplerate" msgstr "Échantillonnage" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Enregistrer l'image" diff --git a/src/translations/gl.po b/src/translations/gl.po index fee4936b4..3858a94a6 100644 --- a/src/translations/gl.po +++ b/src/translations/gl.po @@ -1165,6 +1165,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1969,6 +1972,12 @@ msgstr "Taxa de mostra" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/he.po b/src/translations/he.po index 780b079a1..a97968547 100644 --- a/src/translations/he.po +++ b/src/translations/he.po @@ -1174,6 +1174,9 @@ msgstr "אם תמשיך, ההתקן יעבוד לאט וייתכן ששירים msgid "Ignore \"The\" in artist names" msgstr "התעלם מה-\"The\" בשם האמן" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1980,6 +1983,12 @@ msgstr "קצב הדגימה" msgid "Samplerate" msgstr "קצב דגימה" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "שמור התמונה" diff --git a/src/translations/hi.po b/src/translations/hi.po index 317907439..5b880272b 100644 --- a/src/translations/hi.po +++ b/src/translations/hi.po @@ -1157,6 +1157,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1959,6 +1962,12 @@ msgstr "" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/hr.po b/src/translations/hr.po index 9eaa888d4..6e54d44ad 100644 --- a/src/translations/hr.po +++ b/src/translations/hr.po @@ -1184,6 +1184,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Ignoriraj \"The\" u nazivu izvođača" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1992,6 +1995,12 @@ msgstr "Frekvencija" msgid "Samplerate" msgstr "Frekvencija" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Preuzmi sliku" diff --git a/src/translations/hu.po b/src/translations/hu.po index d06e5cfd5..0a2b5bc09 100644 --- a/src/translations/hu.po +++ b/src/translations/hu.po @@ -1187,6 +1187,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "A \"The\" mellőzése előadó nevekben" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1997,6 +2000,12 @@ msgstr "Mintavételi sűrűség" msgid "Samplerate" msgstr "Mintavétel" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Kép mentése" diff --git a/src/translations/it.po b/src/translations/it.po index 3e211450c..cc4e37eef 100644 --- a/src/translations/it.po +++ b/src/translations/it.po @@ -1193,6 +1193,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Ignora \"The\" nei nomi degli artisti" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -2005,6 +2008,12 @@ msgstr "Campionamento" msgid "Samplerate" msgstr "Campionamento" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Salva l'immagine" diff --git a/src/translations/ja.po b/src/translations/ja.po index 74ab174ce..29e4ba12f 100644 --- a/src/translations/ja.po +++ b/src/translations/ja.po @@ -1180,6 +1180,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "アーティスト名の \"The\" を無視する" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1990,6 +1993,12 @@ msgstr "サンプル レート" msgid "Samplerate" msgstr "サンプルレート" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "イメージの保存" diff --git a/src/translations/kk.po b/src/translations/kk.po index f4a2ed582..195861389 100644 --- a/src/translations/kk.po +++ b/src/translations/kk.po @@ -1157,6 +1157,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1961,6 +1964,12 @@ msgstr "" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/lt.po b/src/translations/lt.po index 1de1b93a5..a6d31b04e 100644 --- a/src/translations/lt.po +++ b/src/translations/lt.po @@ -1183,6 +1183,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Nepaisyti \"The\" atlikėjų varduose" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1994,6 +1997,12 @@ msgstr "Išrankos dažnis" msgid "Samplerate" msgstr "Išrankosdažnis" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Išsaugoti paveikslėlį" diff --git a/src/translations/lv.po b/src/translations/lv.po index d31f8c9d7..ea07638b2 100644 --- a/src/translations/lv.po +++ b/src/translations/lv.po @@ -1157,6 +1157,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1959,6 +1962,12 @@ msgstr "" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/nb.po b/src/translations/nb.po index 61983806f..f2fd39841 100644 --- a/src/translations/nb.po +++ b/src/translations/nb.po @@ -1169,6 +1169,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1973,6 +1976,12 @@ msgstr "Samplingsrate" msgid "Samplerate" msgstr "Samplingsrate" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/nl.po b/src/translations/nl.po index 90d99fa55..db97fe8aa 100644 --- a/src/translations/nl.po +++ b/src/translations/nl.po @@ -1188,6 +1188,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "\"The\" in artiestennamen negeren" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1997,6 +2000,12 @@ msgstr "Samplerate" msgid "Samplerate" msgstr "Samplerate" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "plaatje opslaan" diff --git a/src/translations/oc.po b/src/translations/oc.po index 7891119cc..2a8344eb5 100644 --- a/src/translations/oc.po +++ b/src/translations/oc.po @@ -1157,6 +1157,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1959,6 +1962,12 @@ msgstr "" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/pl.po b/src/translations/pl.po index eaa7aac4a..98a64cb16 100644 --- a/src/translations/pl.po +++ b/src/translations/pl.po @@ -1186,6 +1186,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Ignoruj \"The\" w nazwach artystów" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1997,6 +2000,12 @@ msgstr "Próbkowanie" msgid "Samplerate" msgstr "Próbkowanie" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Zapisz obraz" diff --git a/src/translations/pt.po b/src/translations/pt.po index 7b352c91a..83c7ff348 100644 --- a/src/translations/pt.po +++ b/src/translations/pt.po @@ -1189,6 +1189,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Ignorar \"The\" no nome dos artistas" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -2000,6 +2003,12 @@ msgstr "Taxa de amostragem" msgid "Samplerate" msgstr "Taxa de amostragem" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Gravar imagem" diff --git a/src/translations/pt_BR.po b/src/translations/pt_BR.po index 04cec238a..f9d99ec2d 100644 --- a/src/translations/pt_BR.po +++ b/src/translations/pt_BR.po @@ -1186,6 +1186,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Ignorar o \"The\" em nomes de artistas" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1998,6 +2001,12 @@ msgstr "Taxa de amostragem" msgid "Samplerate" msgstr "Taxa de amostragem" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Salvar imagem" diff --git a/src/translations/ro.po b/src/translations/ro.po index 62ec3ef47..9e5a68c1d 100644 --- a/src/translations/ro.po +++ b/src/translations/ro.po @@ -1157,6 +1157,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1960,6 +1963,12 @@ msgstr "Rată de eșantionare" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/ru.po b/src/translations/ru.po index 8a5bf8efc..1c3ed1981 100644 --- a/src/translations/ru.po +++ b/src/translations/ru.po @@ -1182,6 +1182,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Игнорировать \"The\" в имени исполнителя" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1992,6 +1995,12 @@ msgstr "Частота" msgid "Samplerate" msgstr "Частота дискретизации" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Сохранить изображение" diff --git a/src/translations/sk.po b/src/translations/sk.po index abb81f4c7..5e918bfd4 100644 --- a/src/translations/sk.po +++ b/src/translations/sk.po @@ -1181,6 +1181,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Ignorovať \"The\" v mene interpréta" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1989,6 +1992,12 @@ msgstr "Rýchlosť vzorkovania" msgid "Samplerate" msgstr "Rýchlosť vzorkovania" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Uložiť obrázok" diff --git a/src/translations/sl.po b/src/translations/sl.po index d2a8037a2..e3269dd52 100644 --- a/src/translations/sl.po +++ b/src/translations/sl.po @@ -1183,6 +1183,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Prezri \"The\" v imenih izvajalcev" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1991,6 +1994,12 @@ msgstr "Hitrost vzorčenja" msgid "Samplerate" msgstr "Hitrost vzorčenja" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Shrani sliko" diff --git a/src/translations/sr.po b/src/translations/sr.po index ec29f5725..fa8a9cad4 100644 --- a/src/translations/sr.po +++ b/src/translations/sr.po @@ -1160,6 +1160,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1964,6 +1967,12 @@ msgstr "узорковање" msgid "Samplerate" msgstr "Учестаност узорковања" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/sv.po b/src/translations/sv.po index 672956050..d1873f75b 100644 --- a/src/translations/sv.po +++ b/src/translations/sv.po @@ -1187,6 +1187,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Ignorera \"The\" i artistnamn" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1993,6 +1996,12 @@ msgstr "Samplingsfrekvens" msgid "Samplerate" msgstr "Samplingsfrekvens" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Spara bild" diff --git a/src/translations/tr.po b/src/translations/tr.po index 0c6d123cf..67d830a86 100644 --- a/src/translations/tr.po +++ b/src/translations/tr.po @@ -1180,6 +1180,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Sanatçı isimlerinde \"The\" kelimesini önemseme" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1991,6 +1994,12 @@ msgstr "Örnekleme oranı" msgid "Samplerate" msgstr "Örneklemeoranı" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Görüntüyü kaydet" diff --git a/src/translations/translations.pot b/src/translations/translations.pot index b1a58ce49..48ff51cd5 100644 --- a/src/translations/translations.pot +++ b/src/translations/translations.pot @@ -1147,6 +1147,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1949,6 +1952,12 @@ msgstr "" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/uk.po b/src/translations/uk.po index d37937b58..683c2d3b9 100644 --- a/src/translations/uk.po +++ b/src/translations/uk.po @@ -1181,6 +1181,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "Ігнорувати «The» в іменах виконавців" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1991,6 +1994,12 @@ msgstr "Частота вибірки" msgid "Samplerate" msgstr "Частота вибірки" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "Зберегти зображення" diff --git a/src/translations/zh_CN.po b/src/translations/zh_CN.po index 1cb92ccff..f8a382c07 100644 --- a/src/translations/zh_CN.po +++ b/src/translations/zh_CN.po @@ -1159,6 +1159,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "忽略艺人名称中的“The”" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1962,6 +1965,12 @@ msgstr "采样率" msgid "Samplerate" msgstr "" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/translations/zh_TW.po b/src/translations/zh_TW.po index 33e16cf9f..110bd4ad4 100644 --- a/src/translations/zh_TW.po +++ b/src/translations/zh_TW.po @@ -1161,6 +1161,9 @@ msgstr "" msgid "Ignore \"The\" in artist names" msgstr "忽視在演唱者名字中的“The”" +msgid "Images (*.jpg)" +msgstr "" + msgid "" "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm *.tiff)" msgstr "" @@ -1964,6 +1967,12 @@ msgstr "取樣頻率" msgid "Samplerate" msgstr "取樣頻率" +msgid "Save Album Cover" +msgstr "" + +msgid "Save cover to disk..." +msgstr "" + msgid "Save image" msgstr "" diff --git a/src/ui/albumcoverchoicecontroller.cpp b/src/ui/albumcoverchoicecontroller.cpp index 7305bdec6..5b7f59aa1 100644 --- a/src/ui/albumcoverchoicecontroller.cpp +++ b/src/ui/albumcoverchoicecontroller.cpp @@ -58,6 +58,7 @@ AlbumCoverChoiceController::AlbumCoverChoiceController(QWidget* parent) cover_from_file_ = menu_->addAction(IconLoader::Load("document-open"), tr("Load cover from disk...")); cover_from_url_ = menu_->addAction(IconLoader::Load("download"), tr("Load cover from URL...")); search_for_cover_ = menu_->addAction(IconLoader::Load("find"), tr("Search for album covers...")); + save_cover_ = menu_->addAction(IconLoader::Load("document-save"), tr("Save cover to disk...")); unset_cover_ = menu_->addAction(IconLoader::Load("list-remove"), tr("Unset cover")); show_cover_ = menu_->addAction(IconLoader::Load("zoom-in"), tr("Show fullsize...")); } @@ -68,8 +69,8 @@ AlbumCoverChoiceController::~AlbumCoverChoiceController() QList AlbumCoverChoiceController::GetAllActions() { return QList() << cover_from_file_ << cover_from_url_ - << search_for_cover_ << unset_cover_ - << show_cover_; + << search_for_cover_ << save_cover_ + << unset_cover_ << show_cover_; } void AlbumCoverChoiceController::SetLibrary(LibraryBackend* library) { diff --git a/src/ui/albumcoverchoicecontroller.h b/src/ui/albumcoverchoicecontroller.h index 8fb88a741..533e52ca0 100644 --- a/src/ui/albumcoverchoicecontroller.h +++ b/src/ui/albumcoverchoicecontroller.h @@ -45,6 +45,7 @@ class AlbumCoverChoiceController : public QWidget { QAction* cover_from_file_action() const { return cover_from_file_; } QAction* cover_from_url_action() const { return cover_from_url_; } QAction* search_for_cover_action() const { return search_for_cover_; } + QAction* save_cover_action() const { return save_cover_; } QAction* unset_cover_action() const { return unset_cover_; } QAction* show_cover_action() const { return show_cover_; } @@ -111,6 +112,7 @@ private: QAction* cover_from_file_; QAction* cover_from_url_; QAction* search_for_cover_; + QAction* save_cover_; QAction* unset_cover_; QAction* show_cover_; }; diff --git a/src/widgets/nowplayingwidget.cpp b/src/widgets/nowplayingwidget.cpp index 0781a9acc..9c62da1cc 100644 --- a/src/widgets/nowplayingwidget.cpp +++ b/src/widgets/nowplayingwidget.cpp @@ -22,6 +22,8 @@ #include "ui/albumcoverchoicecontroller.h" #include "ui/iconloader.h" +#include +#include #include #include #include @@ -60,6 +62,7 @@ NowPlayingWidget::NowPlayingWidget(QWidget *parent) kitten_loader_(NULL), mode_(SmallSongDetails), menu_(new QMenu(this)), + save_dialog_(NULL), above_statusbar_action_(NULL), visible_(false), small_ideal_height_(0), @@ -99,6 +102,8 @@ NowPlayingWidget::NowPlayingWidget(QWidget *parent) SIGNAL(triggered()), this, SLOT(UnsetCover())); connect(album_cover_choice_controller_->show_cover_action(), SIGNAL(triggered()), this, SLOT(ShowCover())); + connect(album_cover_choice_controller_->save_cover_action(), + SIGNAL(triggered()), this, SLOT(SaveCover())); menu_->addActions(actions); menu_->addSeparator(); @@ -146,8 +151,8 @@ void NowPlayingWidget::CoverLoaderInitialised() { static_cast*>(sender()); UpdateHeight(loader->Worker().get()); loader->Worker()->SetPadOutputImage(true); - connect(loader->Worker().get(), SIGNAL(ImageLoaded(quint64,QImage)), - SLOT(AlbumArtLoaded(quint64,QImage))); + connect(loader->Worker().get(), SIGNAL(ImageLoaded(quint64,QImage,QImage)), + SLOT(AlbumArtLoaded(quint64,QImage,QImage))); } void NowPlayingWidget::UpdateHeight(AlbumCoverLoader* loader) { @@ -236,11 +241,12 @@ void NowPlayingWidget::UpdateDetailsText() { details_->setHtml(html); } -void NowPlayingWidget::AlbumArtLoaded(quint64 id, const QImage& image) { +void NowPlayingWidget::AlbumArtLoaded(quint64 id, const QImage& scaled, const QImage& original) { if (id != load_cover_id_) return; - cover_ = QPixmap::fromImage(image); + cover_ = QPixmap::fromImage(scaled); + original_ = original; update(); // Were we waiting for this cover to load before we started fading? @@ -430,6 +436,32 @@ void NowPlayingWidget::SearchForCover() { NowPlaying(metadata_); } +void NowPlayingWidget::SaveCover() { + if (!save_dialog_) { + save_dialog_ = new QFileDialog( + this, + tr("Save Album Cover"), + QDir::home().absolutePath(), + tr("Images (*.jpg)")); + save_dialog_->setAcceptMode(QFileDialog::AcceptSave); + } + save_dialog_->selectFile(metadata_.album() + ".jpg"); + + if (!save_dialog_->exec()) { + return; + } + + QStringList filenames = save_dialog_->selectedFiles(); + QString save_filename = filenames[0]; + + QString extension = save_filename.right(4); + if (!extension.startsWith('.') || + !QImageWriter::supportedImageFormats().contains(extension.right(3).toUtf8())) { + save_filename.append(".jpg"); + } + original_.save(save_filename); +} + void NowPlayingWidget::UnsetCover() { album_cover_choice_controller_->UnsetCover(&metadata_); NowPlaying(metadata_); diff --git a/src/widgets/nowplayingwidget.h b/src/widgets/nowplayingwidget.h index a3fb89056..4a6064462 100644 --- a/src/widgets/nowplayingwidget.h +++ b/src/widgets/nowplayingwidget.h @@ -29,6 +29,7 @@ class LibraryBackend; class QAction; class QActionGroup; +class QFileDialog; class QMenu; class QMovie; class QSignalMapper; @@ -81,7 +82,7 @@ private slots: void ShowAboveStatusBar(bool above); void CoverLoaderInitialised(); - void AlbumArtLoaded(quint64 id, const QImage& image); + void AlbumArtLoaded(quint64 id, const QImage& scaled, const QImage& original); void SetVisible(bool visible); void SetHeight(int height); @@ -91,6 +92,7 @@ private slots: void LoadCoverFromFile(); void LoadCoverFromURL(); void SearchForCover(); + void SaveCover(); void UnsetCover(); void ShowCover(); @@ -111,6 +113,8 @@ private: QMenu* menu_; + QFileDialog* save_dialog_; + QAction* above_statusbar_action_; bool visible_; @@ -124,6 +128,8 @@ private: Song metadata_; quint64 load_cover_id_; QPixmap cover_; + // A copy of the original, unscaled album cover. + QImage original_; QTextDocument* details_; // Holds the last track while we're fading to the new track