Commit 22e6dadd authored by Urs Fleisch's avatar Urs Fleisch
Browse files

new D-Bus command downloadAlbumArt()

parent 35468420
......@@ -19,6 +19,10 @@
<arg name="path" type="s" direction="in"/>
<arg name="fmtIdx" type="i" direction="in"/>
</method>
<method name="downloadAlbumArt">
<arg name="url" type="s" direction="in"/>
<arg name="allFilesInDir" type="b" direction="in"/>
</method>
<method name="exportToFile">
<arg type="b" direction="out"/>
<arg name="tagMask" type="i" direction="in"/>
......@@ -63,6 +67,10 @@
<method name="filter">
<arg name="expression" type="s" direction="in"/>
</method>
<method name="convertToId3v24">
</method>
<method name="convertToId3v23">
</method>
<method name="getDirectoryName">
<arg type="s" direction="out"/>
</method>
......
......@@ -116,6 +116,17 @@ bool ScriptInterface::importFromFile(int tagMask, const QString& path, int fmtId
return m_app->importTags(tagMask, path, fmtIdx);
}
/**
* Download album cover art into the picture frame of the selected files.
*
* @param url URL of picture file or album art resource
* @param allFilesInDir true to add the image to all files in the directory
*/
void ScriptInterface::downloadAlbumArt(const QString& url, bool allFilesInDir)
{
m_app->downloadImage(url, allFilesInDir);
}
/**
* Export tags to a file.
*
......@@ -634,6 +645,7 @@ bool ScriptInterface::save() { return false; }
QString ScriptInterface::getErrorMessage() const { return ""; }
void ScriptInterface::revert() {}
bool ScriptInterface::importFromFile(int, const QString&, int) { return false; }
void ScriptInterface::downloadAlbumArt(const QString&, bool) {}
bool ScriptInterface::exportToFile(int, const QString&, int) { return false; }
bool ScriptInterface::createPlaylist() { return false; }
void ScriptInterface::quit() {}
......
......@@ -102,6 +102,14 @@ public slots:
*/
bool importFromFile(int tagMask, const QString& path, int fmtIdx);
/**
* Download album cover art into the picture frame of the selected files.
*
* @param url URL of picture file or album art resource
* @param allFilesInDir true to add the image to all files in the directory
*/
void downloadAlbumArt(const QString& url, bool allFilesInDir);
/**
* Export tags to a file.
*
......
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