mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-20 06:56:18 -05:00
Download not in the config are deleted on import.
This commit is contained in:
parent
e7582944b9
commit
41b431eb34
3 changed files with 4 additions and 4 deletions
|
|
@ -1156,6 +1156,9 @@ async def import_downloads_config(session: Session):
|
|||
existing.status = download['status']
|
||||
existing.sub_downloader = download['sub_downloader']
|
||||
existing.settings = download.get('settings') or dict()
|
||||
else:
|
||||
logger.warning(f'Deleting Download {existing.url} because it is no longer in the config')
|
||||
session.delete(existing)
|
||||
|
||||
for download in downloads_by_url.values():
|
||||
# These downloads are new, import them.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import asyncio
|
|||
import datetime
|
||||
import functools
|
||||
import glob
|
||||
import itertools
|
||||
import json
|
||||
import multiprocessing
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
import os
|
||||
import pathlib
|
||||
import tempfile
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from functools import partialmethod
|
||||
from http import HTTPStatus
|
||||
from itertools import zip_longest
|
||||
from typing import List
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from wrolpi.common import set_test_media_directory, get_media_directory
|
||||
from wrolpi.common import get_media_directory
|
||||
from wrolpi.conftest import ROUTES_ATTACHED, test_db, test_client # noqa
|
||||
from wrolpi.db import postgres_engine
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue