refactor(config): verplaats SONOS_API_IP naar config module
SONOS_API_IP is verplaatst van adhan_cron.py naar de config module om de configuratiegegevens centraler en onderhoudbaarder te maken. Deze wijziging verbetert de leesbaarheid van de codebase en faciliteert eenvoudiger aanpassingen aan API-gerelateerde configuraties zonder direct de hoofdcode te moeten wijzigen.
This commit is contained in:
parent
cb710214f2
commit
e66173d28d
@ -1,10 +1,10 @@
|
|||||||
import requests, json, os
|
import requests, json, os
|
||||||
from datetime import datetime, date, timedelta
|
from datetime import datetime, date, timedelta
|
||||||
import time
|
import time
|
||||||
|
from config import SONOS_API_IP
|
||||||
|
|
||||||
SETTINGS_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'settings.json')
|
SETTINGS_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'settings.json')
|
||||||
VUMG_API = 'https://www.vumg.nl/?rest_route=/dpt/v1/prayertime&filter=today'
|
VUMG_API = 'https://www.vumg.nl/?rest_route=/dpt/v1/prayertime&filter=today'
|
||||||
SONOS_API_IP = '192.168.0.114' # IP van Raspberry Pi waar Sonos API draait
|
|
||||||
LOG_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'adhan_cron.log')
|
LOG_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'adhan_cron.log')
|
||||||
LAST_PLAYED_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'last_played.json')
|
LAST_PLAYED_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'last_played.json')
|
||||||
FLASK_API_URL = 'http://localhost:80' # Flask app URL
|
FLASK_API_URL = 'http://localhost:80' # Flask app URL
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user