mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
498d0688b0
+ add Mix db model
31 lines
709 B
Python
31 lines
709 B
Python
from app.crons.cron import CronJob
|
|
from app.lib.recipes import ArtistMixes
|
|
from app.plugins.mixes import MixesPlugin
|
|
from app.store.homepage import HomepageStore
|
|
|
|
|
|
class Mixes(CronJob):
|
|
"""
|
|
This cron job creates mixes displayed on the homepage.
|
|
"""
|
|
|
|
def __init__(self):
|
|
super().__init__("mixes", 1)
|
|
|
|
def run(self):
|
|
"""
|
|
Creates the artist mixes
|
|
"""
|
|
print("⭐⭐⭐⭐ Mixes cron job running")
|
|
ArtistMixes().run()
|
|
# mixes = MixesPlugin()
|
|
|
|
# if not mixes.enabled:
|
|
# return
|
|
|
|
|
|
# artist_mixes = mixes.create_artist_mixes()
|
|
|
|
# if artist_mixes:
|
|
# HomepageStore.set_artist_mixes(artist_mixes)
|