Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move config file to .config for a cleaner home directory #175

Merged
merged 3 commits into from
May 10, 2020

Conversation

Monirzadeh
Copy link
Contributor

No description provided.

@Monirzadeh
Copy link
Contributor Author

as i mention here #166

@dbr
Copy link
Owner

dbr commented Apr 26, 2020

Thanks for the PR!

I'm definitely in favour of using the ~/.config/ folder, but this needs a fallback to still load ~/.tvnamer.conf for backwards compatibility with existing configs.

The ~/.config/... one would take preference, and the presence of the old config should output a warning. I imagine the logic would be:

  1. Check for ~/.config/tvnamer/tvnamer.json - load this if present
  2. If not present, check for ~/.tvnamer.json - load this
  3. If ~/.tvnamer.json is present, output warning informing user of new location (this should happen regardless if ~/.config/... file exists to avoid confusion)

I'm happy to make these changes for the next release if you don't have time!

@Monirzadeh
Copy link
Contributor Author

Monirzadeh commented Apr 30, 2020

OK i will do that 👍
UPDATE: i finish that
user see warning in any condition if ~/.tvnamer.json exist.
do you need to show different massage in different condition or a simple massage is enough? please write that massage.

i prefer simple massage but if you need different massage it can be something like this:
1.if ~/.config/tvnamer/tvnamer.json and ~/.tvnamer.json exist >> please remove old ~/.tvnamer.json file
2. if only ~/.config/tvnamer/tvnamer.json exist >> don't show anything
3. if ~/.config/tvnamer/tvnamer.json not exist and ~/.tvnamer.json exist >> please move ~/.tvnamer.json to ~/.config/tvnamer/tvnamer.json

@dbr
Copy link
Owner

dbr commented May 10, 2020

Looks good to me! I think a single message if the old config file exists is fine - there's a minor typo in the message but easier for me to tweak that after merging.

Thanks! I think this is the last improvement I wanted to sort out before releasing v2.6, shall hopefully get to that in the next few days

@dbr dbr merged commit b014923 into dbr:master May 10, 2020
dbr added a commit that referenced this pull request May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants