diff options
author | Mavridis Philippe <[email protected]> | 2023-11-30 17:52:16 +0200 |
---|---|---|
committer | Mavridis Philippe <[email protected]> | 2024-09-08 01:41:03 +0300 |
commit | 4a29e303dfd19cbce98f07354c0b6aba42d46d6f (patch) | |
tree | 8e1f73c016ddb9e9883eacb71f00f060de194e93 | |
parent | ada12bc56af54c67952662835c4404bffab087fc (diff) | |
download | kaffeine-4a29e303dfd19cbce98f07354c0b6aba42d46d6f.tar.gz kaffeine-4a29e303dfd19cbce98f07354c0b6aba42d46d6f.zip |
mpv: small cleanup of debug code
Signed-off-by: Mavridis Philippe <[email protected]>
-rw-r--r-- | kaffeine/src/player-parts/libmpv-part/libmpv_part.cpp | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/kaffeine/src/player-parts/libmpv-part/libmpv_part.cpp b/kaffeine/src/player-parts/libmpv-part/libmpv_part.cpp index 346acba..352d11a 100644 --- a/kaffeine/src/player-parts/libmpv-part/libmpv_part.cpp +++ b/kaffeine/src/player-parts/libmpv-part/libmpv_part.cpp @@ -95,7 +95,6 @@ MpvPart::MpvPart(TQWidget* parentWidget, const char* widgetName, TQObject* paren } m_logoPath = locate( "data", "kaffeine/logo" ); - kdDebug() << "libmpvpart: Found logo animation: " << m_logoPath << endl; closeURL(); // displays logo emit setStatusBarText(i18n("Ready")); @@ -347,7 +346,6 @@ bool MpvPart::openURL(const MRL& mrl) { || (m_mrl.mime() == "audio/x-scpls") || (m_mrl.mime() == "audio/x-mpegurl") || (m_mrl.mime() == "audio/mpegurl") || (ext == "asx") || (ext == "asf") || (ext == "wvx") || (ext == "wax") ) /* windows meta files */ { - kdDebug() << "libmpvpart: Check for kaffeine/noatun/m3u/pls/asx playlist\n"; TQString localFile; if ( TDEIO::NetAccess::download(m_mrl.kurl(), localFile, widget()) ) { TQFile file( localFile ); @@ -358,23 +356,18 @@ bool MpvPart::openURL(const MRL& mrl) { file.close(); if ( secondLine.contains("kaffeine", false) ) { - kdDebug() << "libmpvpart: Try loading kaffeine playlist\n"; playlist = PlaylistImport::kaffeine( localFile, m_playlist ); } if ( secondLine.contains("noatun", false) ) { - kdDebug() << "libmpvpart: Try loading noatun playlist\n"; playlist = PlaylistImport::noatun( localFile, m_playlist); } if ( firstLine.contains("asx", false) ) { - kdDebug() << "libmpvpart: Try loading asx playlist\n"; playlist = PlaylistImport::asx( localFile, m_playlist ); } if ( firstLine.contains("[playlist]", false) ) { - kdDebug() << "libmpvpart: Try loading pls playlist\n"; playlist = PlaylistImport::pls( localFile, m_playlist ); } if (ext == "m3u" || ext == "m3u8") { //indentify by extension - kdDebug() << "libmpvpart: Try loading m3u playlist\n"; playlist = PlaylistImport::m3u( localFile, m_playlist ); } } @@ -383,13 +376,11 @@ bool MpvPart::openURL(const MRL& mrl) { } // check for ram playlist if ( (ext == "ra") || (ext == "rm") || (ext == "ram") || (ext == "lsc") || (ext == "pl") ) { - kdDebug() << "libmpvpart: Try loading ram playlist\n"; playlist = PlaylistImport::ram( m_mrl, m_playlist, widget() ); } if (!playlist) { - kdDebug() << "libmpvpart: Got single track" << endl; m_playlist.append( m_mrl ); } @@ -608,10 +599,7 @@ void MpvPart::slotReloadSubtitles() { const char *rm_args[] = {"sub-remove", nullptr}; mpv_command(m_mpv, rm_args); - if ((!subtitles.isEmpty()) && (subId > -1)) { - kdDebug() << "adding subtitle file " << subtitles[subId] << endl; - - // Add requested subtitles + if ((!subtitles.isEmpty()) && (subId > -1)) { // Add requested subtitles const char *add_args[] = {"sub-add", subtitles[subId].local8Bit(), nullptr}; mpv_command_async(m_mpv, 0, add_args); } @@ -686,9 +674,6 @@ void MpvPart::slotAddSubtitles() { i18n("*.smi *.srt *.sub *.txt *.ssa *.asc|Subtitle Files\n*.*|All Files"), 0, i18n("Select Subtitle File")).path(); - kdDebug()<<"slotAddSubtitles: "<<subtitleURL<<endl; - kdDebug()<<" exists: "<<TQFile::exists(subtitleURL)<<endl; - if (subtitleURL.isEmpty() || !TQFile::exists(subtitleURL)) { return; } @@ -706,8 +691,6 @@ void MpvPart::slotContextSetSubtitles(int choice) { return; } - kdDebug() << "switching to subtitle: " << subId - << " (" << m_subs->text(choice) << ")" << endl; m_mrl.setCurrentSubtitle(subId); emit signalNewMeta(m_mrl); slotReloadSubtitles(); @@ -777,8 +760,6 @@ void MpvPart::hideContextMenu() { void MpvPart::updateMetadata() { if (!m_mpv) return; - kdDebug() << "update metadata" << endl; - // Errors reading metadata are not fatal, as this is not something that // the user explicitly requests mpv_node result; @@ -818,7 +799,6 @@ void MpvPart::updateMetadata() { else if (key == "comment" || key == "icy-description") { m_mrl.setComment(value); } - kdDebug() << "e " << map->keys[i] << ": " << map->values[i].u.string << endl; } mpv_free_node_contents(&result); @@ -879,9 +859,10 @@ data = result.u.list->values[4].u.ba; #undef CHECK_ARG // Validate image format (we can handle only bgr0, which is the default anyway) - kdDebug() << "mpv: screenshot-raw image format: " << format << endl; if (qstrcmp(format, "bgr0") != 0) { - THROW_ERROR_FREE("Internal error", "mpv: screenshot-raw returned image format other than bgr0") + THROW_ERROR_FREE("Internal error", + TQString("mpv: screenshot-raw returned image format other than bgr0 (%1)") + .arg(format)) return; } |