~hile/mixxx/hidblacklist

« back to all changes in this revision

Viewing changes to mixxx/src/library/rhythmbox/rhythmboxfeature.cpp

  • Committer: Daniel Schürmann
  • Date: 2012-05-14 19:23:28 UTC
  • Revision ID: daschuer@gmx.de-20120514192328-102iuog9kn3nadnh
hide smb songs from Rhythmbox library

Show diffs side-by-side

added added

removed removed

Lines of Context:
197
197
 
198
198
    db.close();
199
199
    if (m_cancelImport) {
200
 
        return NULL;
 
200
        return NULL;
201
201
    }
202
202
    return importPlaylists();
203
203
}
278
278
    QString year;
279
279
    QString genre;
280
280
    QString location;
 
281
    QUrl locationUrl;
281
282
 
282
283
    int bpm = 0;
283
284
    int bitrate = 0;
328
329
                continue;
329
330
            }
330
331
            if(xml.name() == "location"){
331
 
                location = xml.readElementText();
332
 
                location.remove("file://");
333
 
                QByteArray strlocbytes = location.toUtf8();
334
 
                QUrl locationUrl = QUrl::fromEncoded(strlocbytes);
335
 
                location = locationUrl.toLocalFile();
 
332
                locationUrl = QUrl::fromEncoded( xml.readElementText().toUtf8() );
336
333
                continue;
337
334
            }
338
335
        }
340
337
        if (xml.isEndElement() && xml.name() == "entry") {
341
338
            break;
342
339
        }
343
 
 
344
 
    }
 
340
    }
 
341
 
 
342
    location = locationUrl.toLocalFile();
 
343
 
 
344
    if (location.isEmpty()) {
 
345
        // here in case of smb:// location
 
346
        // TODO(XXX) QUrl does not support SMB:// locations does Mixxx?
 
347
        // use ~/.gvfs location instead
 
348
        return;
 
349
    }
 
350
 
345
351
    query.bindValue(":artist", artist);
346
352
    query.bindValue(":title", title);
347
353
    query.bindValue(":album", album);
361
367
        qDebug() << "SQL Error in rhythmboxfeature.cpp: line" << __LINE__ << " " << query.lastError();
362
368
        return;
363
369
    }
364
 
 
365
370
}
366
371
 
367
372
/** reads all playlist entries and executes a SQL statement **/