Skip to content
Snippets Groups Projects
Commit 20f46af5 authored by Canek Peláez Valdés's avatar Canek Peláez Valdés :slight_smile:
Browse files

Clear tag before setting it.

parent ea636fc4
Branches
No related tags found
No related merge requests found
......@@ -173,17 +173,14 @@ namespace GQPE {
* @throws GLib.Error if there is an error while loading.
*/
public void save_metadata() throws GLib.Error {
if (album == "")
metadata.clear_tag(Tag.SUBJECT);
else
if (album != "")
metadata.set_tag_string(Tag.SUBJECT, album);
if (caption == "")
metadata.clear_tag(Tag.CAPTION);
else
if (caption != "")
metadata.set_tag_string(Tag.CAPTION, caption);
if (comment != "")
metadata.clear_tag(Tag.DESCRIPTION);
else
if (comment != "")
metadata.set_tag_string(Tag.DESCRIPTION, comment);
metadata.set_tag_long(Tag.ORIENTATION, orientation);
metadata.save_file(file.get_path());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment