change to not load from the internet rn
This commit is contained in:
21
app.py
21
app.py
@@ -78,12 +78,25 @@ print("add queue")
|
||||
|
||||
player.add_to_queue(
|
||||
Song(
|
||||
"/mnt/HDD/Downloads/72 Pantera.wav",
|
||||
"Bullseye",
|
||||
"bruhh",
|
||||
"music/pink floyd/dark side of the moon/06 Money.flac",
|
||||
"Money",
|
||||
1,
|
||||
"KDrew",
|
||||
"The Dark Side Of The Moon",
|
||||
"",
|
||||
"KDrew",
|
||||
"Pink Floyd",
|
||||
)
|
||||
)
|
||||
|
||||
player.add_to_queue(
|
||||
Song(
|
||||
"bruhh",
|
||||
"music/pink floyd/dark side of the moon/07 Us and Them.flac",
|
||||
"Us and Them",
|
||||
1,
|
||||
"The Dark Side Of The Moon",
|
||||
"",
|
||||
"Pink Floyd",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
53
jelly.py
53
jelly.py
@@ -6,36 +6,39 @@ import json
|
||||
load_dotenv()
|
||||
|
||||
|
||||
album_covers = {}
|
||||
# album_covers = {}
|
||||
|
||||
client = JellyfinClient()
|
||||
client.config.app("UgPod", "0.0.1", "UgPod prototype", "UgPod_prototype_1")
|
||||
client.config.data["auth.ssl"] = True
|
||||
# client = JellyfinClient()
|
||||
# client.config.app("UgPod", "0.0.1", "UgPod prototype", "UgPod_prototype_1")
|
||||
# client.config.data["auth.ssl"] = True
|
||||
|
||||
try:
|
||||
with open("data/auth.json", "r") as f:
|
||||
credentials = json.load(f)
|
||||
# try:
|
||||
# with open("data/auth.json", "r") as f:
|
||||
# credentials = json.load(f)
|
||||
|
||||
client.authenticate(credentials, discover=False)
|
||||
# client.authenticate(credentials, discover=False)
|
||||
|
||||
# 🔴 THIS IS THE MISSING STEP
|
||||
server = credentials["Servers"][0]
|
||||
client.config.data["auth.server"] = server["Id"]
|
||||
client.config.data["auth.servers"] = credentials["Servers"]
|
||||
# # 🔴 THIS IS THE MISSING STEP
|
||||
# server = credentials["Servers"][0]
|
||||
# client.config.data["auth.server"] = server["Id"]
|
||||
# client.config.data["auth.servers"] = credentials["Servers"]
|
||||
|
||||
client.start()
|
||||
# client.start()
|
||||
|
||||
server = credentials["Servers"][0]
|
||||
# server = credentials["Servers"][0]
|
||||
|
||||
assert server["Address"].startswith("http")
|
||||
print("Server address:", server["Address"])
|
||||
print("Server ID:", server["Id"])
|
||||
except:
|
||||
print("authenticating")
|
||||
client.auth.connect_to_address(os.getenv("host"))
|
||||
client.auth.login(os.getenv("URL"), os.getenv("username"), os.getenv("password"))
|
||||
# assert server["Address"].startswith("http")
|
||||
# print("Server address:", server["Address"])
|
||||
# print("Server ID:", server["Id"])
|
||||
# except:
|
||||
# print("authenticating")
|
||||
# client.auth.connect_to_address(os.getenv("host"))
|
||||
# client.auth.login(os.getenv("URL"), os.getenv("username"), os.getenv("password"))
|
||||
|
||||
credentials = client.auth.credentials.get_credentials()
|
||||
# with open("data/auth.json", 'w') as f:
|
||||
# json.dump(credentials, f)
|
||||
server = credentials["Servers"][0]
|
||||
# credentials = client.auth.credentials.get_credentials()
|
||||
# # with open("data/auth.json", 'w') as f:
|
||||
# # json.dump(credentials, f)
|
||||
# server = credentials["Servers"][0]
|
||||
|
||||
client = None
|
||||
server = None
|
||||
Reference in New Issue
Block a user