[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/amarok/src/mediadevice/generic
From:       Jeff Mitchell <kde-dev () emailgoeshere ! com>
Date:       2007-04-24 22:46:33
Message-ID: 1177454793.400947.20289.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 657762 by mitchell:

Port forward r657756


 M  +12 -8     genericmediadevice.cpp  


--- trunk/extragear/multimedia/amarok/src/mediadevice/generic/genericmediadevice.cpp \
#657761:657762 @@ -423,9 +423,11 @@
     m_actuallyVfat = ( m_medium.fsType() == "msdosfs" || m_medium.fsType() =="vfat" \
)  ? true : false;
     m_connected = true;
-    m_transferDir = m_medium.mountPoint();
-    m_initialFile = new GenericMediaFile( 0, m_medium.mountPoint(), this );
-    listDir( m_medium.mountPoint() );
+    KURL tempurl = KURL::fromPathOrURL( m_medium.mountPoint() );
+    QString newMountPoint = tempurl.isLocalFile() ? tempurl.path( -1 ) : \
tempurl.prettyURL( -1 ); //no trailing slash +    m_transferDir = newMountPoint;
+    m_initialFile = new GenericMediaFile( 0, newMountPoint, this );
+    listDir( newMountPoint );
     connect( this, SIGNAL( startTransfer() ), MediaBrowser::instance(), SLOT( \
transferClicked() ) );  return true;
 }
@@ -581,7 +583,7 @@
     args["artist"] = artist;
     args["albumartist"] = albumartist;
     args["initial"] = albumartist.mid( 0, 1 ).toUpper();
-    args["filetype"] = mb.url().path().section( ".", -1 ).toLower();
+    args["filetype"] = mb.url().pathOrURL().section( ".", -1 ).toLower();
     QString track;
     if ( mb.track() )
         track.sprintf( "%02d", mb.track() );
@@ -682,7 +684,7 @@
 
     if( !kioCopyTrack( bundle.url(), desturl ) )
     {
-        debug() << "Failed to copy track: " << bundle.url().path(-1) << " to " << \
desturl.path(-1) << endl; +        debug() << "Failed to copy track: " << \
bundle.url().pathOrURL() << " to " << desturl.pathOrURL() << endl;  return 0;
     }
 
@@ -851,13 +853,15 @@
     m_mfm.clear();
     m_mim.clear();
 
-    m_initialFile = new GenericMediaFile( 0, m_medium.mountPoint(), this );
+    KURL tempurl = KURL::fromPathOrURL( m_medium.mountPoint() );
+    QString newMountPoint = tempurl.isLocalFile() ? tempurl.path( -1 ) : \
tempurl.prettyURL( -1 ); //no trailing slash +    m_initialFile = new \
GenericMediaFile( 0, newMountPoint, this );  }
 
 void
 GenericMediaDevice::dirListerClear( const KUrl &url )
 {
-    QString directory = url.path(-1);
+    QString directory = url.pathOrURL();
     GenericMediaFile *vmf = m_mfm[directory];
     if( vmf )
         vmf->deleteAll( false );
@@ -866,7 +870,7 @@
 void
 GenericMediaDevice::dirListerDeleteItem( KFileItem *fileitem )
 {
-    QString filename = fileitem->url().path(-1);
+    QString filename = fileitem->url().pathOrURL();
     GenericMediaFile *vmf = m_mfm[filename];
     if( vmf )
         vmf->deleteAll( true );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic