Skip to content

Commit

Permalink
reverted formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
varthe committed Dec 22, 2024
1 parent 5080364 commit aa9849c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions blackhole.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ async def is_accessible(path, timeout=10):

discordError(f"Error processing {file.fileInfo.filenameWithoutExt}", e)


async def fail(torrent: TorrentBase, arr: Arr):
_print = globals()['print']

Expand All @@ -335,9 +334,7 @@ def print(*values: object):

torrentHash = torrent.getHash()
history = await asyncio.to_thread(arr.getHistory, blackhole['historyPageSize'])
items = [item for item in history if
(item.torrentInfoHash and item.torrentInfoHash.casefold() == torrentHash.casefold()) or cleanFileName(
item.sourceTitle.casefold()) == torrent.file.fileInfo.filenameWithoutExt.casefold()]
items = [item for item in history if(item.torrentInfoHash and item.torrentInfoHash.casefold() == torrentHash.casefold()) or cleanFileName(item.sourceTitle.casefold()) == torrent.file.fileInfo.filenameWithoutExt.casefold()]
if not items:
message = "No history items found to mark as failed. Arr will not attempt to grab an alternative."
print(message)
Expand All @@ -348,14 +345,11 @@ def print(*values: object):
await asyncio.gather(*failTasks)
print(f"Failed")


def getFiles(isRadarr):
print('getFiles')
files = (TorrentFileInfo(filename, isRadarr) for filename in os.listdir(getPath(isRadarr)) if
filename not in ['processing', 'completed'])
files = (TorrentFileInfo(filename, isRadarr) for filename in os.listdir(getPath(isRadarr)) if filename not in ['processing', 'completed'])
return [file for file in files if file.torrentInfo.isTorrentOrMagnet]


async def on_created(isRadarr):
print("Enter 'on_created'")
try:
Expand Down

0 comments on commit aa9849c

Please sign in to comment.