idk what im doing at this point with the audio shit

This commit is contained in:
JISAUAY committed 2025-01-16 16:32:30 -06:00
1 parent 6edcd1db98
commit 6897b684ee
4 files changed
+67 -24

No files matched your search

+23 -19
View File
@@ -8,9 +8,9 @@ import xml.etree
import xml.etree.ElementTree
import requests
import libsonic
import simpleaudio
# import pyaudio
# import libsonic
# import simpleaudio
import pyaudio
u = 'pseudo'
@@ -215,7 +215,17 @@ class SubpyConn:
return songs
def stream(self, song_id: str):
def getArtists(self) -> list[Artist]:
artistIndexes: ArtistIndexes = self.getIndexes()
artists: list[Artist] = []
for artistIndex in artistIndexes.indexes:
artists.extend(artistIndex.artists)
return artists
# Returns a requests Response object, the data stream can be found in Response.content
def stream(self, song_id: str) -> requests.Response:
url = self.base_url + '/rest/stream?'
payload = self._getBasePayload()
@@ -243,25 +253,19 @@ yakui_id = "7f6ca9951af294420382442061a2d6ee"
# for album in yakui_albums:
# print(album.name)
helios_songs = conn.getAlbumSongs(helios_id)
for song in helios_songs:
print(song.trackNumber, song.title)
# helios_songs = conn.getAlbumSongs(helios_id)
# for song in helios_songs:
# print(song.trackNumber, song.title)
# class Artist:
# artists = conn.getArtists()
# id: str
# imageUrl: str
# name: str
# albumCount: int
# for artist in artists:
# print(artist.name)
# def __init__(self):
# pass
echidna_id = "937004317800a879f0cddd471fb82387"
# print(conn.stream(echidna_id).content)
# def fromDict(self, d: dict):
# self.id = d['id']
# self.imageUrl = d['artistImageUrl']
# self.name = d['name']
# self.albumCount = d['albumCount']
# def getArtists() -> list[Artist]:
# tree = xml.etree.ElementTree.parse("artist_response.xml")