work on liquidsoap script + add dynamic playlist
This commit is contained in:
parent
f5b5718231
commit
c5c566d485
|
@ -30,17 +30,22 @@ class Command (BaseCommand):
|
||||||
'-c', '--config', action='store_true',
|
'-c', '--config', action='store_true',
|
||||||
help='Generate liquidsoap config file'
|
help='Generate liquidsoap config file'
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'-d', '--diffusion', action='store_true',
|
||||||
|
help='Generate the playlist for the current scheduled diffusion'
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-s', '--stream', type=int,
|
'-s', '--stream', type=int,
|
||||||
help='Generate the playlist of a stream with the given id'
|
help='Generate the playlist of a stream with the given id'
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-S', '--streams', action='store_true',
|
'-S', '--streams', action='store_true',
|
||||||
help='Generate all playlists'
|
help='Generate all stream playlists'
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-a', '--all', action='store_true',
|
'-a', '--all', action='store_true',
|
||||||
help='Generate all playlists and config file'
|
help='Generate all playlists (stream and scheduled diffusion) '
|
||||||
|
'and config file'
|
||||||
)
|
)
|
||||||
|
|
||||||
def handle (self, *args, **options):
|
def handle (self, *args, **options):
|
||||||
|
@ -118,7 +123,7 @@ class Command (BaseCommand):
|
||||||
data = re.sub(r'#\\n#', '\n', data)
|
data = re.sub(r'#\\n#', '\n', data)
|
||||||
self.print(data, output, 'aircox.liq')
|
self.print(data, output, 'aircox.liq')
|
||||||
|
|
||||||
def get_playlist (self, stream, output = None):
|
def get_playlist (self, stream = None, output = None):
|
||||||
path = os.path.join(
|
path = os.path.join(
|
||||||
programs_settings.AIRCOX_SOUND_ARCHIVES_SUBDIR,
|
programs_settings.AIRCOX_SOUND_ARCHIVES_SUBDIR,
|
||||||
stream.program.path
|
stream.program.path
|
||||||
|
|
Loading…
Reference in New Issue
Block a user