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

Update import_torrent_folder.py #13

Closed
wants to merge 1 commit into from

Conversation

Pukabyte
Copy link
Contributor

@Pukabyte Pukabyte commented Jun 19, 2024

  1. Enhanced get_completed_parent_directory Function:
  • Added new parameters for use_radarr4k, use_radarranime, use_sonarr4k, and use_sonarranime. Expanded the function to return paths for these new parameters.
  1. Command-Line Argument Updates:
  • Added new command-line options: --radarr4k, --radarranime, --sonarr4k, and --sonarranime.
  • Maintained existing functionality for --directory, --radarr, --sonarr, --symlink-directory, and other options.
  1. Interactive Selection Prompts:
  • Updated the interactive prompt to include choices for Radarr4K, RadarrAnime, Sonarr4K, and SonarrAnime.
  • Enhanced user input handling to support new options and validate selections.
  1. Looping Mechanism:
  • Wrapped the main logic in a while True loop for continuous input and processing without user intervention to restart.
  1. Dual-Mode Operation:
  • Implemented logic to support both single execution with command-line arguments and interactive continuous processing mode.
  • If command-line arguments are provided, the script processes them once and exits.
  • If no arguments are provided, the script enters an interactive loop for continuous processing.
  1. Status Messages and Flow:
  • Simplified status messages to focus on high-level actions (e.g., "Symlinks sent to [system] for [directory]").
  1. Retry Logic for Directory Search:
  • Maintained the retry mechanism to search for the directory for up to 60 seconds with a status update every second.
  1. Script Modularization:
  • Encapsulated the main logic into a main() function for cleaner structure and better readability.
  • Separated the command-line argument processing and interactive loop logic for clarity.

These changes enhance the script's functionality, allowing it to handle more specific content types and operate seamlessly in both command-line and interactive modes.

1. Enhanced get_completed_parent_directory Function:

  - Added new parameters for use_radarr4k, use_radarranime, use_sonarr4k, and use_sonarranime.
Expanded the function to return paths for these new parameters.

2. Command-Line Argument Updates:

  - Added new command-line options: --radarr4k, --radarranime, --sonarr4k, and --sonarranime.
  - Maintained existing functionality for --directory, --radarr, --sonarr, --symlink-directory, and other options.

3. Interactive Selection Prompts:

  - Updated the interactive prompt to include choices for Radarr4K, RadarrAnime, Sonarr4K, and SonarrAnime.
  - Enhanced user input handling to support new options and validate selections.

4. Looping Mechanism:

  - Wrapped the main logic in a while True loop for continuous input and processing without user intervention to restart.
  - Removed the end-of-process prompt asking if the user wants to process another directory.

5. Dual-Mode Operation:

  - Implemented logic to support both single execution with command-line arguments and interactive continuous processing mode.
  - If command-line arguments are provided, the script processes them once and exits.
  - If no arguments are provided, the script enters an interactive loop for continuous processing.

6. Status Messages and Flow:

  - Added print statements to indicate the start and restart of the script.
  - Simplified status messages to focus on high-level actions (e.g., "Symlinks sent to [system] for [directory]").

7. Retry Logic for Directory Search:

  - Maintained the retry mechanism to search for the directory for up to 60 seconds with a status update every second.

8. Script Modularization:

  - Encapsulated the main logic into a main() function for cleaner structure and better readability.
  - Separated the command-line argument processing and interactive loop logic for clarity.

These changes enhance the script's functionality, allowing it to handle more specific content types and operate seamlessly in both command-line and interactive modes.
@Pukabyte Pukabyte closed this Jun 25, 2024
@Pukabyte Pukabyte deleted the patch-1 branch June 25, 2024 13:12
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.

1 participant