Skip to content

Conversation

@CarterLi
Copy link
Contributor

@CarterLi CarterLi commented Jul 9, 2025

  • Add Github workflow
  • Add Now Playing (Mpris variant for macOS) support

image

@CarterLi CarterLi force-pushed the mac branch 2 times, most recently from 6f0487f to f9f7771 Compare July 11, 2025 02:33
@Euphonit
Copy link

Is there a reason why you removed the amd64 macOS Github Workflow?

@CarterLi
Copy link
Contributor Author

Rebased and tested on Tahoe

@CarterLi CarterLi force-pushed the mac branch 2 times, most recently from 4316d4c to 4725041 Compare September 22, 2025 08:11
@CarterLi CarterLi force-pushed the mac branch 2 times, most recently from 6407c86 to 9a08e7f Compare October 9, 2025 08:13
@prehensile
Copy link

prehensile commented Nov 1, 2025

Build currently fails on 9a08e7f because there's a missing include for QDir in discordipcclient.cpp. I've fixed this in prehensile@8cb4a0e and can confirm it builds fine with this amend on Sequoia.

Copilot AI review requested due to automatic review settings December 16, 2025 01:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive macOS support to the Fooyin project by implementing the Now Playing Center integration and setting up CI/CD infrastructure for macOS builds.

Key Changes:

  • Implements macOS Now Playing Center (similar to MPRIS on Linux) to display current track information and enable media control integration
  • Adds GitHub Actions workflow for building and packaging on both Intel and Apple Silicon architectures
  • Configures platform-specific build settings including Info.plist, rpath handling, and FFmpeg detection for macOS

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/plugins/nowplaying/nowplayingplugin.mm Implements the Now Playing plugin with MediaPlayer framework integration for track metadata and remote control commands
src/plugins/nowplaying/nowplayingplugin.h Header file defining the NowPlayingPlugin class interface
src/plugins/nowplaying/nowplaying.json.in Plugin metadata configuration file
src/plugins/nowplaying/CMakeLists.txt Build configuration for the Now Playing plugin on macOS
src/plugins/CMakeLists.txt Adds the nowplaying subdirectory for macOS builds
data/mac_Info.plist.in macOS application bundle configuration with supported file types and app metadata
cmake/modules/FindFFmpeg.cmake Updates FFmpeg library detection to recognize macOS dylib files
cmake/FooyinMacros.cmake Adds macOS-specific rpath handling for proper library linking
ci/macos-depends.sh Script to install build dependencies via Homebrew
ci/macos-build.sh Script to configure and build the project on macOS
CMakeLists.txt Adds Info.plist configuration for the macOS application bundle
.github/workflows/build.yml Adds GitHub Actions jobs for building on Intel and Apple Silicon Macs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
on_scope_exit releaseColorSpace([&] { CGColorSpaceRelease(colorSpace); });

// 修复颜色通道顺序和字节序
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

Comment contains non-English text. Should be translated to English or removed.

Suggested change
// 修复颜色通道顺序和字节序
// Fix color channel order and byte order

Copilot uses AI. Check for mistakes.
Comment on lines +265 to +266
CGImageRelease(cgImage);
return result;
}];
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

CGImageRelease is called inside the block but cgImage is used in initWithCGImage on the line before. NSImage may not retain the CGImage immediately, leading to a potential use-after-free. The CGImageRelease should be moved outside the block or the ownership should be properly managed.

Suggested change
CGImageRelease(cgImage);
return result;
}];
return result;
}];
CGImageRelease(cgImage);

Copilot uses AI. Check for mistakes.
return MPRemoteCommandHandlerStatusSuccess;
}
- (MPRemoteCommandHandlerStatus)ratingCommand:(MPRatingCommandEvent *)event {
self.plugin->playerController()->currentTrack().setRating(event.rating);
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

setRating is being called on a temporary Track object returned by currentTrack(). This likely has no effect as the changes are made to a copy. The track should be retrieved by reference or the modified track should be saved back to the player controller.

Suggested change
self.plugin->playerController()->currentTrack().setRating(event.rating);
auto track = self.plugin->playerController()->currentTrack();
track.setRating(event.rating);
self.plugin->playerController()->setCurrentTrack(track);

Copilot uses AI. Check for mistakes.
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.

3 participants