implement mix tracklist balancing

This commit is contained in:
cwilvx committed 2024-10-27 06:35:37 +01:00
1 parent c4a73f0d63
commit f2153d936d
5 files changed
+150 -5

No files matched your search

+3
View File
@@ -7,6 +7,9 @@ from app.utils.threading import background
@background
def start_cron_jobs():
"""
This is the function that triggers the cron jobs.
"""
Mixes().run()
# schedule.run_pending()
+6
View File
@@ -4,10 +4,16 @@ from app.store.homepage import HomepageStore
class Mixes(CronJob):
"""
This cron job creates mixes displayed on the homepage.
"""
def __init__(self):
super().__init__("mixes", 5)
def run(self):
"""
Creates the artist mixes
"""
print("⭐⭐⭐⭐ Mixes cron job running")
mixes = MixesPlugin()
artist_mixes = mixes.get_artists()