Hi all messing with the idea as I haven't seen it incorporated into the tools and if there is anything like this or more so a better method then please highlight it :)
anyway let's dive in.
the goal was to incorporate live album art and pipe it straight to the service MOT folder.
This is very rudimentary not purely refined and I would appreciate any feedback or even adjustments that it would need.
I think this is a nice addition if refined to add to the tools if it is implemented in the next branch.
the above was tested using the following tools
SACAD to pull art down from a stream using track titling and searches discodogs apple databases and so on for the required track art.
by amending the outlined pathways and executing the Python script
The script allows the read of the service icy-text converts it to an artist - title into the track and title line of SACAD and executes every 60 seconds.
#!/usr/bin/env python3
def process_line(line):
parts = line.split("-")
if len(parts) != 2:
return None, None # returns none if doesn't match criteria
artist = parts[0].strip()
song = parts[1].strip()
return artist, song
def main():
input_file = '/home/dabmux/pad2/ICY.txt' # Replace with input file path
output_file = '/home/dabmux/pad/MOT/SERVICE.jpeg' # Output file path
with open(input_file, 'r') as file:
for line in file:
artist, song = process_line(line)
if artist and song:
command = f"sacad '{artist}' '{song}' 320 {output_file}"
print("Executing command:", command)
import os; os.system(command)
if __name__ == "__main__":
main()