2022-07-01 09:02:29 +00:00
|
|
|
# Fix uploads
|
|
|
|
|
|
|
|
Use the `fix_uploads` command to let Funkwhale sort out common issues with your audio files.
|
|
|
|
|
|
|
|
## Commands
|
|
|
|
|
|
|
|
### Fix mimetypes
|
|
|
|
|
|
|
|
Check and fix file mimetypes with the `--mimetype` flag. This helps prevent issues with serving music files.
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
::::{tab-set}
|
|
|
|
|
|
|
|
:::{tab-item} Debian
|
|
|
|
:sync: debian
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-10-26 20:19:16 +00:00
|
|
|
```{code-block} sh
|
2022-07-01 09:02:29 +00:00
|
|
|
poetry run python manage.py fix_uploads --mimetype
|
|
|
|
```
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::{tab-item} Docker
|
|
|
|
:sync: docker
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-10-26 20:19:16 +00:00
|
|
|
```{code-block} sh
|
2022-07-01 09:02:29 +00:00
|
|
|
docker-compose run --rm api python manage.py fix_uploads --mimetype
|
|
|
|
```
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::
|
|
|
|
::::
|
2022-07-01 09:02:29 +00:00
|
|
|
|
|
|
|
### Fix bitrate and duration
|
|
|
|
|
|
|
|
Check and fix bitrate and duration with the `--audio-data` flag. This process can take a long time as it needs to access all files.
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
::::{tab-set}
|
|
|
|
|
|
|
|
:::{tab-item} Debian
|
|
|
|
:sync: debian
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-10-26 20:19:16 +00:00
|
|
|
```{code-block} sh
|
2022-07-01 09:02:29 +00:00
|
|
|
poetry run python manage.py fix_uploads --audio-data
|
|
|
|
```
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::{tab-item} Docker
|
|
|
|
:sync: docker
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-10-26 20:19:16 +00:00
|
|
|
```{code-block} sh
|
2022-07-01 09:02:29 +00:00
|
|
|
docker-compose run --rm api python manage.py fix_uploads --audio-data
|
|
|
|
```
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::
|
|
|
|
::::
|
2022-07-01 09:02:29 +00:00
|
|
|
|
|
|
|
### Fix file size
|
|
|
|
|
|
|
|
Check and fix the file size with the `--size` flag.
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
::::{tab-set}
|
|
|
|
|
|
|
|
:::{tab-item} Debian
|
|
|
|
:sync: debian
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-10-26 20:19:16 +00:00
|
|
|
```{code-block} sh
|
2022-07-01 09:02:29 +00:00
|
|
|
poetry run python manage.py fix_uploads --size
|
|
|
|
```
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::{tab-item} Docker
|
|
|
|
:sync: docker
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-10-26 20:19:16 +00:00
|
|
|
```{code-block} sh
|
2022-07-01 09:02:29 +00:00
|
|
|
docker-compose run --rm api python manage.py fix_uploads --size
|
|
|
|
```
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::
|
|
|
|
::::
|
2022-07-01 09:02:29 +00:00
|
|
|
|
|
|
|
### Fix file checksums
|
|
|
|
|
|
|
|
Check and fix file checksums with the `--checksum` flag.
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
::::{tab-set}
|
|
|
|
|
|
|
|
:::{tab-item} Debian
|
|
|
|
:sync: debian
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-10-26 20:19:16 +00:00
|
|
|
```{code-block} sh
|
2022-07-01 09:02:29 +00:00
|
|
|
poetry run python manage.py fix_uploads --checksum
|
|
|
|
```
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::{tab-item} Docker
|
|
|
|
:sync: docker
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-10-26 20:19:16 +00:00
|
|
|
```{code-block} sh
|
2022-07-01 09:02:29 +00:00
|
|
|
docker-compose run --rm api python manage.py fix_uploads --checksum
|
|
|
|
```
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::
|
|
|
|
::::
|
2022-07-01 09:02:29 +00:00
|
|
|
|
|
|
|
### Change command batch size
|
|
|
|
|
|
|
|
Choose the batch size you want to process with the `--batch-size` or -`s` flag. Smaller batches process faster. Defaults to `1000`.
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
::::{tab-set}
|
|
|
|
|
|
|
|
:::{tab-item} Debian
|
|
|
|
:sync: debian
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-10-26 20:19:16 +00:00
|
|
|
```{code-block} sh
|
2022-07-01 09:02:29 +00:00
|
|
|
poetry run python manage.py fix_uploads --batch-size 500
|
|
|
|
```
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::{tab-item} Docker
|
|
|
|
:sync: docker
|
2022-07-01 09:02:29 +00:00
|
|
|
|
2022-10-26 20:19:16 +00:00
|
|
|
```{code-block} sh
|
2022-07-01 09:02:29 +00:00
|
|
|
docker-compose run --rm api python manage.py fix_uploads --batch-size 500
|
|
|
|
```
|
|
|
|
|
2022-07-23 13:32:35 +00:00
|
|
|
:::
|
|
|
|
::::
|