fnp
/
audio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More thumbnail options.
[audio.git]
/
src
/
youtube
/
management
/
commands
/
youtube.py
diff --git
a/src/youtube/management/commands/youtube.py
b/src/youtube/management/commands/youtube.py
index
4a8dfb5
..
fd50e0c
100644
(file)
--- a/
src/youtube/management/commands/youtube.py
+++ b/
src/youtube/management/commands/youtube.py
@@
-11,9
+11,11
@@
class Command(BaseCommand):
parser.add_argument("--limit", type=int, default=6)
def handle(self, *args, **options):
parser.add_argument("--limit", type=int, default=6)
def handle(self, *args, **options):
- for audiobook in Audiobook.objects.exclude(youtube_queued=None).order_by(
- "youtube_queued"
- )[: options["limit"]]:
+ for audiobook in (
+ Audiobook.objects.filter(youtube_status=status.QUEUED)
+ .exclude(youtube_queued=None)
+ .order_by("youtube_queued")[: options["limit"]]
+ ):
audiobook.youtube_task = tasks.YouTubeTask.delay(
None, audiobook.id, True
).task_id
audiobook.youtube_task = tasks.YouTubeTask.delay(
None, audiobook.id, True
).task_id