Skip to content

Commit

Permalink
modify: add carthage for dependencies managing
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelRow committed Sep 16, 2017
1 parent ec26b3d commit 597e5e0
Show file tree
Hide file tree
Showing 79 changed files with 2,282 additions and 2,067 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Pods
LyricsX.xcodeproj/xcuserdata
LyricsX.xcworkspace/xcuserdata
Carthage
Cartfile.resolved
6 changes: 4 additions & 2 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
github "SnapKit/SnapKit" ~> 3.2.0
github "SnapKit/SnapKit"
github "rs/SDWebImage"
github "Alamofire/Alamofire" ~> 4.5
github "Alamofire/Alamofire" ~> 4.5.1
github "MichaelRow/MusicPlayer"
github "MichaelRow/OpenCC"
160 changes: 52 additions & 108 deletions LyricsX.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

40 changes: 34 additions & 6 deletions LyricsX/ApplicationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@
//

import Cocoa
import MusicPlayer

class ApplicationController: LyricsManagerDelegate {
class ApplicationController: LyricsManagerDelegate, MusicPlayerManagerDelegate {

private var statusMenu: StatusMenuController
private var tracker: TrackerManager
private var tracker: MusicPlayerManager

let manager = LyricsManager()

init() {
// code for test
statusMenu = StatusMenuController()
statusMenu.setupStatusMenu()
tracker = TrackerManager()
tracker.add(player: .iTunes, priority: .High, shouldStart: true)
tracker.add(player: .VOX, priority: .High, shouldStart: true)


tracker = MusicPlayerManager()
tracker.add(musicPlayers: [.iTunes, .spotify, .vox])
tracker.delegate = self

manager.delegate = self
let info = SongBasicInfo(title: "only my railgun", artist: "fripside", album: nil, duration: 257000)
Expand All @@ -39,4 +40,31 @@ class ApplicationController: LyricsManagerDelegate {
func lyricsManager(_ manager: LyricsManager, didUpdate lyrics: Lyrics) {
print(lyrics)
}

func manager(_ manager: MusicPlayerManager, trackingPlayer player: MusicPlayer, didChangeTrack track: MusicTrack, atPosition position: TimeInterval) {
print(player.name.rawValue + " change Track: " + track.title)
}

func manager(_ manager: MusicPlayerManager, trackingPlayer player: MusicPlayer, playbackStateChanged playbackState: MusicPlaybackState, atPosition position: TimeInterval) {
switch playbackState {
case .paused:
print(player.name.rawValue + " paused")
case .playing:
print(player.name.rawValue + " playing")
case .fastForwarding:
print(player.name.rawValue + " forward")
case .rewinding:
print(player.name.rawValue + " rewind")
case .stopped:
print(player.name.rawValue + " stopped")
}
}

func manager(_ manager: MusicPlayerManager, trackingPlayerDidQuit player: MusicPlayer) {
print(player.name.rawValue + " quit")
}

func manager(_ manager: MusicPlayerManager, trackingPlayerDidChange player: MusicPlayer) {
print(player.name.rawValue + ": change player")
}
}
2 changes: 0 additions & 2 deletions LyricsX/LyricsX-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@
// Use this file to import your target's public headers that you would like to expose to Swift.
//

#import "iTunesBridge.h"
#import "VOXBridge.h"
#import "Archiver.h"
#import "QianqianDecrypt.h"
1 change: 0 additions & 1 deletion LyricsX/OpenCC.framework/OpenCC

This file was deleted.

23 changes: 0 additions & 23 deletions LyricsX/OpenCC.framework/Versions/A/Headers/ChineseConverter.h

This file was deleted.

19 changes: 0 additions & 19 deletions LyricsX/OpenCC.framework/Versions/A/Headers/OpenCC.h

This file was deleted.

6 changes: 0 additions & 6 deletions LyricsX/OpenCC.framework/Versions/A/Modules/module.modulemap

This file was deleted.

Binary file removed LyricsX/OpenCC.framework/Versions/A/OpenCC
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
33 changes: 0 additions & 33 deletions LyricsX/OpenCC.framework/Versions/A/Resources/hk2s.json

This file was deleted.

33 changes: 0 additions & 33 deletions LyricsX/OpenCC.framework/Versions/A/Resources/s2hk.json

This file was deleted.

22 changes: 0 additions & 22 deletions LyricsX/OpenCC.framework/Versions/A/Resources/s2t.json

This file was deleted.

27 changes: 0 additions & 27 deletions LyricsX/OpenCC.framework/Versions/A/Resources/s2tw.json

This file was deleted.

32 changes: 0 additions & 32 deletions LyricsX/OpenCC.framework/Versions/A/Resources/s2twp.json

This file was deleted.

16 changes: 0 additions & 16 deletions LyricsX/OpenCC.framework/Versions/A/Resources/t2hk.json

This file was deleted.

22 changes: 0 additions & 22 deletions LyricsX/OpenCC.framework/Versions/A/Resources/t2s.json

This file was deleted.

16 changes: 0 additions & 16 deletions LyricsX/OpenCC.framework/Versions/A/Resources/t2tw.json

This file was deleted.

33 changes: 0 additions & 33 deletions LyricsX/OpenCC.framework/Versions/A/Resources/tw2s.json

This file was deleted.

Loading

0 comments on commit 597e5e0

Please sign in to comment.