diff --git a/src/common/fileanalyzer.cpp b/src/common/fileanalyzer.cpp index d4ab9bd7..53d3cfd2 100644 --- a/src/common/fileanalyzer.cpp +++ b/src/common/fileanalyzer.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2024, Kevin Andre + Copyright (C) 2014-2026, Kevin André This file is part of PMP (Party Music Player). @@ -183,31 +183,6 @@ namespace PMP return extensionEnum != Extension::None; } - bool FileAnalyzer::preprocessFileForPlayback(QByteArray& fileContents, - QString extension) - { - /* only need to do something for MP3 files */ - if (getExtension(extension) != Extension::MP3) return true; - - /* strip the ID3v2 tag because DirectShow chokes on ID3v2.4 */ - - TagLib::ByteVector scratch(fileContents.data(), uint(fileContents.length())); - TagLib::ByteVectorStream stream(scratch); - TagLib::MPEG::File tagFile(&stream, TagLib::ID3v2::FrameFactory::instance()); - if (!tagFile.isValid()) - { - return false; - } - - tagFile.strip(TagLib::MPEG::File::ID3v2); /* strip the ID3v2 */ - scratch = *stream.data(); /* get the stripped file contents */ - - QByteArray strippedData(scratch.data(), int(scratch.size())); - fileContents = strippedData; - - return true; /* success */ - } - FileAnalyzer::Extension FileAnalyzer::getExtension(QString extension) { auto lower = extension.toLower(); diff --git a/src/common/fileanalyzer.h b/src/common/fileanalyzer.h index 3b7fa62a..77ad737e 100644 --- a/src/common/fileanalyzer.h +++ b/src/common/fileanalyzer.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2021, Kevin Andre + Copyright (C) 2014-2026, Kevin André This file is part of PMP (Party Music Player). @@ -55,9 +55,6 @@ namespace PMP static bool isExtensionSupported(QString const& extension, bool enableExperimentalFileFormats = false); - static bool preprocessFileForPlayback(QByteArray& fileContents, - QString extension); - void analyze(); bool hadError() const; diff --git a/src/server/preloader.cpp b/src/server/preloader.cpp index a513318b..28214ea5 100644 --- a/src/server/preloader.cpp +++ b/src/server/preloader.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2016-2025, Kevin André + Copyright (C) 2016-2026, Kevin André This file is part of PMP (Party Music Player). @@ -398,12 +398,6 @@ namespace PMP::Server qDebug() << "Preloader: read" << contents.size() << "bytes from" << originalFilename << "for queue ID" << queueId; - if (!FileAnalyzer::preprocessFileForPlayback(contents, extension)) - { - qWarning() << "Preloader: failed to preprocess file" << originalFilename; - return failure; - } - QString tempDir; if (QDir::temp().mkpath("PMP-preload-cache")) tempDir = QDir::temp().absolutePath() + "/PMP-preload-cache";