Commit 783d8169 authored by Alexandru Pandelea's avatar Alexandru Pandelea

batch-rename-utilities: check if file has nie:url

If there is a file indexed by tracker that doesn't have nie:url, then
the query will fail everytime, because it will pass null to
uri-is-parent which will then give an error.

To fix this, in the query, check first that the file has nie:url.
parent 73ac9eeb
......@@ -1056,13 +1056,13 @@ check_metadata_for_selection (NautilusBatchRenameDialog *dialog,
"nmm:artistName(nmm:performer(?file)) "
"nie:title(?file) "
"nmm:albumTitle(nmm:musicAlbum(?file)) "
"WHERE { ?file a nfo:FileDataObject. ");
"WHERE { ?file a nfo:FileDataObject. ?file nie:url ?url. ");
parent_uri = nautilus_file_get_parent_uri (NAUTILUS_FILE (selection->data));
parent_uri_escaped = g_markup_escape_text (parent_uri, -1);
g_string_append_printf (query,
"FILTER(tracker:uri-is-parent('%s', nie:url(?file))) ",
"FILTER(tracker:uri-is-parent('%s', ?url)) ",
for (l = selection; l != NULL; l = l->next)
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