diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2024-02-12 19:14:31 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2024-02-12 19:14:31 +0100 |
commit | 51d998343c2742e2bcf46dd6e85c1ee21d49b17a (patch) | |
tree | 0f186ec54eec71756e52a8d905ca487e951e62d8 | |
parent | d23c3cbfdd4a10ad6583acd84b2487a9c1545fdb (diff) | |
download | tdemultimedia-51d998343c2742e2bcf46dd6e85c1ee21d49b17a.tar.gz tdemultimedia-51d998343c2742e2bcf46dd6e85c1ee21d49b17a.zip |
Add support for TagLib 2.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r-- | tdefile-plugins/flac/tdefile_flac.cpp | 4 | ||||
-rw-r--r-- | tdefile-plugins/mp3/tdefile_mp3.cpp | 2 | ||||
-rw-r--r-- | tdefile-plugins/mpc/tdefile_mpc.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tdefile-plugins/flac/tdefile_flac.cpp b/tdefile-plugins/flac/tdefile_flac.cpp index 808af9c9..3ee4efa2 100644 --- a/tdefile-plugins/flac/tdefile_flac.cpp +++ b/tdefile-plugins/flac/tdefile_flac.cpp @@ -200,7 +200,7 @@ bool KFlacPlugin::readInfo( KFileMetaInfo& info, uint what ) appendItem(techgroup, "Bitrate", properties->bitrate()); appendItem(techgroup, "Sample Rate", properties->sampleRate()); - appendItem(techgroup, "Sample Width", properties->sampleWidth()); + appendItem(techgroup, "Sample Width", properties->bitsPerSample()); appendItem(techgroup, "Channels", properties->channels()); appendItem(techgroup, "Length", properties->length()); } @@ -234,7 +234,7 @@ bool KFlacPlugin::writeInfo(const KFileMetaInfo& info) const { TagLib::File *file; - if (!TagLib::File::isWritable(TQFile::encodeName(info.path()).data())) { + if (access(info.path().local8Bit().data(), R_OK|W_OK)) { kdDebug(7034) << "can't write to " << info.path() << endl; return false; } diff --git a/tdefile-plugins/mp3/tdefile_mp3.cpp b/tdefile-plugins/mp3/tdefile_mp3.cpp index 742f0759..f6f567cf 100644 --- a/tdefile-plugins/mp3/tdefile_mp3.cpp +++ b/tdefile-plugins/mp3/tdefile_mp3.cpp @@ -237,7 +237,7 @@ bool KMp3Plugin::writeInfo(const KFileMetaInfo &info) const TagLib::ID3v2::FrameFactory::instance()->setDefaultTextEncoding(TagLib::String::UTF8); TagLib::MPEG::File file(TQFile::encodeName(info.path()).data(), false); - if(!file.isOpen() || !TagLib::File::isWritable(file.name())) + if(!file.isOpen() || access(info.path().local8Bit().data(), R_OK|W_OK)) { kdDebug(7034) << "couldn't open " << info.path() << endl; return false; diff --git a/tdefile-plugins/mpc/tdefile_mpc.cpp b/tdefile-plugins/mpc/tdefile_mpc.cpp index 238307f1..b3282c19 100644 --- a/tdefile-plugins/mpc/tdefile_mpc.cpp +++ b/tdefile-plugins/mpc/tdefile_mpc.cpp @@ -210,7 +210,7 @@ bool KMpcPlugin::writeInfo(const KFileMetaInfo& info) const { TagLib::File *file; - if (!TagLib::File::isWritable(TQFile::encodeName(info.path()).data())) { + if (access(info.path().local8Bit().data(), R_OK|W_OK)) { kdDebug(7034) << "can't write to " << info.path() << endl; return false; } |