Skip to content

Commit

Permalink
Merge pull request #29 from westsurname/dev
Browse files Browse the repository at this point in the history
Repair script fixes
  • Loading branch information
westsurname authored Jul 25, 2024
2 parents 6921e9e + 43f0a92 commit 2f3d33b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions repair.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def main():
print("Collecting media...")
sonarr = Sonarr()
radarr = Radarr()
sonarrMedia = [(sonarr, media) for media in sonarr.getAll() if args.mode == 'file' or media.anyMonitoredChildren]
sonarrMedia = [(sonarr, media) for media in sonarr.getAll() if args.include_unmonitored or media.anyMonitoredChildren]
radarrMedia = [(radarr, media) for media in radarr.getAll() if args.include_unmonitored or media.anyMonitoredChildren]
print("Finished collecting media.")

Expand Down Expand Up @@ -91,10 +91,10 @@ def main():
if args.dry_run or args.no_confirm or input("Do you want to delete and re-grab? (y/n): ").lower() == 'y':
if not args.dry_run:
discordUpdate(f"[{args.mode}] Repairing {media.title}: {childId}")
print("Deleting files:")
[print(item.path) for item in childItems]
if not args.dry_run:
results = arr.deleteFiles(childItems)
if args.mode == 'symlink':
print("Deleting files:")
[print(item.path) for item in childItems]
results = arr.deleteFiles(childItems)
print("Re-monitoring")
media = arr.get(media.id)
media.setChildMonitored(childId, False)
Expand Down

0 comments on commit 2f3d33b

Please sign in to comment.