Skip to content

Commit

Permalink
Write album artist in ID3v2 tags
Browse files Browse the repository at this point in the history
  • Loading branch information
sjuvonen committed Dec 30, 2014
1 parent a088f9a commit 4cdec8b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/metadata/imagecache.cpp
Expand Up @@ -13,7 +13,7 @@ namespace Coquillo {
}

int ImageCache::insert(const QImage & image) {
auto bits = reinterpret_cast<const char*>(image.bits());
const auto bits = reinterpret_cast<const char*>(image.bits());
int id = qChecksum(bits, image.byteCount());
if (id and !_images.contains(id)) {
_images[id] = image;
Expand All @@ -24,7 +24,6 @@ namespace Coquillo {
void ImageCache::resize(int id, const QSize & size) {
if (contains(id)) {
const QImage image = this->image(id);

if (image.width() > size.width() or image.height() > size.height()) {
const QImage scaled = image.scaled(size, Qt::KeepAspectRatio);
replace(id, scaled);
Expand Down
1 change: 0 additions & 1 deletion src/metadata/imagecache.h
Expand Up @@ -9,7 +9,6 @@ namespace Coquillo {
class ImageCache {
public:
static ImageCache * instance();

int insert(const QImage & image);
void resize(int id, const QSize & size);

Expand Down
2 changes: 1 addition & 1 deletion src/metadata/tags/id3v2.cpp
Expand Up @@ -85,7 +85,7 @@ namespace Coquillo {
Default::write(common);

auto tag = dynamic_cast<TagLib::ID3v2::Tag*>(_tag);
const QStringList text_frames = {"TCOM", "TENC", "TOPE", "TPOS"};
const QStringList text_frames = {"TCOM", "TENC", "TOPE", "TPE2", "TPOS"};
const QStringList supported = (QStringList){"WXXX"} + text_frames;

foreach (const QString & name, supported) {
Expand Down

0 comments on commit 4cdec8b

Please sign in to comment.