Error
$ python3 cdvr_find_orphaned_recordings.py
Using Channels DVR at: http://127.0.0.1:8089
Fetching recording paths from the server...
-> Retrieved 319 recording paths from the server.
Fetching storage paths from the server...
Traceback (most recent call last):
File "/home/channels/src/cdvr-find-orphaned-recordings/cdvr_find_orphaned_recordings.py", line 119, in <module>
main()
File "/home/channels/src/cdvr-find-orphaned-recordings/cdvr_find_orphaned_recordings.py", line 103, in main
storage_paths = get_storage_paths(dvr_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/channels/src/cdvr-find-orphaned-recordings/cdvr_find_orphaned_recordings.py", line 37, in get_storage_paths
paths.extend(json_data.get("extra_paths"))
TypeError: 'NoneType' object is not iterable
$ git diff
diff --git a/cdvr_find_orphaned_recordings.py b/cdvr_find_orphaned_recordings.py
index c2bc4c1..f89ab41 100644
--- a/cdvr_find_orphaned_recordings.py
+++ b/cdvr_find_orphaned_recordings.py
@@ -34,7 +34,7 @@ def get_storage_paths(dvr_url):
json_data = response.json()
paths.append(json_data.get("path"))
- paths.extend(json_data.get("extra_paths"))
+ paths.extend(json_data.get("extra_paths") or [])
except requests.RequestException as e:
print(f"Error fetching recording paths: {e}")
Found 1 orphaned recordings:
-> /mnt/sda1/Channels/recordings/Movies/Takers (2010) 2026-01-28-2000.mpg
My iSCSI drive needed to be remounted but CDVR, after an unsuccessful deletion, forgot about the file.
channels-dvr-2026-02-06.log:2026/02/07 19:40:31.100332 [ERR] Missing file to delete #44863 /mnt/sda1/Channels/recordings/Movies/Takers (2010) 2026-01-28-2000.mpg: stat /mnt/sda1/Channels/recordings/Movies/Takers (2010) 2026-01-28-2000.mpg: input/output error