mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Deprecate calls to MPEG::File::save(...) that use boolean params
This uses explicit enums for e.g. the ID3v2 version, making calls more readable: file.save(ID3v1 | ID3v2, StripOthers, ID3v2::v4, Duplicate); Instead of: file.save(ID3v1 | ID3v2, true, 4, true); Needs to be ported to other types, per #922
This commit is contained in:
@ -145,7 +145,7 @@ public:
|
||||
|
||||
MPEG::File file(newname.c_str());
|
||||
file.ID3v2Tag(true)->addFrame(f);
|
||||
file.save(MPEG::File::ID3v2, true, 3);
|
||||
file.save(MPEG::File::ID3v2, File::StripOthers, ID3v2::v3);
|
||||
CPPUNIT_ASSERT_EQUAL(true, file.hasID3v2Tag());
|
||||
|
||||
ByteVector data = f->render();
|
||||
@ -166,7 +166,7 @@ public:
|
||||
|
||||
MPEG::File file(copy.fileName().c_str());
|
||||
file.ID3v2Tag(true)->addFrame(f);
|
||||
file.save(MPEG::File::ID3v2, true, 3);
|
||||
file.save(MPEG::File::ID3v2, File::StripOthers, ID3v2::v3);
|
||||
CPPUNIT_ASSERT(file.hasID3v2Tag());
|
||||
|
||||
ByteVector data = f->render();
|
||||
@ -756,7 +756,7 @@ public:
|
||||
foo.ID3v2Tag()->addFrame(new ID3v2::TextIdentificationFrame("TSOT", String::Latin1));
|
||||
foo.ID3v2Tag()->addFrame(new ID3v2::TextIdentificationFrame("TSST", String::Latin1));
|
||||
foo.ID3v2Tag()->addFrame(new ID3v2::TextIdentificationFrame("TSOP", String::Latin1));
|
||||
foo.save(MPEG::File::AllTags, true, 3);
|
||||
foo.save(MPEG::File::AllTags, File::StripOthers, ID3v2::v3);
|
||||
}
|
||||
{
|
||||
MPEG::File bar(newname.c_str());
|
||||
@ -1029,7 +1029,7 @@ public:
|
||||
MPEG::File bar(newname.c_str());
|
||||
bar.ID3v2Tag()->removeFrames("TPE1");
|
||||
// Should strip ID3v1 here and not add old values to ID3v2 again
|
||||
bar.save(MPEG::File::ID3v2, true);
|
||||
bar.save(MPEG::File::ID3v2, File::StripOthers);
|
||||
}
|
||||
|
||||
MPEG::File f(newname.c_str());
|
||||
@ -1275,7 +1275,7 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate());
|
||||
|
||||
f.ID3v2Tag()->setArtist("Artist A");
|
||||
f.save(MPEG::File::ID3v2, true);
|
||||
f.save(MPEG::File::ID3v2, File::StripOthers);
|
||||
}
|
||||
{
|
||||
MPEG::File f(copy.fileName().c_str());
|
||||
|
@ -187,7 +187,7 @@ public:
|
||||
|
||||
f.tag()->setTitle(xxx);
|
||||
f.tag()->setArtist("Artist A");
|
||||
f.save(MPEG::File::AllTags, true, 4);
|
||||
f.save(MPEG::File::AllTags, File::StripOthers, ID3v2::v4);
|
||||
CPPUNIT_ASSERT_EQUAL(true, f.hasID3v2Tag());
|
||||
}
|
||||
{
|
||||
@ -230,7 +230,7 @@ public:
|
||||
|
||||
f.tag()->setTitle(xxx);
|
||||
f.tag()->setArtist("Artist A");
|
||||
f.save(MPEG::File::AllTags, true, 3);
|
||||
f.save(MPEG::File::AllTags, File::StripOthers, ID3v2::v3);
|
||||
CPPUNIT_ASSERT_EQUAL(true, f.hasID3v2Tag());
|
||||
}
|
||||
{
|
||||
@ -369,7 +369,7 @@ public:
|
||||
{
|
||||
MPEG::File f(copy.fileName().c_str());
|
||||
f.ID3v2Tag(true)->setTitle("");
|
||||
f.save(MPEG::File::ID3v2, false);
|
||||
f.save(MPEG::File::ID3v2, File::StripNone);
|
||||
}
|
||||
{
|
||||
MPEG::File f(copy.fileName().c_str());
|
||||
@ -389,7 +389,7 @@ public:
|
||||
{
|
||||
MPEG::File f(copy.fileName().c_str());
|
||||
f.ID3v1Tag(true)->setTitle("");
|
||||
f.save(MPEG::File::ID3v1, false);
|
||||
f.save(MPEG::File::ID3v1, File::StripNone);
|
||||
}
|
||||
{
|
||||
MPEG::File f(copy.fileName().c_str());
|
||||
@ -409,7 +409,7 @@ public:
|
||||
{
|
||||
MPEG::File f(copy.fileName().c_str());
|
||||
f.APETag(true)->setTitle("");
|
||||
f.save(MPEG::File::APE, false);
|
||||
f.save(MPEG::File::APE, File::StripNone);
|
||||
}
|
||||
{
|
||||
MPEG::File f(copy.fileName().c_str());
|
||||
|
Reference in New Issue
Block a user