aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2025-06-17 15:47:39 +0100
committerjwansek <eddie.atten.ea29@gmail.com>2025-06-17 15:47:39 +0100
commit035bbdf5f1796c78e4d71c378c19ed4e95d2a076 (patch)
treee820fcc9f37250e3c4fc9281052fbca5c6a85c84
parentb0565ec294c88b6b3ede8c5f7def488eb6e5f75a (diff)
downloadSmallYTChannelBot-035bbdf5f1796c78e4d71c378c19ed4e95d2a076.tar.gz
SmallYTChannelBot-035bbdf5f1796c78e4d71c378c19ed4e95d2a076.zip
Fixed a bug with ytapi.pyHEADmaster
-rwxr-xr-xytapi.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/ytapi.py b/ytapi.py
index 582efcd..3cd5595 100755
--- a/ytapi.py
+++ b/ytapi.py
@@ -4,10 +4,9 @@ import json
import js2py
import os
-if os.path.split(os.getcwd())[-1] == "onceaday":
- configpath = "../config.json"
-else:
- configpath = "config.json"
+configpath = os.path.join(os.path.dirname(__file__), "config.json")
+if not os.path.exists(configpath):
+ configpath = os.path.join(os.path.dirname(__file__), "..", "config.json")
with open(configpath, "r") as f:
CONFIG = json.load(f)