merge master

This commit is contained in:
Simon 2024-04-20 00:43:23 +02:00
commit 689e05ca47
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
3 changed files with 12 additions and 6 deletions

View File

@ -7,12 +7,12 @@ ENV PATH=/root/.local/bin:$PATH
RUN if [ "$INSTALL_DEBUG" ] ; then \
apt-get -y update && apt-get -y install --no-install-recommends \
vim htop bmon net-tools iputils-ping procps curl \
&& pip install --user ipython \
&& pip install ipython \
; fi
# install requirements
COPY ./requirements.txt /requirements.txt
RUN pip install --user -r requirements.txt
RUN pip install -r requirements.txt
COPY app /app
WORKDIR app

View File

@ -61,7 +61,7 @@ Mount the `/youtube` folder from Tube Archivist also in this container at `/yout
### Manual trigger
For an initial import or for other irregular occasions, trigger the library scan from outside the container, e.g.:
```bash
docker exec -it tubearchivist-jf python main.py
docker exec tubearchivist-jf python main.py
```
### Auto trigger

View File

@ -47,7 +47,9 @@ class Library:
def _get_all_series(self) -> dict:
"""get all shows indexed in jf"""
path: str = f"Items?Recursive=true&IncludeItemTypes=Series&fields=ParentId,Path&ParentId={self.yt_collection}" # noqa: E501
path: str = (
f"Items?Recursive=true&IncludeItemTypes=Series&fields=ParentId,Path&ParentId={self.yt_collection}" # noqa: E501
)
all_shows: dict = Jellyfin().get(path)
return all_shows
@ -71,7 +73,9 @@ class Library:
def refresh_collection(self, collection_id: str) -> None:
"""trigger collection refresh"""
path: str = f"Items/{collection_id}/Refresh?Recursive=true&ImageRefreshMode=Default&MetadataRefreshMode=Default" # noqa: E501
path: str = (
f"Items/{collection_id}/Refresh?Recursive=true&ImageRefreshMode=Default&MetadataRefreshMode=Default" # noqa: E501
)
Jellyfin().post(path, False)
while True:
@ -208,7 +212,9 @@ class Show:
def _wait_for_season(self, expected_season: str) -> None:
"""wait for season to be created in JF"""
jf_id: str = self.show["Id"]
path: str = f"Items/{jf_id}/Refresh?Recursive=true&ImageRefreshMode=Default&MetadataRefreshMode=Default" # noqa: E501
path: str = (
f"Items/{jf_id}/Refresh?Recursive=true&ImageRefreshMode=Default&MetadataRefreshMode=Default" # noqa: E501
)
print(f"[setup] {path=}")
Jellyfin().post(path, False)
while True: