1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,3 +8,4 @@
|
||||
/docs/_build/
|
||||
/src/*.egg-info/
|
||||
__pycache__/
|
||||
.env
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
PLEX_SERVER_URL=http://your-plex-server-url
|
||||
PLEX_TOKEN=your-plex-token
|
||||
DATABASE_URL=postgres://user:password@localhost/database
|
||||
MAX_TRACKS_QUERIED=1000
|
||||
@@ -138,11 +138,3 @@ async def update_statistics_timestamps(operation: str) -> None:
|
||||
f"Unexpected error during statistics timestamp update: {e}"
|
||||
)
|
||||
await session.rollback()
|
||||
|
||||
|
||||
# Example usage
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
|
||||
asyncio.run(update_statistics_timestamps("start"))
|
||||
asyncio.run(update_statistics_timestamps("end"))
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
"""Handles updating the tracks stored in the database from plex."""
|
||||
|
||||
import asyncio
|
||||
|
||||
import env
|
||||
import plex
|
||||
import sql
|
||||
from aiologger import Logger
|
||||
@@ -31,12 +28,3 @@ async def process_tracks(server_url: str, token: str) -> None:
|
||||
except Exception as e:
|
||||
await logger.error(f"An error occurred during track processing: {e}")
|
||||
raise
|
||||
|
||||
|
||||
async def main():
|
||||
"""Main function to initiate the track processing from the Plex server."""
|
||||
await process_tracks(env.PLEX_SERVER_URL, env.PLEX_TOKEN)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
|
||||
Reference in New Issue
Block a user