You've already forked amazing-ytdlp-archive
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
20e5793cd8 |
@@ -26,7 +26,6 @@ def create_app(test_config=None):
|
||||
config['CELERY']['beat_schedule'] = {}
|
||||
config['CELERY']['beat_schedule']['Renew WebSub endpoints'] = {'task': 'ayta.tasks.websub_renew_expiring', 'schedule': 4000}
|
||||
config['CELERY']['beat_schedule']['Process WebSub data'] = {'task': 'ayta.tasks.websub_process_data', 'schedule': 100}
|
||||
config['CELERY']['beat_schedule']['Queue up new videos in static channel playlists'] = {'task': 'ayta.tasks.playlist_to_queue', 'schedule': 5000}
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config.from_mapping(config)
|
||||
|
@@ -51,7 +51,7 @@ def channels():
|
||||
return redirect(url_for('admin.channel', channelId=channelId))
|
||||
|
||||
elif task == 'playlist-queue':
|
||||
task = playlist_to_queue.delay()
|
||||
task = playlist_to_queue.delay()
|
||||
flash(f'Task playlist-queue has been queued: {task.id}')
|
||||
|
||||
generic['currentDate'] = datetime.utcnow()
|
||||
|
@@ -11,7 +11,7 @@ def base():
|
||||
channelIds = get_nosql().list_all_channels()
|
||||
|
||||
for channelId in channelIds:
|
||||
channel = get_nosql().get_channel_info(channelId)
|
||||
channel = get_nosql().get_channel_info(channelId, limited=True)
|
||||
channel['video_count'] = get_nosql().get_channel_videos_count(channelId)
|
||||
channels.append(channel)
|
||||
|
||||
|
@@ -424,8 +424,7 @@ class Mango:
|
||||
return False
|
||||
|
||||
# add to queue
|
||||
self.download_queue.insert_one({'id': videoId, 'endpoint': endpointId, 'created_time': current_time(object=True), 'status': 'queued'}).inserted_id
|
||||
return True
|
||||
return self.download_queue.insert_one({'id': videoId, 'endpoint': endpointId, 'created_time': current_time(object=True), 'status': 'queued'}).inserted_id
|
||||
|
||||
def queue_deleteQueue(self, videoId):
|
||||
if self.download_queue.delete_one({'id': videoId}):
|
||||
|
@@ -165,7 +165,7 @@ def websub_renew_expiring(hours=6):
|
||||
break
|
||||
|
||||
@shared_task()
|
||||
def playlist_to_queue(hours=6):
|
||||
def playlist_to_queue():
|
||||
from .nosql import get_nosql
|
||||
|
||||
channels = get_nosql().list_all_channels(active=True)
|
||||
|
Reference in New Issue
Block a user