gPodder Bug Tracker – Bug 1601
Only create download folders when needed
Last modified: 2014-05-17 10:13:27 BST
If I run gpo pending or gpo update gpodder should not create empty folders.
I have a huge list of subscriptons that update every couple months. ATM I have a script that deletes empty folders. Every time I run gpodder the folders are recreated.
Can we get an option to only ever create a new folder if there is a new download?
Sounds like a good idea. I'd rather make this the default instead of making it optional. Whenever the folder is required (either a download or the cover art image), it should be created.
The solution I suggest will not disrupt any of the existing logic or work flow.
The delete_empty_branches will be part of the util.py file. This will be a recursive function that parses the download folder tree and deletes empty branches. delete_empty_branches will be called at the end of every download cycle.
I already have a solution and I am just figuring out how to submit it.
I commit a patch. Hope it went well...
I created the function delete_empty_folders in utils.py and call it form function download in file gpo
(In reply to comment #4)
> I commit a patch. Hope it went well...
> I created the function delete_empty_folders in utils.py and call it form
> function download in file gpo
Did you just "git commit" the fix locally? If so, you will have to push it somewhere and ideally then open a pull request. Here are some helpful links:
3. Pull Request
I'm resetting the bug status, as it's not resolved/fixed until the code is actually in the github.com/gpodder/gpodder code repository :) Let me know if you have additional questions or need more help. Looking forward to your PR!
Reopening until the patch is merged.
Function is now calling os.walk instead of a recursive call.
I am now working on deletion of empty folders for the Gtk UI and QML UI.
Ricardo, do you have a patch submitted for this as I would like to try it out if possible! :)
Merged as http://gpodder.org/commit/142214d9