Skip to content

Commit

Permalink
fix: ipad musixmatch token invalid
Browse files Browse the repository at this point in the history
also: workflow_dispatch for build action, UIDevice extension as suggested, and settings VC fix by removing padding
  • Loading branch information
asdfzxcvbn committed Jun 16, 2024
1 parent c49b8b3 commit 28a5957
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/build-swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "swift" ]
pull_request:
branches: [ "swift" ]
workflow_dispatch:

jobs:
build:
Expand All @@ -16,10 +17,15 @@ jobs:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.3'

- name: Install Theos
run: bash -c "$(curl -fsSL https://raw.githubusercontent.com/theos/theos/master/bin/install-theos)"


- name: Setup Theos
uses: actions/[email protected]
with:
repository: theos/theos
ref: 16f19fb1da4322513a9ad0283c12f418121773d1
path: ${{ github.workspace }}/theos
submodules: recursive

- name: Copy SwiftProtobuf (rootful)
run: |
mkdir swiftprotobuf && cd "$_"
Expand All @@ -36,9 +42,9 @@ jobs:
tar -xvf data.tar.lzma
cp -r var/jb/Library/Frameworks/SwiftProtobuf.framework $THEOS/lib/iphone/rootless
- name: Install make
- name: Install Dependencies
run: |
brew install make
brew install make dpkg ldid
echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
- name: Build EeveeSpotify (debug)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ struct MusixmatchLyricsDataSource {
var finalQuery = query

finalQuery["usertoken"] = UserDefaults.musixmatchToken
finalQuery["app_id"] = "mac-ios-v2.0"
finalQuery["app_id"] = UIDevice.current.isIpad
? "mac-ios-ipad-v1.0" : "mac-ios-v2.0"

let queryString = finalQuery.queryString.addingPercentEncoding(
withAllowedCharacters: .urlHostAllowed
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import UIKit

extension UIDevice {
var isIpad: Bool {
self.userInterfaceIdiom == .pad
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ struct EeveeSettingsView: View {

.listStyle(GroupedListStyle())

.padding(.bottom, 60)
.ignoresSafeArea(.keyboard)

.animation(.default, value: lyricsSource)
Expand Down

0 comments on commit 28a5957

Please sign in to comment.