Compare commits
9 Commits
0c54d97e65
...
e83720290f
Author | SHA1 | Date |
---|---|---|
Simon | e83720290f | |
Simon | 74a4eb263a | |
Simon | 689e05ca47 | |
Simon | 3e0e13e18e | |
Simon | 6d7af2698e | |
Simon | 6978ca450d | |
Simon | 965d21cbb2 | |
Jayden | d71d26a4f1 | |
rockerbacon | e365f73018 |
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,10 +212,12 @@ 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:
|
||||
for _ in range(24):
|
||||
all_existing: set[str] = set(self._get_existing_seasons())
|
||||
|
||||
print(f"[setup] seasons: {all_existing} {expected_season=}")
|
||||
|
@ -230,14 +236,8 @@ class Show:
|
|||
path: str = f"Shows/{series_id}/Seasons"
|
||||
all_seasons: dict = Jellyfin().get(path)
|
||||
|
||||
# print(f"[setup] {path=} all_seasons_items={all_seasons['Items']}")
|
||||
|
||||
return [str(i.get("IndexNumber")) for i in all_seasons["Items"]]
|
||||
|
||||
# res = [str(i.get("Name")) for i in all_seasons["Items"]]
|
||||
|
||||
# return [name.split(' ')[1] if ' ' in name else name for name in res]
|
||||
|
||||
def delete_folders(self, folders: list[str]) -> None:
|
||||
"""delete temporary folders created"""
|
||||
for folder in folders:
|
||||
|
|
Loading…
Reference in New Issue