Skip to content

Commit

Permalink
Use sgqlc for graphql requests (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
reconman authored Mar 11, 2023
1 parent 8b6057b commit 6d1628d
Show file tree
Hide file tree
Showing 14 changed files with 33,018 additions and 396 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
branches: [ master ]
workflow_dispatch:

concurrency:
group: ${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
Expand All @@ -38,7 +42,7 @@ jobs:
- name: Lint with flake8 and pylint
run: |
flake8 .
pylint PlexAniSync.py TautulliSyncHelper.py plexmodule.py anilist.py custom_mappings.py || pylint-exit --error-fail --warn-fail $?
pylint PlexAniSync.py TautulliSyncHelper.py ./plexanisync || pylint-exit --error-fail --warn-fail $?
build-docker-plexanisync:
needs: lint
uses: rickdb/plexanisync/.github/workflows/build-docker-image.yml@master
Expand Down
10 changes: 4 additions & 6 deletions PlexAniSync.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@

import coloredlogs

import anilist
import graphql
import plexmodule
from _version import __version__
from custom_mappings import read_custom_mappings
from plexanisync import anilist, graphql, plexmodule
from plexanisync._version import __version__
from plexanisync.custom_mappings import read_custom_mappings

# Logger settings
LOG_FILENAME = "PlexAniSync.log"
Expand All @@ -27,7 +25,7 @@
# Debug log
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s %(levelname)s %(message)s",
format="%(asctime)s %(levelname)s %(name)s %(message)s",
handlers=[logging.FileHandler("PlexAniSync-DEBUG.log", "w", "utf-8")],
)

Expand Down
9 changes: 3 additions & 6 deletions TautulliSyncHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@

import coloredlogs

import anilist
import graphql
import plexmodule
from _version import __version__
from custom_mappings import read_custom_mappings
from plexanisync import anilist, graphql, plexmodule
from plexanisync._version import __version__
from plexanisync.custom_mappings import read_custom_mappings

# Logger settings
logger = logging.getLogger("PlexAniSync")
coloredlogs.install(fmt="%(asctime)s %(message)s", logger=logger)


# Enable this if you want to also log all messages coming from imported
# libraries
# coloredlogs.install(level='DEBUG')
Expand Down
Loading

0 comments on commit 6d1628d

Please sign in to comment.