Deleting an image does not always add it to banned.txt so it reappears later

Bug #1413392 reported by Mendhak
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Variety
Confirmed
Medium
Unassigned

Bug Description

When deleting an image, it does not always get added to banned.txt, so it reappears again later.

In variety.log, I see that it is deleted:

--------------------------------------------------------------------------

INFO: 2015-01-21 21:51:07,725: _go() 'Running trash command gvfs-trash "/home/mendhak/.config/variety/Downloaded/flickr_user_www_flickr_com_photos_mendhak__user_id_69135870_N00_/7674041626_c1798c514b_o.gif" || trash-put "/home/mendhak/.config/variety/Downloaded/flickr_user_www_flickr_com_photos_mendhak__user_id_69135870_N00_/7674041626_c1798c514b_o.gif" || kfmclient move "/home/mendhak/.config/variety/Downloaded/flickr_user_www_flickr_com_photos_mendhak__user_id_69135870_N00_/7674041626_c1798c514b_o.gif" trash:/'

--------------------------------------------------------------------------

But this did not appear in banned.txt

This isn't always the case, sometimes the banned.txt file does get updated. This is what variety.log looks like then

--------------------------------------------------------------------------

INFO: 2015-01-21 21:49:28,854: _do_report_file() 'smart: Reporting /home/mendhak/.config/variety/Downloaded/flickr_user_www_flickr_com_photos_mendhak__user_id_69135870_N00_/7720390850_4ee46bedc4_o.jpg as 'trash''
INFO: 2015-01-21 21:49:30,355: _do_report_file() 'smart: Reported, server returned: {
    "ok": true
}'
INFO: 2015-01-21 21:49:30,355: _go() 'Running trash command gvfs-trash "/home/mendhak/.config/variety/Downloaded/flickr_user_www_flickr_com_photos_mendhak__user_id_69135870_N00_/7720390850_4ee46bedc4_o.jpg" || trash-put "/home/mendhak/.config/variety/Downloaded/flickr_user_www_flickr_com_photos_mendhak__user_id_69135870_N00_/7720390850_4ee46bedc4_o.jpg" || kfmclient move "/home/mendhak/.config/variety/Downloaded/flickr_user_www_flickr_com_photos_mendhak__user_id_69135870_N00_/7720390850_4ee46bedc4_o.jpg" trash:/'
INFO: 2015-01-21 21:50:03,949: set_wallpaper() 'Calling set_wallpaper with /home/mendhak/.config/variety/Downloaded/flickr_user_www_flickr_com_photos_mendhak__user_id_69135870_N00_/6193319672_0e036ac8cc_o.jpg'

--------------------------------------------------------------------------

At the moment, my banned.txt file has 703 lines in it.

I am using Flickr as a source [user=http://www.flickr.com/photos/mendhak/]

Revision history for this message
Mendhak (mendhak) wrote :
description: updated
Revision history for this message
Anton (r-anton) wrote :

I confirm. It happens to concretely with concretely images, eg, file coyote_on_the_run_by_sequential-d9kzw8j.jpg have this problem, but file 20151008_ottercondor_1906_by_deeotter-d9zsga9.jpg not have this problem. This is 2 files in 1 folder, from 1 source, but coyote_on_the_run_by_sequential-d9kzw8j.jpg not added to banned.txt after 2-3-5-10 and more downloads.

my source rss-media http://backend.deviantart.com/rss.xml?q=boost:popular+in:photography/nature/wild+max_age:24h&type=deviation

Also, file coyote_on_the_run_by_sequential-d9kzw8j.jpg not added to trash in online-profile on vrty.org, but file 20151008_ottercondor_1906_by_deeotter-d9zsga9.jpg added to trash in online profile.

I attach this files.

Revision history for this message
Anton (r-anton) wrote :

This file not added to banned.txt

Anton (r-anton)
Changed in variety:
status: New → Confirmed
Revision history for this message
Anton (r-anton) wrote :

images who a not added in banned.txt not have links to online-source in context menu, they have link to local image only. may be they images not added in banned.txt because variety not can get URL to online-source for some image.

James Lu (jlu5)
Changed in variety:
importance: Undecided → Medium
Revision history for this message
Peter Levi (peterlevi) wrote :

banned.txt contains URLs to images that should not be downloaded again.

The logic for adding to banned.txt is this - if an image is trashed via Variety's "Move to Trash" feature, AND if it contains a "downloaded-from" URL in its metadata, it will be added to banned.txt.

The logic for preventing downloading the same images is simple: We do not download from the same URL if it's in banned.txt. Nothing prevents Variety from downloading the same image from another source, or just downloading an equivalently-looking image from the same source (there are duplicates on all of them).

"file 2" from the attachments above does not contain metadata, so there is no URL to add to banned.txt. It probably was not downloaded by Variety. If you are moving it to Trash and then seeing it again, it might be that "Move to Trash" is not working OK for you - there were issues with it on some systems (there's another bug reported for this). Try trashing an image it and checking immediately if it was really trashed.

The screenshot shows a downloaded file that does not seem to contain downloaded-from metadata. I don't know how this happened, but it cannot be added to banned.txt without the metadata.

The issue with /home/mendhak/.config/variety/Downloaded/flickr_user_www_flickr_com_photos_mendhak__user_id_69135870_N00_/7674041626_c1798c514b_o.gif could be related to the fact that it is a gif file, so we cannot write the metadata directly inside the file - it's possible that the logic that fallbacks to keeping the metadata in an external "imagename.metadata.json" along with the image in such cases does not work properly for some reason (though the code looks fine). It's worth testing whether this behavior happens systematically specifically for gif files.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.