mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-30 03:46:29 -05:00
Reformatting files.
This commit is contained in:
parent
e64b44ba1d
commit
3751ed7999
15 changed files with 20 additions and 17 deletions
|
|
@ -20,6 +20,7 @@ import {
|
|||
BackButton,
|
||||
CardLink,
|
||||
defaultSearchOrder,
|
||||
epochToDateString,
|
||||
ExternalCardLink,
|
||||
FileIcon,
|
||||
HelpHeader,
|
||||
|
|
@ -29,7 +30,6 @@ import {
|
|||
SearchInput,
|
||||
TabLinks,
|
||||
textEllipsis,
|
||||
epochToDateString,
|
||||
useTitle
|
||||
} from "./Common";
|
||||
import {deleteArchives, postDownload} from "../api";
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import {
|
|||
TableRow,
|
||||
} from "semantic-ui-react";
|
||||
import {createChannel, deleteChannel, downloadChannel, refreshChannel, updateChannel, validateRegex} from "../api";
|
||||
import Container from "semantic-ui-react/dist/commonjs/elements/Container";
|
||||
import {
|
||||
BackButton,
|
||||
DirectoryInput,
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ function InventorySummary() {
|
|||
</TableRow>
|
||||
}
|
||||
|
||||
if (!isEmpty(bySubcategory )) {
|
||||
if (!isEmpty(bySubcategory)) {
|
||||
return <Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import {
|
|||
defaultSearchOrder,
|
||||
defaultVideoOrder,
|
||||
Duration,
|
||||
epochToDateString,
|
||||
FileIcon,
|
||||
isEmpty,
|
||||
mimetypeColor,
|
||||
|
|
@ -14,7 +15,6 @@ import {
|
|||
SearchInput,
|
||||
TabLinks,
|
||||
textEllipsis,
|
||||
epochToDateString,
|
||||
useTitle
|
||||
} from "./Common"
|
||||
import VideoPage from "./VideoPlayer";
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 8 KiB After Width: | Height: | Size: 8 KiB |
|
|
@ -5,10 +5,10 @@ from sanic.request import Request
|
|||
from sanic_ext import validate
|
||||
from sanic_ext.extensions.openapi import openapi
|
||||
|
||||
from modules.inventory import common, inventory, schema
|
||||
from wrolpi.common import run_after, recursive_map
|
||||
from wrolpi.errors import ValidationError
|
||||
from wrolpi.root_api import get_blueprint, json_response
|
||||
from modules.inventory import common, inventory, schema
|
||||
|
||||
NAME = 'inventory'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import asyncio
|
||||
from http import HTTPStatus
|
||||
from pathlib import Path
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ def video_modeler(groups: Dict[str, List[File]], session: Session):
|
|||
@register_after_refresh
|
||||
@limit_concurrent(1)
|
||||
def video_cleanup():
|
||||
# Claim all Videos in a Channel's directory for that Channel.
|
||||
# Claim all Videos in a Channel's directory for that Channel. But, only if they have not yet been claimed.
|
||||
logger.info('Claiming Videos for their Channels')
|
||||
with get_db_curs(commit=True) as curs:
|
||||
curs.execute('''
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from sanic_ext.extensions.openapi import openapi
|
|||
|
||||
from wrolpi.common import logger, wrol_mode_check, make_media_directory, \
|
||||
get_media_directory, run_after
|
||||
from wrolpi.errors import UnknownDirectory, UnknownChannel
|
||||
from wrolpi.errors import UnknownChannel
|
||||
from wrolpi.root_api import json_response
|
||||
from wrolpi.schema import JSONErrorResponse
|
||||
from wrolpi.vars import PYTEST
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import functools
|
||||
from pathlib import Path
|
||||
from typing import List, Dict, Union, Optional
|
||||
from typing import List, Dict, Union
|
||||
|
||||
from sqlalchemy.orm import Session
|
||||
from sqlalchemy.orm.exc import NoResultFound
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from datetime import timedelta
|
|||
from decimal import Decimal
|
||||
from functools import partial
|
||||
from pathlib import Path
|
||||
from typing import List, Set, Iterable, Optional, Tuple
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
import PIL
|
||||
from PIL import Image
|
||||
|
|
|
|||
|
|
@ -457,7 +457,7 @@ async def test_download_destination(test_session, test_directory, video_download
|
|||
video_download_manager.create_download('https://example.com/1', downloader=VideoDownloader.name)
|
||||
await video_download_manager.wait_for_all_downloads()
|
||||
# Output directory matches the channel directory.
|
||||
assert mock_video_prepare_filename.call_args_list[0].kwargs['ydl'].params['outtmpl']['default']\
|
||||
assert mock_video_prepare_filename.call_args_list[0].kwargs['ydl'].params['outtmpl']['default'] \
|
||||
.startswith(f'{test_directory}/videos/channel name/%(uploader)s')
|
||||
|
||||
mock_video_prepare_filename.reset_mock()
|
||||
|
|
@ -466,9 +466,10 @@ async def test_download_destination(test_session, test_directory, video_download
|
|||
video_download_manager.create_download('https://example.com/2', downloader=VideoDownloader.name, settings=settings)
|
||||
await video_download_manager.wait_for_all_downloads()
|
||||
# Output directory matches the custom directory specified.
|
||||
assert mock_video_prepare_filename.call_args_list[0].kwargs['ydl'].params['outtmpl']['default']\
|
||||
assert mock_video_prepare_filename.call_args_list[0].kwargs['ydl'].params['outtmpl']['default'] \
|
||||
.startswith(f'{test_directory}/custom/%(uploader)s')
|
||||
|
||||
|
||||
example_playlist_json = {
|
||||
'_type': 'playlist',
|
||||
'availability': None,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import json
|
||||
import pathlib
|
||||
import shutil
|
||||
|
||||
|
|
@ -10,11 +9,9 @@ from modules.videos.common import apply_info_json
|
|||
from modules.videos.lib import parse_video_file_name, validate_video, get_statistics
|
||||
from modules.videos.models import Video
|
||||
from modules.videos.video.lib import search_videos
|
||||
from wrolpi.dates import strptime
|
||||
from wrolpi.files import lib as files_lib
|
||||
from wrolpi.files.lib import refresh_files
|
||||
from wrolpi.files.models import File
|
||||
from wrolpi.test.common import skip_circleci
|
||||
from wrolpi.vars import PROJECT_DIR
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ __all__ = [
|
|||
'truncate_object_bytes',
|
||||
'background_task',
|
||||
'get_warn_once',
|
||||
'ordered_unique_list',
|
||||
]
|
||||
|
||||
# Base is used for all SQLAlchemy models.
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ async def cancel_refresh_tasks():
|
|||
|
||||
def cancelable_wrapper(func: callable):
|
||||
"""Wraps an async function so that it will be canceled by `cancel_refresh_tasks`."""
|
||||
|
||||
@wraps(func)
|
||||
async def wrapped(*args, **kwargs):
|
||||
if PYTEST:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue