mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Cleaning up code.
This commit is contained in:
parent
dc4ce0bda1
commit
f6bdf3a3ec
2 changed files with 4 additions and 4 deletions
|
|
@ -1,7 +1,6 @@
|
|||
#! /usr/bin/env python3
|
||||
import glob
|
||||
import hashlib
|
||||
import json
|
||||
import logging
|
||||
import pathlib
|
||||
import re
|
||||
|
|
@ -166,7 +165,8 @@ def replace_extension(path: pathlib.Path, new_ext) -> pathlib.Path:
|
|||
return path
|
||||
|
||||
|
||||
def find_meta_files(path: pathlib.Path, relative_to=None) -> Tuple[pathlib.Path, pathlib.Path, pathlib.Path, pathlib.Path]:
|
||||
def find_meta_files(path: pathlib.Path, relative_to=None) -> Tuple[
|
||||
pathlib.Path, pathlib.Path, pathlib.Path, pathlib.Path]:
|
||||
"""Find all files that share a file's full path, except their extensions. It is assumed that file with the
|
||||
same name, but different extension is related to that file.
|
||||
|
||||
|
|
|
|||
|
|
@ -177,8 +177,8 @@ class TestAPI(unittest.TestCase):
|
|||
# Final channel video list we built
|
||||
expected = {
|
||||
('subdir/' + vid1.name, 'subdir/' + poster1.name, None), # in a subdirectory, no description
|
||||
(vid2.name, poster2.name, None), # no description
|
||||
(vid3.name, None, description3.name), # no poster
|
||||
(vid2.name, poster2.name, None), # no description
|
||||
(vid3.name, None, description3.name), # no poster
|
||||
}
|
||||
self.assertEqual(
|
||||
{(i['video_path'], i['poster_path'], i['description_path']) for i in channel['videos']},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue