-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from luigi311/dev
Use async for jellyfin
- Loading branch information
Showing
16 changed files
with
2,625 additions
and
2,530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
## Do not mark any shows/movies as played and instead just output to log if they would of been marked. | ||
DRYRUN = "True" | ||
## Additional logging information | ||
DEBUG = "True" | ||
## Debugging level, "info" is default, "debug" is more verbose | ||
DEBUG_LEVEL = "info" | ||
## How often to run the script in seconds | ||
SLEEP_DURATION = "3600" | ||
## Log file where all output will be written to | ||
LOGFILE = "log.log" | ||
## Map usernames between plex and jellyfin in the event that they are different, order does not matter | ||
#USER_MAPPING = { "testuser2": "testuser3" } | ||
## Map libraries between plex and jellyfin in the even that they are different, order does not matter | ||
#LIBRARY_MAPPING = { "Shows": "TV Shows" } | ||
|
||
|
||
## Recommended to use token as it is faster to connect as it is direct to the server instead of going through the plex servers | ||
## URL of the plex server, use hostname or IP address if the hostname is not resolving correctly | ||
## Comma seperated list for multiple servers | ||
PLEX_BASEURL = "http://localhost:32400" | ||
## Plex token https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/ | ||
PLEX_TOKEN = "SuperSecretToken" | ||
## If not using plex token then use username and password of the server admin along with the servername | ||
#PLEX_USERNAME = "" | ||
#PLEX_PASSWORD = "" | ||
#PLEX_SERVERNAME = "Plex Server" | ||
|
||
|
||
## Jellyfin server URL, use hostname or IP address if the hostname is not resolving correctly | ||
## Comma seperated list for multiple servers | ||
JELLYFIN_BASEURL = "http://localhost:8096" | ||
## Jellyfin api token, created manually by logging in to the jellyfin server admin dashboard and creating an api key | ||
JELLYFIN_TOKEN = "SuperSecretToken" | ||
|
||
|
||
## Blacklisting/Whitelisting libraries, library types such as Movies/TV Shows, and users. Mappings apply so if the mapping for the user or library exist then both will be excluded. | ||
#BLACKLIST_LIBRARY = "" | ||
#WHITELIST_LIBRARY = "" | ||
#BLACKLIST_LIBRARY_TYPE = "" | ||
#WHITELIST_LIBRARY_TYPE = "" | ||
#BLACKLIST_USERS = "" | ||
WHITELIST_USERS = "testuser1,testuser2" | ||
## Do not mark any shows/movies as played and instead just output to log if they would of been marked. | ||
DRYRUN = "True" | ||
## Additional logging information | ||
DEBUG = "True" | ||
## Debugging level, "info" is default, "debug" is more verbose | ||
DEBUG_LEVEL = "info" | ||
## How often to run the script in seconds | ||
SLEEP_DURATION = "3600" | ||
## Log file where all output will be written to | ||
LOGFILE = "log.log" | ||
## Map usernames between plex and jellyfin in the event that they are different, order does not matter | ||
#USER_MAPPING = { "testuser2": "testuser3" } | ||
## Map libraries between plex and jellyfin in the even that they are different, order does not matter | ||
#LIBRARY_MAPPING = { "Shows": "TV Shows" } | ||
|
||
|
||
## Recommended to use token as it is faster to connect as it is direct to the server instead of going through the plex servers | ||
## URL of the plex server, use hostname or IP address if the hostname is not resolving correctly | ||
## Comma seperated list for multiple servers | ||
PLEX_BASEURL = "http://localhost:32400" | ||
## Plex token https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/ | ||
PLEX_TOKEN = "SuperSecretToken" | ||
## If not using plex token then use username and password of the server admin along with the servername | ||
#PLEX_USERNAME = "" | ||
#PLEX_PASSWORD = "" | ||
#PLEX_SERVERNAME = "Plex Server" | ||
|
||
|
||
## Jellyfin server URL, use hostname or IP address if the hostname is not resolving correctly | ||
## Comma seperated list for multiple servers | ||
JELLYFIN_BASEURL = "http://localhost:8096" | ||
## Jellyfin api token, created manually by logging in to the jellyfin server admin dashboard and creating an api key | ||
JELLYFIN_TOKEN = "SuperSecretToken" | ||
|
||
|
||
## Blacklisting/Whitelisting libraries, library types such as Movies/TV Shows, and users. Mappings apply so if the mapping for the user or library exist then both will be excluded. | ||
#BLACKLIST_LIBRARY = "" | ||
#WHITELIST_LIBRARY = "" | ||
#BLACKLIST_LIBRARY_TYPE = "" | ||
#WHITELIST_LIBRARY_TYPE = "" | ||
#BLACKLIST_USERS = "" | ||
WHITELIST_USERS = "testuser1,testuser2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,86 @@ | ||
name: CI | ||
on: | ||
push: | ||
paths-ignore: | ||
- .gitignore | ||
- "*.md" | ||
pull_request: | ||
paths-ignore: | ||
- .gitignore | ||
- "*.md" | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: "Install dependencies" | ||
run: pip install -r requirements.txt && pip install -r test/requirements.txt | ||
|
||
- name: "Run tests" | ||
run: pytest -vvv | ||
|
||
docker: | ||
runs-on: ubuntu-latest | ||
needs: pytest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Docker meta | ||
id: docker_meta | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
if: "${{ env.DOCKER_USERNAME != '' }}" | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ secrets.DOCKER_USERNAME }}/jellyplex-watched # list of Docker images to use as base name for tags | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=sha | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to DockerHub | ||
if: "${{ steps.docker_meta.outcome == 'success' }}" | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Build | ||
id: build | ||
if: "${{ steps.docker_meta.outcome == 'skipped' }}" | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: false | ||
tags: jellyplex-watched:action | ||
|
||
- name: Build Push | ||
id: build_push | ||
if: "${{ steps.docker_meta.outcome == 'success' }}" | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.docker_meta.outputs.tags }} | ||
labels: ${{ steps.docker_meta.outputs.labels }} | ||
|
||
# Echo digest so users can validate their image | ||
- name: Image digest | ||
if: "${{ steps.docker_meta.outcome == 'success' }}" | ||
run: echo "${{ steps.build_push.outputs.digest }}" | ||
name: CI | ||
on: | ||
push: | ||
paths-ignore: | ||
- .gitignore | ||
- "*.md" | ||
pull_request: | ||
paths-ignore: | ||
- .gitignore | ||
- "*.md" | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: "Install dependencies" | ||
run: pip install -r requirements.txt && pip install -r test/requirements.txt | ||
|
||
- name: "Run tests" | ||
run: pytest -vvv | ||
|
||
docker: | ||
runs-on: ubuntu-latest | ||
needs: pytest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Docker meta | ||
id: docker_meta | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
if: "${{ env.DOCKER_USERNAME != '' }}" | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ secrets.DOCKER_USERNAME }}/jellyplex-watched # list of Docker images to use as base name for tags | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=sha | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to DockerHub | ||
if: "${{ steps.docker_meta.outcome == 'success' }}" | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Build | ||
id: build | ||
if: "${{ steps.docker_meta.outcome == 'skipped' }}" | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: false | ||
tags: jellyplex-watched:action | ||
|
||
- name: Build Push | ||
id: build_push | ||
if: "${{ steps.docker_meta.outcome == 'success' }}" | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.docker_meta.outputs.tags }} | ||
labels: ${{ steps.docker_meta.outputs.labels }} | ||
|
||
# Echo digest so users can validate their image | ||
- name: Image digest | ||
if: "${{ steps.docker_meta.outcome == 'success' }}" | ||
run: echo "${{ steps.build_push.outputs.digest }}" |
Oops, something went wrong.