Bug 259849 - USB sticks and Discs are not scanned anymore
Summary: USB sticks and Discs are not scanned anymore
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/USB mass storage and MSC (show other bugs)
Version: 2.4-GIT
Platform: Ubuntu Linux
: NOR major
Target Milestone: 2.4.0
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 15:50 UTC by Myriam Schweingruber
Modified: 2011-12-20 11:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Myriam Schweingruber 2010-12-14 15:50:52 UTC
Connecting a USB stick or Hard Drive will show the size of the device after configuration, but continues to show = trcks, although the Files Browser shows all tracks correctly.

Restarting didn't help.

Using latest 2.4-git, last commit was 79682417dc610ed3e1493ead17cd73d50641fef5
KDE 4.6 beta 2 on Kubuntu 10.10
Comment 1 Mikko C. 2010-12-19 10:19:59 UTC
Same here.
My mp3 player is mounted at "/media/COWON J3/"

Some output:

amarok: BEGIN: bool Meta::MediaDeviceHandler::privateParseTracks() 
amarok:   BEGIN: void Meta::MediaDeviceHandler::setupReadCapability() 
amarok:     RCB does not exist 
amarok:     Has read capability interface 
amarok:     making custom read capability 
amarok:     Created rc 
amarok:   END__: void Meta::MediaDeviceHandler::setupReadCapability() [Took: 0s] 
amarok:   BEGIN: virtual void Meta::UmsHandler::prepareToParseTracks() 
amarok:     [UmsHandler] Scanning for music in  "" 
amarok:     [UmsHandler] list size:  0 
amarok:   END__: virtual void Meta::UmsHandler::prepareToParseTracks() [Took: 0s] 
amarok: END__: bool Meta::MediaDeviceHandler::privateParseTracks() [Took: 0s] 
amarok: BEGIN: void CollectionTreeItemModelBase::handleCompilations(CollectionTreeItem*) const 
amarok: END__: void CollectionTreeItemModelBase::handleCompilations(CollectionTreeItem*) const [Took: 0s] 
amarok: BEGIN: void CollectionTreeItemModelBase::handleCompilations(CollectionTreeItem*) const 
amarok: END__: void CollectionTreeItemModelBase::handleCompilations(CollectionTreeItem*) const [Took: 0s] 
amarok: BEGIN: void CollectionManager::slotNewCollection(Collections::Collection*) 
amarok:   [CollectionManager] Warning, newCollection is already being managed 
amarok: END__: void CollectionManager::slotNewCollection(Collections::Collection*) [Took: 0s] 
amarok: BEGIN: void CollectionTreeItemModelBase::handleSpecialQueryResult(CollectionTreeItem::Type, Collections::QueryMaker*, const Meta::DataList&) 
amarok:   [CollectionTreeItemModelBase] Received special data:  0 
amarok: END__: void CollectionTreeItemModelBase::handleSpecialQueryResult(CollectionTreeItem::Type, Collections::QueryMaker*, const Meta::DataList&) [Took: 0s] 
amarok: BEGIN: void CollectionTreeItemModelBase::handleSpecialQueryResult(CollectionTreeItem::Type, Collections::QueryMaker*, const Meta::DataList&) 
amarok:   [CollectionTreeItemModelBase] Received special data:  26 
amarok: END__: void CollectionTreeItemModelBase::handleSpecialQueryResult(CollectionTreeItem::Type, Collections::QueryMaker*, const Meta::DataList&) [Took: 0s] 
amarok: BEGIN: virtual void CollectionTreeItemModelBase::queryDone() 
amarok: END__: virtual void CollectionTreeItemModelBase::queryDone() [Took: 0s] 
amarok: BEGIN: virtual void CollectionTreeItemModelBase::queryDone() 
amarok: END__: virtual void CollectionTreeItemModelBase::queryDone() [Took: 0s] 
amarok: BEGIN: virtual void CollectionTreeItemModelBase::queryDone() 
amarok: END__: virtual void CollectionTreeItemModelBase::queryDone() [Took: 0s] 
amarok: BEGIN: virtual void CollectionTreeItemModelBase::queryDone() 
amarok: END__: virtual void CollectionTreeItemModelBase::queryDone() [Took: 0s] 
amarok: BEGIN: void SqlRegistry::emptyCache() 
amarok:   [SqlRegistry]   albums: 47 (-9) of 1693 cached 
amarok:   [SqlRegistry]  artists: 702 (-2) of 1020 cached 
amarok:   [SqlRegistry]   genres: 9 (-2) of 103 cached 
amarok:   [SqlRegistry]   tracks: 21 (-10) of 21160 cached 
amarok: END__: void SqlRegistry::emptyCache() [Took: 0.004s]
Comment 2 Mikko C. 2010-12-19 10:25:58 UTC
I'm also using KDE 4.6 so it's possible that something changed in devices detection (udisks and such?).


Trying to copy any track to the player crashes amarok:

[KCrash Handler]
#6  0x00007f1937ee8c4f in Collections::CollectionLocation::prepareCopy (this=0x3ca9340, tracks=..., destination=0x3cc2890, configuration=...) at /home/mikko/amarok/src/core/collections/CollectionLocation.cpp:110
#7  0x00007f1937eea0be in Collections::CollectionLocation::queryDone (this=0x3ca9340) at /home/mikko/amarok/src/core/collections/CollectionLocation.cpp:486
#8  0x00007f1937eeac28 in Collections::CollectionLocation::qt_metacall (this=0x3ca9340, _c=QMetaObject::InvokeMetaMethod, _id=21, _a=0x7fffa18b73a0) at /home/mikko/amarok/build/src/core/CollectionLocation.moc:140
#9  0x00007f18f9bac321 in Collections::SqlCollectionLocation::qt_metacall (this=0x3ca9340, _c=QMetaObject::InvokeMetaMethod, _id=25, _a=0x7fffa18b73a0) at /home/mikko/amarok/build/src/core-impl/collections/db/sql/SqlCollectionLocation.moc:143
#10 0x00007f1935d8150a in QMetaObject::activate (sender=0x3cefbf0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x3ca9378) at kernel/qobject.cpp:3272
#11 0x00007f1937ef1ccb in Collections::QueryMaker::queryDone (this=0x3cefbf0) at /home/mikko/amarok/build/src/core/QueryMaker.moc:174
#12 0x00007f1937eeff3e in Collections::MetaQueryMaker::slotQueryDone (this=0x3cefbf0) at /home/mikko/amarok/src/core/collections/MetaQueryMaker.cpp:314
#13 0x00007f1937ef0042 in Collections::MetaQueryMaker::qt_metacall (this=0x3cefbf0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffa18b7520) at /home/mikko/amarok/build/src/core/MetaQueryMaker.moc:73
#14 0x00007f1935d8150a in QMetaObject::activate (sender=0x3cc2b10, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x3ca9378) at kernel/qobject.cpp:3272
#15 0x00007f1937ef1ccb in Collections::QueryMaker::queryDone (this=0x3cc2b10) at /home/mikko/amarok/build/src/core/QueryMaker.moc:174
#16 0x00007f18f9bb1266 in Collections::SqlQueryMaker::done (this=0x3cc2b10, job=0x3cf5790) at /home/mikko/amarok/src/core-impl/collections/db/sql/SqlQueryMaker.cpp:227
#17 0x00007f18f9bb59da in Collections::SqlQueryMaker::qt_metacall (this=0x3cc2b10, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffa18b76f0) at /home/mikko/amarok/build/src/core-impl/collections/db/sql/SqlQueryMaker.moc:92
#18 0x00007f1935d8150a in QMetaObject::activate (sender=0x3cf5790, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x3ca9378) at kernel/qobject.cpp:3272
#19 0x00007f1932639972 in ThreadWeaver::Job::done (this=<value optimized out>, _t1=0x3cf5790) at /var/tmp/paludis/kde-base-kdelibs-4.5.85/work/kdelibs-4.5.85_build/threadweaver/Weaver/Job.moc:97
#20 0x00007f1932639a44 in ThreadWeaver::Job::qt_metacall (this=0x3cf5790, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x3e19e40) at /var/tmp/paludis/kde-base-kdelibs-4.5.85/work/kdelibs-4.5.85_build/threadweaver/Weaver/Job.moc:77
#21 0x00007f1935d79bae in QObject::event (this=0x3cf5790, e=0x3cc2890) at kernel/qobject.cpp:1211
#22 0x00007f193676c2dc in QApplicationPrivate::notify_helper (this=0x17eb0a0, receiver=0x3cf5790, e=0x286adb0) at kernel/qapplication.cpp:4445
#23 0x00007f1936773fa7 in QApplication::notify (this=0x7fffa18b81f0, receiver=0x3cf5790, e=0x286adb0) at kernel/qapplication.cpp:4324
#24 0x00007f1938389551 in KApplication::notify (this=0x7fffa18b81f0, receiver=0x3cf5790, event=0x286adb0) at /var/tmp/paludis/kde-base-kdelibs-4.5.85/work/kdelibs-4.5.85/kdeui/kernel/kapplication.cpp:311
#25 0x00007f1935d66e2b in QCoreApplication::notifyInternal (this=0x7fffa18b81f0, receiver=0x3cf5790, event=0x286adb0) at kernel/qcoreapplication.cpp:732
#26 0x00007f1935d6830b in sendEvent (receiver=0x0, event_type=<value optimized out>, data=0x1666440) at kernel/qcoreapplication.h:215
#27 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=<value optimized out>, data=0x1666440) at kernel/qcoreapplication.cpp:1373
#28 0x00007f1935d9812f in QEventDispatcherUNIX::processEvents (this=0x1665af0, flags=) at kernel/qeventdispatcher_unix.cpp:890
#29 0x00007f1936829d49 in QEventDispatcherX11::processEvents (this=0x1665af0, flags=) at kernel/qeventdispatcher_x11.cpp:152
#30 0x00007f1935d65a32 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#31 0x00007f1935d65dfd in QEventLoop::exec (this=0x7fffa18b8190, flags=) at kernel/qeventloop.cpp:201
#32 0x00007f1935d685fb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#33 0x000000000040856a in main (argc=2, argv=0x7fffa18ba668) at /home/mikko/amarok/src/main.cpp:261
Comment 3 Bart Cerneels 2010-12-20 11:48:25 UTC
commit 6baf8ffb20dcecaf3c25b70eb07c0de2537b1b42
branch master
Author: Bart Cerneels <bart.cerneels@kde.org>
Date:   Mon Dec 20 11:47:04 2010 +0100

    Prevent case of non-initialized music folder path.
    
    BUG:259849

diff --git a/src/core-impl/collections/umscollection/handler/UmsHandler.cpp b/src/core-impl/collections/umscollection/handler/UmsHandler.cpp
index 70e8ae2..be57c07 100644
--- a/src/core-impl/collections/umscollection/handler/UmsHandler.cpp
+++ b/src/core-impl/collections/umscollection/handler/UmsHandler.cpp
@@ -137,8 +137,10 @@ UmsHandler::init()
     KUrl playerFilePath( m_mountPoint );
     playerFilePath.addPath( s_settingsFileName );
     QFile playerFile( playerFilePath.toLocalFile() );
+    //prevent BR 259849: no audio_folder key in .is_audio_player file.
+    m_musicPath = m_mountPoint;
 
-    if (playerFile.open(QIODevice::ReadOnly | QIODevice::Text))
+    if( playerFile.open( QIODevice::ReadOnly | QIODevice::Text ) )
     {
         debug() << QString( "Got %1 file").arg( s_settingsFileName );
         QTextStream in(&playerFile);
@@ -183,11 +185,7 @@ UmsHandler::init()
         }
 
     }
-/*
-    m_formats << "mp3" << "wav" << "asf" << "flac" << "wma" << "ogg" << "aac" << "m4a" << "m4b"
-            << "mp4" << "mp2" << "ac3";
 
-*/
     m_mimetypes << "audio/mpeg" << "audio/x-wav" << "video/x-ms-asf" << "audio/x-flac"
             << "audio/x-ms-wma" << "application/ogg" << "audio/mp4" << "audio/mp4a-latm"
             << "video/mp4" << "audio/ac3";