Skip to content
Snippets Groups Projects
Commit d7b5f7be authored by Mathieu Loiseau's avatar Mathieu Loiseau
Browse files

load m3u8

parent b19a5cef
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
# created by lzbk
import argparse
from good_ol_mixtape import MixTape
parser = argparse.ArgumentParser(description="Créer une mix-tape")
parser.add_argument("-p", "--playlist", help="le fichier .m3u8 de la playlist", type=str)
args = parser.parse_args()
if __name__ == "__main__":
mx = MixTape(args.playlist)
print(mx)
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
# created by lzbk
import m3u8
class MixTape:
def __init__(self, pl):
self.playlist = m3u8.load(pl)
def __str__(self):
return str(self.playlist.segments) + "\n" + str(self.playlist.target_duration)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment