Commit 825e6c85 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

Check if supported by id3lib before converting to ID3v2.3.0, fixes SF Bug #3535948.

parent 4d4ae763
......@@ -46,6 +46,7 @@ class FlacFile : public OggFile {
public:
/** File type resolution. */
class Resolver : public TaggedFile::Resolver {
public:
/**
* Create an FlacFile object if it supports the filename's extension.
*
......
......@@ -44,6 +44,7 @@ class Mp3File : public TaggedFile {
public:
/** File type resolution. */
class Resolver : public TaggedFile::Resolver {
public:
/**
* Create an Mp3File object if it supports the filename's extension.
*
......
......@@ -39,6 +39,7 @@ class OggFile : public TaggedFile {
public:
/** File type resolution. */
class Resolver : public TaggedFile::Resolver {
public:
/**
* Create an OggFile object if it supports the filename's extension.
*
......
......@@ -53,6 +53,7 @@ class TagLibFile : public TaggedFile {
public:
/** File type resolution. */
class Resolver : public TaggedFile::Resolver {
public:
/**
* Create an TagLibFile object if it supports the filename's extension.
*
......
......@@ -1883,7 +1883,9 @@ void Kid3Application::convertToId3v23()
taggedFile->readTags(false);
if (taggedFile->hasTagV2() && !taggedFile->isChanged()) {
QString tagFmt = taggedFile->getTagFormatV2();
if (tagFmt.length() >= 7 && tagFmt.startsWith("ID3v2.") && tagFmt[6] > '3') {
if (tagFmt.length() >= 7 && tagFmt.startsWith("ID3v2.") && tagFmt[6] > '3' &&
Mp3File::Resolver().getSupportedFileExtensions().contains(
taggedFile->getFileExtension())) {
if (dynamic_cast<TagLibFile*>(taggedFile) != 0) {
FrameCollection frames;
taggedFile->getAllFramesV2(frames);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment