Check if a download is marked as complete in its breadcrumb. Args: breadcrumb_path: Path to the breadcrumb file Returns: True if download is complete, False otherwise
(breadcrumb_path: Path)
| 95 | |
| 96 | |
| 97 | def is_download_complete(breadcrumb_path: Path) -> bool: |
| 98 | """ |
| 99 | Check if a download is marked as complete in its breadcrumb. |
| 100 | |
| 101 | Args: |
| 102 | breadcrumb_path: Path to the breadcrumb file |
| 103 | |
| 104 | Returns: |
| 105 | True if download is complete, False otherwise |
| 106 | """ |
| 107 | data = read_breadcrumb(breadcrumb_path) |
| 108 | if data is None: |
| 109 | return False |
| 110 | |
| 111 | status = data.get("status", "") |
| 112 | return status == "complete" |
| 113 | |
| 114 | |
| 115 | def create_download_breadcrumb( |
no test coverage detected