Skip to content

merge#32

Merged
Aswanidev-vs merged 17 commits into
wailsfrom
v5
Mar 20, 2026
Merged

merge#32
Aswanidev-vs merged 17 commits into
wailsfrom
v5

Conversation

@Aswanidev-vs

Copy link
Copy Markdown
Owner

No description provided.

@coderabbitai

coderabbitai Bot commented Mar 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1299eca4-9cca-4916-8dac-f2a1544d30fe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v5

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can customize the tone of the review comments and chat replies.

Configure the tone_instructions setting to customize the tone of the review comments and chat replies. For example, you can set the tone to Act like a strict teacher, Act like a pirate and more.

@Aswanidev-vs
Aswanidev-vs merged commit 4e2e4bc into wails Mar 20, 2026
7 of 10 checks passed
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on improving the user experience and maintainability of the Predator application. It includes a comprehensive update to the README, detailing features and usage, enhancements to video/audio format selection logic, and the addition of a contributing guide.

Highlights

  • README Update: The README.md file was significantly updated to provide a more comprehensive overview of the Predator application, including features, usage instructions, technical details, troubleshooting, and legal disclaimers.
  • Format String Improvements: The format string logic in app.go was enhanced to improve video and audio quality selection, particularly for MP4 and WebM containers, ensuring better codec handling and compatibility.
  • Contributing Guide: A new CONTRIBUTING.md file was added to provide guidelines for contributing to the project, including submodule management and development quickstart instructions.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/submodule-check.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request appears to be a merge of a feature branch, which includes a major refactoring from the Fyne framework to Wails. The README.md has been significantly improved and a CONTRIBUTING.md file has been added. The download logic in app.go has been made more robust with better format selection fallbacks.

My review includes a few suggestions:

  • In README.md, there are some inconsistencies regarding the required Go version and a broken link in the table of contents.
  • In app.go, I've identified an unused function parameter, some duplicated code that can be refactored, and a new function that seems to be dead code.

Overall, these are great improvements to the project's structure and functionality. Addressing these points will enhance code quality and documentation clarity.

Comment thread app.go
Comment on lines +494 to 569
func buildWebmFormatString(cleanRes string) string {
// For webm, we want VP9 or AV1 video with opus audio
// This provides better quality than older vp8/opus combinations

if cleanRes == "best" {
// Best quality webm - prioritize av01 (AV1) then vp9
return "bestvideo[vcodec^=av01]+bestaudio[acodec^=opus]/" +
"bestvideo[vcodec^=av01]+bestaudio[ext=webm]/" +
"bestvideo[vcodec^=av01]+bestaudio/" +
"bestvideo[vcodec^=vp9]+bestaudio[acodec^=opus]/" +
"bestvideo[vcodec^=vp9]+bestaudio[ext=webm]/" +
"bestvideo[vcodec^=vp9]+bestaudio/" +
"bestvideo[vcodec^=vp8]+bestaudio[acodec^=opus]/" +
"bestvideo[vcodec^=vp8]+bestaudio/" +
"bestvideo+bestaudio[acodec^=opus]/bestvideo+bestaudio/best"
}

resNum, _ := strconv.Atoi(cleanRes)
if resNum >= 1440 {
// High resolutions - prioritize av01 then vp9
return fmt.Sprintf(
// AV1 with opus - best quality
"bestvideo[vcodec^=av01][height=%s]+bestaudio[acodec^=opus]/"+
"bestvideo[vcodec^=av01][height=%s]+bestaudio[ext=webm]/"+
"bestvideo[vcodec^=av01][height=%s]+bestaudio/"+
// AV1 <= height fallback
"bestvideo[vcodec^=av01][height<=%s]+bestaudio[acodec^=opus]/"+
"bestvideo[vcodec^=av01][height<=%s]+bestaudio[ext=webm]/"+
"bestvideo[vcodec^=av01][height<=%s]+bestaudio/"+
// VP9 with opus
"bestvideo[vcodec^=vp9][height=%s]+bestaudio[acodec^=opus]/"+
"bestvideo[vcodec^=vp9][height=%s]+bestaudio[ext=webm]/"+
"bestvideo[vcodec^=vp9][height=%s]+bestaudio/"+
// VP9 <= height fallback
"bestvideo[vcodec^=vp9][height<=%s]+bestaudio[acodec^=opus]/"+
"bestvideo[vcodec^=vp9][height<=%s]+bestaudio[ext=webm]/"+
"bestvideo[vcodec^=vp9][height<=%s]+bestaudio/"+
// Any codec fallback
"bestvideo[height<=%s]+bestaudio[acodec^=opus]/"+
"bestvideo[height<=%s]+bestaudio[ext=webm]/"+
"bestvideo[height<=%s]+bestaudio/"+
"best[height<=%s]",
cleanRes, cleanRes, cleanRes, cleanRes, cleanRes, cleanRes,
cleanRes, cleanRes, cleanRes, cleanRes, cleanRes, cleanRes,
cleanRes, cleanRes, cleanRes, cleanRes,
)
}

// Standard resolutions - prioritize av01 then vp9 with opus
return fmt.Sprintf(
// AV1 with opus
"bestvideo[vcodec^=av01][height=%s]+bestaudio[acodec^=opus]/"+
"bestvideo[vcodec^=av01][height=%s]+bestaudio[ext=webm]/"+
"bestvideo[vcodec^=av01][height=%s]+bestaudio/"+
// AV1 <= height fallback
"bestvideo[vcodec^=av01][height<=%s]+bestaudio[acodec^=opus]/"+
"bestvideo[vcodec^=av01][height<=%s]+bestaudio[ext=webm]/"+
"bestvideo[vcodec^=av01][height<=%s]+bestaudio/"+
// VP9 with opus
"bestvideo[vcodec^=vp9][height=%s]+bestaudio[acodec^=opus]/"+
"bestvideo[vcodec^=vp9][height=%s]+bestaudio[ext=webm]/"+
"bestvideo[vcodec^=vp9][height=%s]+bestaudio/"+
// VP9 <= height fallback
"bestvideo[vcodec^=vp9][height<=%s]+bestaudio[acodec^=opus]/"+
"bestvideo[vcodec^=vp9][height<=%s]+bestaudio[ext=webm]/"+
"bestvideo[vcodec^=vp9][height<=%s]+bestaudio/"+
// Any codec fallback
"bestvideo[height<=%s]+bestaudio[acodec^=opus]/"+
"bestvideo[height<=%s]+bestaudio[ext=webm]/"+
"bestvideo[height<=%s]+bestaudio/"+
"best[height<=%s]",
cleanRes, cleanRes, cleanRes, cleanRes, cleanRes, cleanRes,
cleanRes, cleanRes, cleanRes, cleanRes, cleanRes, cleanRes,
cleanRes, cleanRes, cleanRes,
cleanRes, cleanRes, cleanRes, cleanRes,
)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The function buildWebmFormatString is defined but it's not used anywhere in the codebase. This appears to be dead code. Please either use it or remove it to avoid confusion and reduce maintenance overhead.

Comment thread README.md
- [Features](#features)
- [Getting Started](#getting-started)
- [How to Use](#how-to-use)
- [Keyboard Shortcuts](#keyboard-shortcuts)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Table of Contents includes a link to Keyboard Shortcuts, but there is no corresponding section in the document. This is a broken link. Please either add the section or remove the link from the table of contents.

Comment thread README.md
## Getting Started

## Installation
You'll need **Go 1.24 or newer** installed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The go.mod and CONTRIBUTING.md files specify Go version 1.25, but this file mentions 1.24 or newer. For consistency, it would be better to update this to 1.25 or newer.

Suggested change
You'll need **Go 1.24 or newer** installed.
You'll need **Go 1.25 or newer** installed.

Comment thread app.go

// buildVideoFormatString builds format string for mp4 container with proper codec handling
// Uses separate video+audio selection to ensure reliable merging
func buildVideoFormatString(cleanRes string, preferH264 bool) string {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The preferH264 parameter is declared but not used within the function. The logic already prioritizes H.264 (avc1). This parameter should be removed to simplify the function signature. Remember to update the call site at app.go:1600 as well.

Comment thread app.go
Comment on lines 432 to +489
resNum, _ := strconv.Atoi(cleanRes)
if resNum >= 1440 {
// High resolutions - try exact height first, then fall back to <=
// STRICTLY m4a audio only to prevent ffmpeg merge failures
// High resolutions (1440p+) - prioritize h264 with exact or close height match
return fmt.Sprintf(
// Try exact height match first with m4a audio only
// h264 with m4a audio - best for mp4 merging
"bestvideo[vcodec^=avc1][height=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=avc1][height=%s]+bestaudio[acodec^=mp4a]/"+
"bestvideo[vcodec^=avc1][height=%s]+bestaudio/"+
// h264 with <= height fallback
"bestvideo[vcodec^=avc1][height<=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=avc1][height<=%s]+bestaudio[acodec^=mp4a]/"+
"bestvideo[vcodec^=avc1][height<=%s]+bestaudio/"+
// vp9 fallback
"bestvideo[vcodec^=vp9][height=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=vp9][height=%s]+bestaudio[acodec^=mp4a]/"+
"bestvideo[vcodec^=vp9][height=%s]+bestaudio/"+
// av1 fallback
"bestvideo[vcodec^=av01][height=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=av01][height=%s]+bestaudio[acodec^=mp4a]/"+
// Fall back to <= if exact match not available - still m4a only
"bestvideo[vcodec^=avc1][height<=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=avc1][height<=%s]+bestaudio[acodec^=mp4a]/"+
"bestvideo[vcodec^=vp9][height<=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=vp9][height<=%s]+bestaudio[acodec^=mp4a]/"+
"bestvideo[vcodec^=av01][height<=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=av01][height<=%s]+bestaudio[acodec^=mp4a]/"+
// Final fallbacks - still prefer m4a
"bestvideo[vcodec^=av01][height=%s]+bestaudio/"+
// Any video codec fallback
"bestvideo[height<=%s]+bestaudio[ext=m4a]/"+
"bestvideo[height<=%s]+bestaudio[acodec^=mp4a]/"+
"bestvideo[height<=%s]+bestaudio/"+
"best[height<=%s]",
cleanRes, cleanRes, cleanRes, cleanRes, cleanRes, cleanRes,
cleanRes, cleanRes, cleanRes, cleanRes, cleanRes, cleanRes,
cleanRes, cleanRes, cleanRes,
cleanRes, cleanRes, cleanRes, cleanRes,
)
}

// Standard resolutions - try exact height first, then fall back
// STRICTLY m4a audio only to prevent ffmpeg merge failures
// Standard resolutions - prioritize h264 with m4a audio
return fmt.Sprintf(
// Try exact height match first with m4a audio only
// h264 with m4a audio - best for mp4 merging
"bestvideo[vcodec^=avc1][height=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=avc1][height=%s]+bestaudio[acodec^=mp4a]/"+
"bestvideo[vcodec^=avc1][height=%s]+bestaudio/"+
// h264 with <= height fallback
"bestvideo[vcodec^=avc1][height<=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=avc1][height<=%s]+bestaudio[acodec^=mp4a]/"+
"bestvideo[vcodec^=avc1][height<=%s]+bestaudio/"+
// vp9 fallback
"bestvideo[vcodec^=vp9][height=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=vp9][height=%s]+bestaudio[acodec^=mp4a]/"+
"bestvideo[vcodec^=vp9][height=%s]+bestaudio/"+
// av1 fallback
"bestvideo[vcodec^=av01][height=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=av01][height=%s]+bestaudio[acodec^=mp4a]/"+
// Fall back to <= if exact match not available - still m4a only
"bestvideo[vcodec^=avc1][height<=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=avc1][height<=%s]+bestaudio[acodec^=mp4a]/"+
"bestvideo[vcodec^=vp9][height<=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=vp9][height<=%s]+bestaudio[acodec^=mp4a]/"+
"bestvideo[vcodec^=av01][height<=%s]+bestaudio[ext=m4a]/"+
"bestvideo[vcodec^=av01][height<=%s]+bestaudio[acodec^=mp4a]/"+
// Final fallbacks - still prefer m4a
"bestvideo[vcodec^=av01][height=%s]+bestaudio/"+
// Any video codec fallback
"bestvideo[height<=%s]+bestaudio[ext=m4a]/"+
"bestvideo[height<=%s]+bestaudio[acodec^=mp4a]/"+
"bestvideo[height<=%s]+bestaudio/"+
"best[height<=%s]",
cleanRes, cleanRes, cleanRes, cleanRes, cleanRes, cleanRes,
cleanRes, cleanRes, cleanRes, cleanRes, cleanRes, cleanRes,
cleanRes, cleanRes, cleanRes, cleanRes,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The code blocks for high resolutions (>= 1440p) and standard resolutions are identical. This duplication can be removed by merging them into a single block, which will make the code more maintainable.

	// The logic for all resolutions is the same, so no need for the if/else block.
	// Standard resolutions - prioritize h264 with m4a audio
	return fmt.Sprintf(
		// h264 with m4a audio - best for mp4 merging
		"bestvideo[vcodec^=avc1][height=%s]+bestaudio[ext=m4a]/"+
			"bestvideo[vcodec^=avc1][height=%s]+bestaudio[acodec^=mp4a]/"+
			"bestvideo[vcodec^=avc1][height=%s]+bestaudio/"+
			// h264 with <= height fallback
			"bestvideo[vcodec^=avc1][height<=%s]+bestaudio[ext=m4a]/"+
			"bestvideo[vcodec^=avc1][height<=%s]+bestaudio[acodec^=mp4a]/"+
			"bestvideo[vcodec^=avc1][height<=%s]+bestaudio/"+
			// vp9 fallback
			"bestvideo[vcodec^=vp9][height=%s]+bestaudio[ext=m4a]/"+
			"bestvideo[vcodec^=vp9][height=%s]+bestaudio[acodec^=mp4a]/"+
			"bestvideo[vcodec^=vp9][height=%s]+bestaudio/"+
			// av1 fallback
			"bestvideo[vcodec^=av01][height=%s]+bestaudio[ext=m4a]/"+
			"bestvideo[vcodec^=av01][height=%s]+bestaudio[acodec^=mp4a]/"+
			"bestvideo[vcodec^=av01][height=%s]+bestaudio/"+
			// Any video codec fallback
			"bestvideo[height<=%s]+bestaudio[ext=m4a]/"+
			"bestvideo[height<=%s]+bestaudio[acodec^=mp4a]/"+
			"bestvideo[height<=%s]+bestaudio/"+
			"best[height<=%s]",
		cleanRes, cleanRes, cleanRes, cleanRes, cleanRes, cleanRes,
		cleanRes, cleanRes, cleanRes, cleanRes, cleanRes, cleanRes,
		cleanRes, cleanRes, cleanRes, cleanRes,
	)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant