Use XDG location scheme

Registered by Severin H

Currently LottaNZB's default download directory is set to ~/Downloads, but the XDG Base Directory Specification already specifies that the default download directory (which is likely to be localized) can be determined using the XDG_DOWNLOAD_DIR variable that is part of ~/.config/user-dirs.dirs. Additionally, configuration data should go to ~/.config/lottanzb instead of ~/.lottanzb. It would also be possible to use XDG_DATA_HOME (~/.local/share in general) for the HellaNZB directory containing NZB and temp files

I guess it's better to adhere to this standards late than never. We will not change the download directory for existing LottaNZB users but the configuration directory should be moved to the new location if it doesn't already exist there.

There are Python bindings called python-xdg that provide a convenient way of determining these directories. We don't really need to add this package as a dependency, since we only need one of it's module, which is fortunately very small and can easily be bundled with LottaNZB.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Low
Drafter:
Severin H
Direction:
Needs approval
Assignee:
Severin H
Definition:
Discussion
Series goal:
Accepted for 0.5
Implementation:
Implemented
Milestone target:
milestone icon 0.5
Started by
Severin H
Completed by
Severin H

Whiteboard

Implementing this blueprint will also fix bug #341069, because if LottaNZB 0.5 moves the configuration from ~/.lottanzb to ~/.config/lottanzb, instances of LottaNZB 0.4 launched at a later point of time will never need to load LottaNZB 0.5 configuration data.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.