Skip to content

Commit

Permalink
Updated mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
7eventy7 committed Nov 13, 2024
1 parent 8b7a8c3 commit a8b3f43
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# docker-compose.yml
version: '3.8'

services:
trackly:
build: .
volumes:
- ${MUSIC_PATH:-./music}:/music:ro # Read-only mount of music directory
- ./config:/config # Persistent storage for config
- ./config:/config # Persistent storage for config files
environment:
- UPDATE_INTERVAL=00:00 # Default to midnight
- DISCORD_WEBHOOK= # Set this to your Discord webhook URL
- DISCORD_ROLE= # Set this to your Discord role ID to ping
restart: unless-stopped
container_name: trackly
container_name: trackly
user: "${UID:-1000}:${GID:-1000}" # Use host user's UID/GID for proper permissions
18 changes: 13 additions & 5 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,22 @@
)
logger = logging.getLogger(__name__)

CONFIG_PATH = "/config/artists.json"
NOTIFIED_ALBUMS_PATH = "/config/notified_albums.json"
# Standardize config paths
CONFIG_DIR = "/config"
CONFIG_PATHS = {
'artists': os.path.join(CONFIG_DIR, 'artists.json'),
'notified': os.path.join(CONFIG_DIR, 'notified.json') # Standardized name
}

MUSICBRAINZ_BASE_URL = "https://musicbrainz.org/ws/2"
USER_AGENT = "Trackly/1.0.0 (https://github.com/7eventy7/trackly)"

# Initialize handlers
artists_handler = ArtistsConfigHandler(CONFIG_PATH)
notified_albums_handler = NotifiedAlbumsHandler(NOTIFIED_ALBUMS_PATH)
# Ensure config directory exists
os.makedirs(CONFIG_DIR, exist_ok=True)

# Initialize handlers with standardized paths
artists_handler = ArtistsConfigHandler(CONFIG_PATHS['artists'])
notified_albums_handler = NotifiedAlbumsHandler(CONFIG_PATHS['notified'])

def generate_vibrant_color():
"""Generate a vibrant color using HSV color space"""
Expand Down

0 comments on commit a8b3f43

Please sign in to comment.