Commit 2132d359 authored by camilo higuita's avatar camilo higuita

needed changes for new mauikit kio based

parent 3220fb1a
Pipeline #6584 failed with stage
in 7 minutes and 6 seconds
......@@ -113,24 +113,24 @@ void vvave::openUrls(const QStringList &urls)
TagInfo info;
for(const auto &url : urls)
if(db->check_existance(BAE::TABLEMAP[BAE::TABLE::TRACKS], FMH::MODEL_NAME[FMH::MODEL_KEY::URL], url))
if(db->check_existance(BAE::TABLEMAP[BAE::TABLE::TRACKS], FMH::MODEL_NAME[FMH::MODEL_KEY::URL], QUrl(url).toLocalFile()))
{
data << FM::toMap(this->db->getDBData(QStringList() << url).first());
data << FM::toMap(this->db->getDBData(QStringList() << QUrl(url).toLocalFile()).first());
}else
{
if(info.feed(url))
if(info.feed(QUrl(url).toLocalFile()))
{
const auto album = BAE::fixString(info.getAlbum());
const auto track= info.getTrack();
const auto title = BAE::fixString(info.getTitle()); /* to fix*/
const auto artist = BAE::fixString(info.getArtist());
const auto genre = info.getGenre();
const auto sourceUrl = QFileInfo(url).dir().path();
const auto sourceUrl = QFileInfo(QUrl(url).toLocalFile()).dir().path();
const auto duration = info.getDuration();
const auto year = info.getYear();
data << QVariantMap({
{FMH::MODEL_NAME[FMH::MODEL_KEY::URL], url},
{FMH::MODEL_NAME[FMH::MODEL_KEY::URL], QUrl(url).toLocalFile()},
{FMH::MODEL_NAME[FMH::MODEL_KEY::TRACK], QString::number(track)},
{FMH::MODEL_NAME[FMH::MODEL_KEY::TITLE], title},
{FMH::MODEL_NAME[FMH::MODEL_KEY::ARTIST], artist},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment