linuxmint / hypnotix

An M3U IPTV Player
1.26k stars 169 forks source link

Use XDG Base Directory Specifications #201

Closed joshas closed 2 years ago

joshas commented 2 years ago

Currently Hypnotix creates directory with providers list directly in $HOME directory. Please move it to correct location according to XDG Base Directory Specifications: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
I think $XDG_CACHE_HOME ($HOME/.cache) should be used, as provider data is updated and not necessary to be backed up.

Axel-Erfurt commented 2 years ago

Have you ever looked in your $HOME folder? Most programs store their data there. The .cache folder will only be emptied if you do it yourself. Provider data is updated for URL providers, not for local files.

joshas commented 2 years ago

Have you ever looked in your $HOME folder? Most programs store their data there.

Yes, that's the point. Historically most programs stored their configuration directly in $HOME directory. But that made backing up critical data harder, because usually temporary files and configuration data ended up in same directory and took more space. Creating backup rules, that selects only important configuration files was a chore. Now, when programs follow XDG specification by storing config and runtime/cache data in separate folders, user ideally would add only $HOME/.config directory to backup. Also, reducing clutter in $HOME directory is just nicer for users who have hidden files turned on in file manager.
I understand, that there might be reasons when such change is impossible (e.g. third party dependencies, migration issues), so adhering to XDG Specifications is just a nice-to-have feature.