diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index c584d70..bd305d3 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -13,7 +13,7 @@ body:
attributes:
label: Component Version
description: Which version of foo_mac_scrobble are you using?
- placeholder: e.g., 0.1.3
+ placeholder: e.g., 0.1.4
validations:
required: true
@@ -36,6 +36,7 @@ body:
- macOS Sequoia (15.x)
- macOS Sonoma (14.x)
- macOS Ventura (13.x)
+ - macOS Monterey (12.x)
- Other (specify in description)
validations:
required: true
diff --git a/.github/workflows/build_foobar.yml b/.github/workflows/build_foobar.yml
index d44b2ba..62d4d89 100644
--- a/.github/workflows/build_foobar.yml
+++ b/.github/workflows/build_foobar.yml
@@ -80,7 +80,6 @@ jobs:
ARCHS="arm64 x86_64" \
VALID_ARCHS="arm64 x86_64" \
ONLY_ACTIVE_ARCH=NO \
- MACOSX_DEPLOYMENT_TARGET=12.0 \
-derivedDataPath build \
OTHER_CPLUSPLUSFLAGS="-DFOO_LASTFM_DEBUG_DEFAULT=1 \
-DFOO_LASTFM_CI_API_KEY='\"${{ secrets.LASTFM_API_KEY }}\"' \
diff --git a/foobar2000/SDK/foobar2000_SDK.xcodeproj/xcuserdata/rand.xcuserdatad/xcschemes/xcschememanagement.plist b/foobar2000/SDK/foobar2000_SDK.xcodeproj/xcuserdata/rand.xcuserdatad/xcschemes/xcschememanagement.plist
index ac36bfb..3ab0a65 100644
--- a/foobar2000/SDK/foobar2000_SDK.xcodeproj/xcuserdata/rand.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/foobar2000/SDK/foobar2000_SDK.xcodeproj/xcuserdata/rand.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -7,7 +7,7 @@
foobar2000_SDK.xcscheme_^#shared#^_
orderHint
- 1
+ 2
diff --git a/foobar2000/foo_mac_scrobble/Mac/fooLastfmMacPreferences.mm b/foobar2000/foo_mac_scrobble/Mac/fooLastfmMacPreferences.mm
index ec1b47f..8f99338 100644
--- a/foobar2000/foo_mac_scrobble/Mac/fooLastfmMacPreferences.mm
+++ b/foobar2000/foo_mac_scrobble/Mac/fooLastfmMacPreferences.mm
@@ -32,14 +32,56 @@ @interface fooLastfmMacPreferences ()
@implementation fooLastfmMacPreferences
+- (instancetype)init {
+ self = [super init];
+ if (self) {
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: fooLastfmMacPreferences init called";
+ }
+ }
+ return self;
+}
+
+- (void)loadView {
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: loadView called";
+ }
+
+ // Create view manually for macOS 12 compatibility
+ NSView* mainView = [[NSView alloc] init];
+ // Don't set translatesAutoresizingMaskIntoConstraints:NO for main view
+ self.view = mainView;
+
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: loadView completed";
+ }
+}
+
- (void)viewDidLoad {
[super viewDidLoad];
+
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: viewDidLoad called";
+ FB2K_console_formatter() << "Last.fm UI: macOS version: " << [[NSProcessInfo processInfo].operatingSystemVersionString UTF8String];
+ FB2K_console_formatter() << "Last.fm UI: view frame: " << NSStringFromRect(self.view.frame).UTF8String;
+ }
+
[self setupUI];
showingSecrets = NO;
+
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: viewDidLoad completed";
+ }
}
- (void)viewWillAppear {
[super viewWillAppear];
+
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: viewWillAppear called";
+ FB2K_console_formatter() << "Last.fm UI: view bounds: " << NSStringFromRect(self.view.bounds).UTF8String;
+ FB2K_console_formatter() << "Last.fm UI: view subviews count: " << (int)self.view.subviews.count;
+ }
// Load current settings from configuration
realApiKey = foo_lastfm::cfg_api_key.get();
@@ -65,21 +107,41 @@ - (void)viewWillAppear {
}
- (void)setupUI {
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: setupUI started";
+ }
+
// Create main stack view for organizing UI elements
NSStackView* stackView = [[NSStackView alloc] init];
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: NSStackView created";
+ }
+
[stackView setOrientation:NSUserInterfaceLayoutOrientationVertical];
[stackView setAlignment:NSLayoutAttributeLeading];
[stackView setSpacing:8];
[stackView setTranslatesAutoresizingMaskIntoConstraints:NO];
+
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: NSStackView configured";
+ }
+
[self.view addSubview:stackView];
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: NSStackView added to view";
+ }
- // Set standard system margins
- CGFloat inset = 19.0; // Adjustable margin size
+ // Set standard margins
+ CGFloat inset = 19.0;
[stackView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor constant:inset].active = YES;
[stackView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor constant:-inset].active = YES;
[stackView.topAnchor constraintEqualToAnchor:self.view.topAnchor constant:inset].active = YES;
[stackView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor constant:-inset].active = YES;
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: NSStackView constraints set";
+ }
+
// Add title label
NSTextField* titleLabel = [[NSTextField alloc] init];
[titleLabel setStringValue:@"Last.fm Scrobbler Settings"];
@@ -88,6 +150,11 @@ - (void)setupUI {
[titleLabel setEditable:NO];
[titleLabel setFont:[NSFont systemFontOfSize:15]];
[stackView addArrangedSubview:titleLabel];
+
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: Title label added";
+ FB2K_console_formatter() << "Last.fm UI: StackView arranged subviews count: " << (int)stackView.arrangedSubviews.count;
+ }
// Add spacer
NSView* spacer1 = [[NSView alloc] init];
@@ -221,6 +288,12 @@ - (void)setupUI {
// Update status label after UI setup
[self updateStatusLabel];
+
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: setupUI completed";
+ FB2K_console_formatter() << "Last.fm UI: Final stackView subviews count: " << (int)stackView.arrangedSubviews.count;
+ FB2K_console_formatter() << "Last.fm UI: View hierarchy ready";
+ }
}
- (void)updateStatusLabel {
@@ -620,7 +693,18 @@ - (IBAction)onAuthenticateClicked:(id)sender {
class preferences_page_lastfm : public preferences_page {
public:
service_ptr instantiate() override {
- return fb2k::wrapNSObject([fooLastfmMacPreferences new]);
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: preferences_page instantiate() called";
+ }
+ auto controller = [fooLastfmMacPreferences new];
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: fooLastfmMacPreferences controller created";
+ }
+ auto wrapped = fb2k::wrapNSObject(controller);
+ if (foo_lastfm::cfg_debug_enabled.get()) {
+ FB2K_console_formatter() << "Last.fm UI: NSObject wrapped for foobar2000";
+ }
+ return wrapped;
}
const char* get_name() override { return "Last.fm Scrobbler"; }
GUID get_guid() override {
diff --git a/foobar2000/foo_mac_scrobble/foo_mac_scrobble.xcodeproj/project.pbxproj b/foobar2000/foo_mac_scrobble/foo_mac_scrobble.xcodeproj/project.pbxproj
index 9b7b281..41bdb27 100644
--- a/foobar2000/foo_mac_scrobble/foo_mac_scrobble.xcodeproj/project.pbxproj
+++ b/foobar2000/foo_mac_scrobble/foo_mac_scrobble.xcodeproj/project.pbxproj
@@ -535,7 +535,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
LIBRARY_SEARCH_PATHS = "$(inherited)";
MACOSX_DEPLOYMENT_TARGET = 15.6;
- MARKETING_VERSION = 0.1.3;
+ MARKETING_VERSION = 0.1.4;
OTHER_LDFLAGS = "-lcurl";
PRODUCT_BUNDLE_IDENTIFIER = "com.foobar2000.foo-mac-scrobble";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -565,7 +565,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
LIBRARY_SEARCH_PATHS = "$(inherited)";
MACOSX_DEPLOYMENT_TARGET = 15.6;
- MARKETING_VERSION = 0.1.3;
+ MARKETING_VERSION = 0.1.4;
OTHER_LDFLAGS = "-lcurl";
PRODUCT_BUNDLE_IDENTIFIER = "com.foobar2000.foo-mac-scrobble";
PRODUCT_NAME = "$(TARGET_NAME)";
diff --git a/foobar2000/foo_mac_scrobble/lastfm_api.cpp b/foobar2000/foo_mac_scrobble/lastfm_api.cpp
index e0b7cbe..8783231 100644
--- a/foobar2000/foo_mac_scrobble/lastfm_api.cpp
+++ b/foobar2000/foo_mac_scrobble/lastfm_api.cpp
@@ -347,7 +347,7 @@ bool LastfmApi::send_api_request(const std::map& param
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 15L);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 5L);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 0L);
- curl_easy_setopt(curl, CURLOPT_USERAGENT, "foo_mac_scrobble/0.1.3 (macOS)");
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, "foo_mac_scrobble/0.1.4 (macOS)");
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
// Log request details for debugging
@@ -364,7 +364,7 @@ bool LastfmApi::send_api_request(const std::map& param
FB2K_console_formatter() << "CURLOPT_TIMEOUT: 15";
FB2K_console_formatter() << "CURLOPT_CONNECTTIMEOUT: 5";
FB2K_console_formatter() << "CURLOPT_FOLLOWLOCATION: 0";
- FB2K_console_formatter() << "CURLOPT_USERAGENT: foo_mac_scrobble/0.1.3 (macOS)";
+ FB2K_console_formatter() << "CURLOPT_USERAGENT: foo_mac_scrobble/0.1.4 (macOS)";
FB2K_console_formatter() << "CURLOPT_ACCEPT_ENCODING: ";
FB2K_console_formatter() << "Post data length: " << (int)post_data.size();
FB2K_console_formatter() << "----------------------------";
diff --git a/foobar2000/foo_mac_scrobble/main.cpp b/foobar2000/foo_mac_scrobble/main.cpp
index 42dabb4..03b428b 100644
--- a/foobar2000/foo_mac_scrobble/main.cpp
+++ b/foobar2000/foo_mac_scrobble/main.cpp
@@ -7,7 +7,7 @@
// update finder to find updates; for that to work, you must have ONLY ONE declaration per DLL. If there are multiple
// declarations, the component is assumed to be outdated and a version number of "0" is assumed, to overwrite the
// component with whatever is currently on the site assuming that it comes with proper version numbers.
-DECLARE_COMPONENT_VERSION("Last.fm Scrobbler", "0.1.3",
+DECLARE_COMPONENT_VERSION("Last.fm Scrobbler", "0.1.4",
"Last.fm scrobbler for foobar2000 on macOS\n"
"\n"
"Automatically scrobbles tracks to Last.fm\n"
diff --git a/foobar2000/foobar2000_component_client/foobar2000_component_client.xcodeproj/xcuserdata/rand.xcuserdatad/xcschemes/xcschememanagement.plist b/foobar2000/foobar2000_component_client/foobar2000_component_client.xcodeproj/xcuserdata/rand.xcuserdatad/xcschemes/xcschememanagement.plist
index fca180d..fdb02ac 100644
--- a/foobar2000/foobar2000_component_client/foobar2000_component_client.xcodeproj/xcuserdata/rand.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/foobar2000/foobar2000_component_client/foobar2000_component_client.xcodeproj/xcuserdata/rand.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -7,7 +7,7 @@
foobar2000_component_client.xcscheme_^#shared#^_
orderHint
- 3
+ 1
diff --git a/pfc/pfc.xcodeproj/xcuserdata/rand.xcuserdatad/xcschemes/xcschememanagement.plist b/pfc/pfc.xcodeproj/xcuserdata/rand.xcuserdatad/xcschemes/xcschememanagement.plist
index f67e5e2..73bb534 100644
--- a/pfc/pfc.xcodeproj/xcuserdata/rand.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/pfc/pfc.xcodeproj/xcuserdata/rand.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -7,12 +7,12 @@
pfc-Mac.xcscheme_^#shared#^_
orderHint
- 5
+ 3
pfc-iOS.xcscheme_^#shared#^_
orderHint
- 2
+ 5