Skip to content

Commit

Permalink
Add content warning
Browse files Browse the repository at this point in the history
cdgriffith committed Apr 17, 2024
1 parent 09b6989 commit 9984a29
Showing 8 changed files with 38 additions and 7 deletions.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -7,6 +7,14 @@ assignees: ''

---

<!-- DO NOT POST COPYRIGHTED SCREENSHOTS -->
<!-- DO NOT TALK ABOUT COPYRIGHTED CONTENT -->
<!-- DO NOT POST LOGS WITH COPYRIGHTED CONTENT -->

<!-- FastFlix is not intended to be used with copyrighted content -->

<!-- Any discussion or information posted with illegal information will result in the issue being reported and removed -->

**FastFlix Version:**

**Operating System:**
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -7,6 +7,15 @@ assignees: ''

---

<!-- DO NOT POST COPYRIGHTED SCREENSHOTS -->
<!-- DO NOT TALK ABOUT COPYRIGHTED CONTENT -->
<!-- DO NOT POST LOGS WITH COPYRIGHTED CONTENT -->

<!-- FastFlix is not intended to be used with copyrighted content -->

<!-- Any discussion or information posted with illegal information will result in the issue being reported and removed -->


Please use Discussions for new Features! They can be voted upon, and that way I can work in the most demanded features first.

Don't forget to first search for the feature you want, as well as upvote others you would like to see!
4 changes: 3 additions & 1 deletion fastflix/encoders/common/audio.py
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
"quad(side)": 4,
"5.0": 5,
"5.1": 6,
"5.1(side)": 6,
"6.0": 6,
"6.0(front)": 6,
"hexagonal": 6,
@@ -42,8 +43,9 @@ def build_audio(audio_tracks, audio_file_index=0):
if not track.conversion_codec or track.conversion_codec == "none":
command_list.append(f"-c:{track.outdex} copy")
elif track.conversion_codec:
cl = track.downmix if "downmix" in track and track.downmix else track.raw_info.channel_layout
downmix = (
f"-ac:{track.outdex} {channel_list[track.downmix]} -filter:{track.outdex} aformat=channel_layouts={track.downmix}"
f"-ac:{track.outdex} {channel_list[cl]} -filter:{track.outdex} aformat=channel_layouts={cl}"
if track.downmix
else ""
)
4 changes: 2 additions & 2 deletions fastflix/ff_queue.py
Original file line number Diff line number Diff line change
@@ -35,8 +35,8 @@ def get_queue(queue_file: Path) -> list[Video]:
video["video_settings"]["output_path"] = Path(video["video_settings"]["output_path"])
encoder_settings = video["video_settings"]["video_encoder_settings"]
ves = [x(**encoder_settings) for x in setting_types.values() if x().name == encoder_settings["name"]][0]
# TODO breaks - audio = [AudioTrack(**x) for x in video["audio_tracks"]]
# TODO breaks subtitles = [SubtitleTrack(**x) for x in video["subtitle_tracks"]]
audio = [AudioTrack(**x) for x in video["audio_tracks"]]
subtitles = [SubtitleTrack(**x) for x in video["subtitle_tracks"]]
attachments = []
for x in video["attachment_tracks"]:
try:
3 changes: 3 additions & 0 deletions fastflix/widgets/background_tasks.py
Original file line number Diff line number Diff line change
@@ -32,6 +32,9 @@ def run(self):
"Please use FFmpeg 4.3+ built against the latest zimg libraries. "
"Static builds available at https://ffmpeg.org/download.html "
)
if "OpenCL mapping not usable" in result.stdout.decode(encoding="utf-8", errors="ignore"):
self.main.thread_logging_signal.emit("ERROR trying to use OpenCL for thumbnail generation")
self.main.thumbnail_complete.emit(2)
else:
self.main.thread_logging_signal.emit(f"ERROR:{t('Could not generate thumbnail')}: {result.stdout}")

7 changes: 5 additions & 2 deletions fastflix/widgets/main.py
Original file line number Diff line number Diff line change
@@ -1680,10 +1680,13 @@ def thread_logger(text):
logger.warning(text)

@reusables.log_exception("fastflix", show_traceback=False)
def thumbnail_generated(self, success=False):
if not success or not self.thumb_file.exists():
def thumbnail_generated(self, status=0):
if status == 0 or not status or not self.thumb_file.exists():
self.widgets.preview.setText(t("Error Updating Thumbnail"))
return
if status == 2:
self.generate_thumbnail()
return
pixmap = QtGui.QPixmap(str(self.thumb_file))
pixmap = pixmap.scaled(420, 260, QtCore.Qt.KeepAspectRatio)
self.widgets.preview.setPixmap(pixmap)
5 changes: 4 additions & 1 deletion fastflix/widgets/panels/audio_panel.py
Original file line number Diff line number Diff line change
@@ -208,7 +208,10 @@ def page_update(self):

@property
def enabled(self):
return self.app.fastflix.current_video.audio_tracks[self.index].enabled
try:
return self.app.fastflix.current_video.audio_tracks[self.index].enabled
except IndexError:
return False

@property
def language(self) -> str:
5 changes: 4 additions & 1 deletion fastflix/widgets/panels/subtitle_panel.py
Original file line number Diff line number Diff line change
@@ -202,7 +202,10 @@ def set_outdex(self, outdex):

@property
def enabled(self):
return self.app.fastflix.current_video.subtitle_tracks[self.index].enabled
try:
return self.app.fastflix.current_video.subtitle_tracks[self.index].enabled
except IndexError:
return False

@property
def language(self):

0 comments on commit 9984a29

Please sign in to comment.