reluce / szurubooru-toolkit

Python package and script collection to manage your szurubooru image board.
GNU General Public License v3.0
43 stars 14 forks source link

Can't delete video posts #28

Closed Telkhine closed 2 years ago

Telkhine commented 2 years ago

I'm unable to use the delete-posts tool to delete video posts. In szurubooru.py, in the get_posts method, which delete-posts uses, videos are excluded from the results: https://github.com/reluce/szurubooru-toolkit/blob/5d94b77f62dada424745b2b3caa12035f2de2925/src/szurubooru_toolkit/szurubooru.py#L61-L65

Is there a reason videos are explicitly excluded? Could we have an option to include them?

Thanks

Telkhine commented 2 years ago

Looking at an old commit https://github.com/reluce/szurubooru-toolkit/commit/0f14b1f7b5c97c5aa3b2ab4b0df8b95e82e0b8bb, it appears this method was only meant for tagging posts at the time? delete-posts.py didn't exist yet.

reluce commented 2 years ago

Yes, excluding videos was only meant for the auto tagger, as SauceNao doesn't support video files. I've removed that limitation for the scripts reset-posts, delete-posts and tag-posts.

Can you go ahead and test if it works for you? (The fix is only available on the GitHub repo for now)

Telkhine commented 2 years ago

Thanks for the assist. This looks to be in working order. 🍻