From 474411195905bee98ee84df5ca38353b77c91fd3 Mon Sep 17 00:00:00 2001 From: emeric Date: Fri, 4 Jul 2014 13:52:59 +0200 Subject: [PATCH] Make db refresh less verbose --- database-updater/DatabaseUpdater.cpp | 11 +---------- metadata/AvFormat.cpp | 2 -- transcode/InputMediaFile.cpp | 4 ---- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/database-updater/DatabaseUpdater.cpp b/database-updater/DatabaseUpdater.cpp index 6d196220..3ccd4dc8 100644 --- a/database-updater/DatabaseUpdater.cpp +++ b/database-updater/DatabaseUpdater.cpp @@ -69,21 +69,14 @@ Updater::processAudioFile( const boost::filesystem::path& file, Stats& stats) // Skip file if last write is the same Wt::Dbo::ptr track = Track::getByPath(_db.getSession(), file); if (track && track->getLastWriteTime() == lastWriteTime) - { - std::cerr << "Skipped '" << file << "' (last write time match)" << std::endl; return; - } std::vector checksum; computeCrc( file, checksum ); // Skip file if its checksum is still the same - if (track && track->getChecksum() == checksum) { - std::cerr << "Skipped '" << file << "' (checksum match)" << std::endl; + if (track && track->getChecksum() == checksum) return; - } - - std::cout << "parsing file " << file << std::endl; MetaData::Items items; _metadataParser.parse(file, items); @@ -239,7 +232,6 @@ Updater::processAudioFile( const boost::filesystem::path& file, Stats& stats) void Updater::refreshAudioDirectory( const boost::filesystem::path& p, Stats& stats) { - std::cout << "Refreshing audio directory " << p << std::endl; if (boost::filesystem::exists(p) && boost::filesystem::is_directory(p)) { typedef std::vector Paths; // store paths, @@ -267,7 +259,6 @@ Updater::refreshAudioDirectory( const boost::filesystem::path& p, Stats& stats) } } } - std::cout << "Refreshing audio directory " << p << ": DONE" << std::endl; } void diff --git a/metadata/AvFormat.cpp b/metadata/AvFormat.cpp index c8b29eff..6c35b664 100644 --- a/metadata/AvFormat.cpp +++ b/metadata/AvFormat.cpp @@ -20,8 +20,6 @@ AvFormat::parse(const boost::filesystem::path& p, Items& items) Av::InputFormatContext input(p); input.findStreamInfo(); // needed by input.getDurationSecs - std::cout << "Processing file '" << p << "'" << std::endl; - std::map metadata; input.getMetadata().get(metadata); diff --git a/transcode/InputMediaFile.cpp b/transcode/InputMediaFile.cpp index 4de5f030..5c491a93 100644 --- a/transcode/InputMediaFile.cpp +++ b/transcode/InputMediaFile.cpp @@ -46,11 +46,7 @@ InputMediaFile::InputMediaFile(const boost::filesystem::path& p) { // Reject Video stream hat are in fact cover arts if (avStream.hasAttachedPic()) - { - std::cout << "Rejecting stream since it is an attached picture!" << std::endl; continue; - } - avMediaTypes.push_back(avStream.getCodecContext().getType());