Skip to content

Commit

Permalink
v1.4.3
Browse files Browse the repository at this point in the history
Added support for master.panobf2 file

Related to Panopto-Video-DL/Panopto-Video-DL#5
  • Loading branch information
pizidavi committed Jan 6, 2025
1 parent c99f5bf commit f0da7b8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.venv/
build/
*.egg-info/
3 changes: 2 additions & 1 deletion PanoptoDownloader/PanoptoDownloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
r'(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)'
r'(?::\d+)?'
r'(?:/?|[/?]\S+)$', re.IGNORECASE)
PANOBF_FILE_REGEX = re.compile(r'.*\.panobf(\d+)$', re.IGNORECASE)


def download(uri: str, output: str, callback: callable) -> None:
Expand All @@ -35,7 +36,7 @@ def download(uri: str, output: str, callback: callable) -> None:
# if os.path.splitext(output)[1] not in SUPPORTED_FORMATS:
# raise NotSupported('Extension not supported. Must be one of ' + str(SUPPORTED_FORMATS))

if uri.endswith('master.m3u8'):
if uri.endswith('master.m3u8') or PANOBF_FILE_REGEX.match(uri):
use_ffmpeg = which('ffmpeg') is not None
if use_ffmpeg:
command = ['ffmpeg', '-f', 'hls', '-i', uri, '-c', 'copy', output]
Expand Down
2 changes: 1 addition & 1 deletion PanoptoDownloader/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.4.2'
__version__ = '1.4.3'

0 comments on commit f0da7b8

Please sign in to comment.