@@ -1,3 +1,4 @@
|
||||
---
|
||||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
@@ -38,7 +39,12 @@ repos:
|
||||
entry: reorder-python-imports
|
||||
language: system
|
||||
types: [python]
|
||||
args: [--application-directories=src, --py39-plus]
|
||||
args:
|
||||
[
|
||||
--application-directories=src,
|
||||
--py39-plus,
|
||||
--exit-zero-even-if-changed,
|
||||
]
|
||||
- id: trailing-whitespace
|
||||
name: Trim Trailing Whitespace
|
||||
entry: trailing-whitespace-fixer
|
||||
|
||||
@@ -3,6 +3,7 @@ import click
|
||||
|
||||
from playlist import plex
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.version_option()
|
||||
def main() -> None:
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Application-level constants."""
|
||||
|
||||
import dataclasses
|
||||
import pathlib
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""Contains the code to communicate to the Plex server."""
|
||||
import typing
|
||||
|
||||
import aioreactive as rx
|
||||
import aioreactive as rx # type: ignore
|
||||
import plexapi.audio # type: ignore
|
||||
import plexapi.server # type: ignore
|
||||
|
||||
@@ -32,7 +32,7 @@ def gen_batched_tracks(
|
||||
pos += batch_size
|
||||
|
||||
|
||||
async def track_mapper(track: plexapi.audio.Track) -> dict:
|
||||
async def track_mapper(track: plexapi.audio.Track) -> dict[str, typing.Any]:
|
||||
return {
|
||||
"id": track.ratingKey,
|
||||
"track_num": track.index,
|
||||
@@ -54,8 +54,7 @@ async def gen_tracks(
|
||||
*,
|
||||
batch_size: int = 100,
|
||||
) -> typing.AsyncGenerator[plexapi.audio.Track, None]:
|
||||
"""
|
||||
Generate all Tracks from the Server, asynchronously.
|
||||
"""Generate all Tracks from the Server, asynchronously.
|
||||
|
||||
Keyword Args:
|
||||
batch_size: determines how many Tracks are pulled from the Server at a time.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import dataclasses
|
||||
import typing
|
||||
|
||||
import desert
|
||||
import desert # type: ignore
|
||||
import yaml
|
||||
|
||||
from playlist import const
|
||||
|
||||
Reference in New Issue
Block a user