{"id":16193930,"url":"https://github.com/g4brym/download-manager","last_synced_at":"2025-03-19T04:30:45.199Z","repository":{"id":47271084,"uuid":"278196893","full_name":"G4brym/download-manager","owner":"G4brym","description":"Simple download manager with API interface","archived":false,"fork":false,"pushed_at":"2023-04-25T11:01:49.000Z","size":3337,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-17T03:34:25.346Z","etag":null,"topics":["docker","download","download-file","download-manager","downloader","downloadmanager","fastapi","jdownloader","jdownloader-2","linuxserver","pyload"],"latest_commit_sha":null,"homepage":"https://download-manager.massadas.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/G4brym.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-08T21:21:21.000Z","updated_at":"2025-02-14T07:43:09.000Z","dependencies_parsed_at":"2024-10-27T20:22:36.673Z","dependency_job_id":null,"html_url":"https://github.com/G4brym/download-manager","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G4brym%2Fdownload-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G4brym%2Fdownload-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G4brym%2Fdownload-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G4brym%2Fdownload-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/G4brym","download_url":"https://codeload.github.com/G4brym/download-manager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244357396,"owners_count":20440319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","download","download-file","download-manager","downloader","downloadmanager","fastapi","jdownloader","jdownloader-2","linuxserver","pyload"],"created_at":"2024-10-10T08:17:04.757Z","updated_at":"2025-03-19T04:30:45.194Z","avatar_url":"https://github.com/G4brym.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Download Manager\n\n## 1. Project Information's\nThis project is a file downloader and scheduler, just like [pyload](https://github.com/pyload/pyload), but it was build from\nthe start to be docker native and to have an api interface to schedule downloads automatically.\n\nThis project is using the [FastAPI](https://github.com/tiangolo/fastapi) framework, which automatically builds a swagger\ndocumentation based on the api endpoints. This brings to this project a simple web interface that\nalso allows you to schedule downloads from your browser without having to make an api request using postman.\n\nYou can see an example of the [swagger documentation here](https://g4brym.github.io/download-manager/).\n\n\n## 2. Features\n- Automatically download files to the local file system\n- Portable (using docker)\n- File download authentication using custom headers\n- Schedule files using the Swagger interface\n- Schedule files using the API\n- Easy file identification (due to the custom hash function as primary key, see below)\n- Automatically retry downloads (5 times by default, but can be edited in env vars)\n- Manually retry files after all the automatically retries have failed\n- Edit file download url or headers after you have scheduled it for download\n- API authentication\n\n\n### 2.1 File identification\nThis project doesn't use the typical incremental id for file identification because that would mean that the system\nthat is communicating with this api has to save that, in order to be able to check file status afterward.\n\nInstead of that, we decided to use an MD5 hash of the file path + filename, this makes it much easier to\nretry a download or check if it is already done without having to search by name or save the id of the download.\nFor reference everytime, you schedule a download the response will always have the file hash in case you want to save it\nor compare it with your local hash.\n\nThis is also a good measure because it makes sure that we don't ever download the same file twice, because if you try to\nschedule a new download using the same path and name, this project will only update the download url and headers of the\nprevious schedule.\n\n### 2.2 File path's\nBecause this run's inside a docker container, when scheduling a new download, you should always use relative paths.\nThen when saving the file we will append that to the downloads volume.\n\n\n## 3. Usage\nHere are some example snippets to help you get started creating a container.\n\n### docker\n\n```\ndocker create \\\n  --name=manager \\\n  --net=host \\\n  -e PUID=1000 \\\n  -e PGID=1000 \\\n  -e API_KEY=some_random_key \\\n  -v /path/to/config:/config \\\n  -v /path/to/downloads:/downloads \\\n  --restart unless-stopped \\\n  ghcr.io/g4brym/download-manager/download-manager\n```\n\n\n### docker-compose\n\nCompatible with docker-compose v2 schemas.\n\n```\nversion: \"2.1\"\nservices:\n  manager:\n    image: ghcr.io/g4brym/download-manager/download-manager\n    container_name: manager\n    network_mode: host\n    environment:\n      - PUID=1000\n      - PGID=1000\n      - API_KEY=some_random_key\n    volumes:\n      - /path/to/config:/config\n      - /path/to/downloads:/downloads\n    restart: unless-stopped\n```\n\n\n## 4. Parameters\nContainer images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `\u003cexternal\u003e:\u003cinternal\u003e` respectively. For example, `-p 8000:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8000` outside the container.\n\n| Parameter | Function |\n| :----: | --- |\n| `--net=host` | Use Host Networking |\n| `-e PUID=1000` | for UserID - see below for explanation |\n| `-e PGID=1000` | for GroupID - see below for explanation |\n| `-e API_KEY=some_random_key` | Api key to interact with the server |\n| `-e MAX_RETRIES=5` | This is the number of retries the project will try to automatically download a file |\n| `-v /config` | Contains all configuration and generated files for the application to run, including the sqlite db |\n| `-v /downloads` | Where your completed downloads should go |\n\n\n## 5. User / Group Identifiers\n\nWhen using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue\nby allowing you to specify the user `PUID` and group `PGID`.\n\nEnsure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish\nlike magic.\n\nIn this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:\n\n```\n  $ id username\n    uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)\n```\n\n\n## 6. API Documentation / Swagger UI\nAPI Documentation is available in the OpenAPI format with Swagger UI\n[Here](https://g4brym.github.io/download-manager/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg4brym%2Fdownload-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg4brym%2Fdownload-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg4brym%2Fdownload-manager/lists"}