notsatan / kodi-strm

A python script to batch generate strm files to be able to stream videos in Kodi directly from Google Drive.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ask for confirmation before wiping out directory-tree

notsatan opened this issue · comments

Is your feature request related to a problem? Please describe
If the output directory already exists, the script will currently wipe out the existing directory to proceed with its working

Describe the solution you'd like
The script should ask for confirmation before wiping out entire directory trees - with the current implementation, there is a chance of irreversibly losing important files with a small mistake

Describe alternatives you've considered
N/A

Can introduce an additional flag --force and -f to allow remote/unsupervised execution - the presence of this flag will directly remove any existing directory tree (same as the current implementation).

Without this flag, users will be asked for manual confirmation before any deletions

This will be a breaking change.

Existing installations of kodi-strm that do not account for this change will need to be tweaked - for unsupervised executions, users will either have to account for manual confirmation or modify their setup to include the --force flag for uninterrupted execution.

Sidenote: Will merge to with the ongoing refactor branch (as opposed to directly merging into master). The refactor branch contains another breaking change (checkout a040e2a for more info) - will bundle these breaking changes together and then merge to master.