start working on schedule command/view

This commit is contained in:
bkfox
2015-06-12 18:09:15 +02:00
parent 55665a919b
commit 57f9159dbb
4 changed files with 251 additions and 176 deletions

View File

@@ -4,13 +4,12 @@ from django.core.management.base import BaseCommand, CommandError
import programs.models as models
import programs.settings
class Command(BaseCommand):
class Command (BaseCommand):
help= "Take a look at the programs directory to check on new podcasts"
def handle(self, *args, **options):
def handle (self, *args, **options):
programs = models.Program.objects.filter(schedule__isnull = True)
for program in programs:
@@ -24,6 +23,10 @@ class Command(BaseCommand):
for filename in os.listdir(path):
long_filename = path + '/' + filename
# check for new sound files
# stat the sound files
# match sound files against episodes - if not found, create it
# upload public podcasts to mixcloud if required
except:
pass