Skip to content

Commit cbbf769

Browse files
committed
3.0.0 Prerelease
1 parent 81f2998 commit cbbf769

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

docs/documentation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Audio
77
.. autofunction:: mediaify.encode_audio
88
.. autofunction:: mediaify.batch_encode_audio
99
.. autoclass:: mediaify.AudioFile
10-
:members: data, mimetype, type
10+
:members: data, mimetype, type, save
1111
:undoc-members:
1212
:noindex:
1313

@@ -17,7 +17,7 @@ Image
1717
.. autofunction:: mediaify.encode_image
1818
.. autofunction:: mediaify.batch_encode_image
1919
.. autoclass:: mediaify.ImageFile
20-
:members: data, mimetype, ext, width, height
20+
:members: data, mimetype, ext, width, height, save
2121
:undoc-members:
2222
:noindex:
2323

@@ -27,7 +27,7 @@ Animation
2727
.. autofunction:: mediaify.encode_animation
2828
.. autofunction:: mediaify.batch_encode_animation
2929
.. autoclass:: mediaify.AnimationFile
30-
:members: data, mimetype, ext, height, width, frame_count, duration
30+
:members: data, mimetype, ext, height, width, frame_count, duration, save
3131
:undoc-members:
3232
:noindex:
3333

@@ -37,7 +37,7 @@ Video
3737
.. autofunction:: mediaify.encode_video
3838
.. autofunction:: mediaify.batch_encode_video
3939
.. autoclass:: mediaify.VideoFile
40-
:members: data, mimetype, ext, height, width, duration, framerate, hasAudio
40+
:members: data, mimetype, ext, height, width, duration, framerate, hasAudio, save
4141
:undoc-members:
4242
:noindex:
4343

mediaify/audio/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
from .exports import encode_audio, batch_encode_audio, AudioFile
2+
3+
__all__ = [
4+
"encode_audio",
5+
"batch_encode_audio",
6+
"AudioFile",
7+
]

mediaify/files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def ext(self) -> str:
3131
else:
3232
return ext
3333

34-
35-
def save(self, filepath: str):
34+
def save(self, filepath: str) -> None:
35+
"Saves the file to the given path"
3636
with open(filepath, "wb") as f:
3737
f.write(self.data)
3838

mediaify/video/process.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ def add_progress_bar(
6565
)
6666

6767
last_frame = 0
68-
@ffmpeg.on("progress")
69-
def on_progress(progress: Progress):
68+
ffmpeg.on("progress")
69+
def on_progress(progress: Progress) -> None:
7070
nonlocal last_frame
7171
frames_processed = progress.frame - last_frame
7272
progress_bar.update(frames_processed)
7373
last_frame = progress.frame
7474

7575
@ffmpeg.on("completed")
76-
def on_completed():
76+
def on_completed() -> None:
7777
progress_bar.close()
7878

7979

mediaify/video/summary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def encode_as_animation_summary(
1717
) -> AnimationFile:
1818
if config.frames > info.frame_count:
1919
frame_count = info.frame_count
20-
timescale = 1
20+
timescale = 1.
2121
else:
2222
frame_count = config.frames
2323
timescale = min(2, info.frame_count / config.frames)

0 commit comments

Comments
 (0)