mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
Compare commits
No commits in common. "0a318ce81e6aff8d00c6cf9edcf8fd1a24572133" and "deb34d6c3de29f36719677f9bad5151e6bbd7f5c" have entirely different histories.
0a318ce81e
...
deb34d6c3d
@ -54,9 +54,6 @@
|
||||
E440519C227BAF2E0090CD6F /* UIActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E440519B227BAF2E0090CD6F /* UIActions.swift */; };
|
||||
E440519E227BB0720090CD6F /* UIReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E440519D227BB0720090CD6F /* UIReducer.swift */; };
|
||||
E44051A0227BB0AB0090CD6F /* UIState.swift in Sources */ = {isa = PBXBuildFile; fileRef = E440519F227BB0AB0090CD6F /* UIState.swift */; };
|
||||
E442CCCD2347E73C00004E0C /* Artist.swift in Sources */ = {isa = PBXBuildFile; fileRef = E442CCCC2347E73C00004E0C /* Artist.swift */; };
|
||||
E442CCCF2347E90800004E0C /* ArtistViewItem.xib in Resources */ = {isa = PBXBuildFile; fileRef = E442CCCE2347E90800004E0C /* ArtistViewItem.xib */; };
|
||||
E442CCD12347EAEB00004E0C /* ArtistViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E442CCD02347EAEB00004E0C /* ArtistViewItem.swift */; };
|
||||
E450AD7E222620A10091BED3 /* Album.swift in Sources */ = {isa = PBXBuildFile; fileRef = E450AD7D222620A10091BED3 /* Album.swift */; };
|
||||
E450AD9522262DF10091BED3 /* CoverArtQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = E450AD9422262DF10091BED3 /* CoverArtQueue.swift */; };
|
||||
E451E36B22BD214D008BE9B2 /* DraggedSongType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E451E36A22BD214D008BE9B2 /* DraggedSongType.swift */; };
|
||||
@ -70,8 +67,9 @@
|
||||
E47E2FD122205C4600F747E6 /* MainSplitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FD022205C4600F747E6 /* MainSplitViewController.swift */; };
|
||||
E47E2FD322205D2500F747E6 /* MainWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FD222205D2500F747E6 /* MainWindow.swift */; };
|
||||
E47E2FD5222071FD00F747E6 /* AlbumViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FD4222071FD00F747E6 /* AlbumViewItem.swift */; };
|
||||
E47E2FD72220720300F747E6 /* AlbumItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FD62220720300F747E6 /* AlbumItemView.swift */; };
|
||||
E47E2FDD2220A6D100F747E6 /* Time.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FDC2220A6D100F747E6 /* Time.swift */; };
|
||||
E47E2FE52220AA0700F747E6 /* FlexibleGridViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FE42220AA0700F747E6 /* FlexibleGridViewLayout.swift */; };
|
||||
E47E2FE52220AA0700F747E6 /* AlbumViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FE42220AA0700F747E6 /* AlbumViewLayout.swift */; };
|
||||
E489E39922B85D0400CA8CBD /* NSPasteboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = E489E39822B85D0400CA8CBD /* NSPasteboard.swift */; };
|
||||
E489E39D22B9CF0000CA8CBD /* NSView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E489E39C22B9CF0000CA8CBD /* NSView.swift */; };
|
||||
E489E3A422B9D31800CA8CBD /* DraggedSongView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E489E3A222B9D31800CA8CBD /* DraggedSongView.swift */; };
|
||||
@ -105,8 +103,11 @@
|
||||
E4B11BC02275EE150075461B /* QueueActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4B11BBF2275EE150075461B /* QueueActions.swift */; };
|
||||
E4B11BC22275EE410075461B /* AlbumListActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4B11BC12275EE410075461B /* AlbumListActions.swift */; };
|
||||
E4B5AE7E22F4C49600CCEC65 /* MPDServerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4B5AE7D22F4C49600CCEC65 /* MPDServerDelegate.swift */; };
|
||||
E4BBD2E923356DC100702C16 /* BrowseViewButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4BBD2E823356DC100702C16 /* BrowseViewButton.swift */; };
|
||||
E4BBD2EB2335735500702C16 /* BrowseController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4BBD2EA2335735500702C16 /* BrowseController.swift */; };
|
||||
E4BBD2ED2335798E00702C16 /* ArtistViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4BBD2EC2335798E00702C16 /* ArtistViewController.swift */; };
|
||||
E4BBD2F0233579EF00702C16 /* ArtistViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4BBD2EE233579EF00702C16 /* ArtistViewItem.swift */; };
|
||||
E4BBD2F1233579EF00702C16 /* ArtistViewItem.xib in Resources */ = {isa = PBXBuildFile; fileRef = E4BBD2EF233579EF00702C16 /* ArtistViewItem.xib */; };
|
||||
E4BBD2F323357C0700702C16 /* ArtistListState.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4BBD2F223357C0700702C16 /* ArtistListState.swift */; };
|
||||
E4C8B53C22342005009A20F3 /* PreferencesWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4C8B53B22342005009A20F3 /* PreferencesWindowController.swift */; };
|
||||
E4C8B53E22349002009A20F3 /* MPDIdle.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4C8B53D22349002009A20F3 /* MPDIdle.swift */; };
|
||||
@ -118,10 +119,6 @@
|
||||
E4E96D13233E630800AFD36F /* PMKFoundation in Frameworks */ = {isa = PBXBuildFile; productRef = E4E96D12233E630800AFD36F /* PMKFoundation */; };
|
||||
E4EB2379220F10B8008C70C0 /* MPDPair.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4EB2378220F10B8008C70C0 /* MPDPair.swift */; };
|
||||
E4EB237B220F7CF1008C70C0 /* MPDAlbum.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4EB237A220F7CF1008C70C0 /* MPDAlbum.swift */; };
|
||||
E4F26F732341166200D45FF9 /* ArtistDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F26F722341166200D45FF9 /* ArtistDataSource.swift */; };
|
||||
E4F26F7723411AE300D45FF9 /* ArtistListActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F26F7623411AE300D45FF9 /* ArtistListActions.swift */; };
|
||||
E4F26F7923411B1500D45FF9 /* ArtistReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F26F7823411B1500D45FF9 /* ArtistReducer.swift */; };
|
||||
E4F26F7B23411D5400D45FF9 /* MPDClient+Artist.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F26F7A23411D5400D45FF9 /* MPDClient+Artist.swift */; };
|
||||
E4F6B460221E119B00ACF42A /* QueueDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F6B45F221E119B00ACF42A /* QueueDataSource.swift */; };
|
||||
E4F6B463221E125900ACF42A /* QueueItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F6B462221E125900ACF42A /* QueueItem.swift */; };
|
||||
E4F6B467221E233200ACF42A /* AlbumDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F6B466221E233200ACF42A /* AlbumDataSource.swift */; };
|
||||
@ -263,9 +260,6 @@
|
||||
E440519B227BAF2E0090CD6F /* UIActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIActions.swift; sourceTree = "<group>"; };
|
||||
E440519D227BB0720090CD6F /* UIReducer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIReducer.swift; sourceTree = "<group>"; };
|
||||
E440519F227BB0AB0090CD6F /* UIState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIState.swift; sourceTree = "<group>"; };
|
||||
E442CCCC2347E73C00004E0C /* Artist.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Artist.swift; sourceTree = "<group>"; };
|
||||
E442CCCE2347E90800004E0C /* ArtistViewItem.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ArtistViewItem.xib; path = "Persephone/Components/Browser/Artist Browser/ArtistViewItem.xib"; sourceTree = SOURCE_ROOT; };
|
||||
E442CCD02347EAEB00004E0C /* ArtistViewItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ArtistViewItem.swift; path = "Persephone/Components/Browser/Artist Browser/ArtistViewItem.swift"; sourceTree = SOURCE_ROOT; };
|
||||
E450AD7D222620A10091BED3 /* Album.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Album.swift; sourceTree = "<group>"; };
|
||||
E450AD9422262DF10091BED3 /* CoverArtQueue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoverArtQueue.swift; sourceTree = "<group>"; };
|
||||
E450AD9E2229B9BC0091BED3 /* PersephoneBridgingHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PersephoneBridgingHeader.h; sourceTree = "<group>"; };
|
||||
@ -279,8 +273,9 @@
|
||||
E47E2FD022205C4600F747E6 /* MainSplitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainSplitViewController.swift; sourceTree = "<group>"; };
|
||||
E47E2FD222205D2500F747E6 /* MainWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainWindow.swift; sourceTree = "<group>"; };
|
||||
E47E2FD4222071FD00F747E6 /* AlbumViewItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlbumViewItem.swift; sourceTree = "<group>"; };
|
||||
E47E2FD62220720300F747E6 /* AlbumItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlbumItemView.swift; sourceTree = "<group>"; };
|
||||
E47E2FDC2220A6D100F747E6 /* Time.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Time.swift; sourceTree = "<group>"; };
|
||||
E47E2FE42220AA0700F747E6 /* FlexibleGridViewLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlexibleGridViewLayout.swift; sourceTree = "<group>"; };
|
||||
E47E2FE42220AA0700F747E6 /* AlbumViewLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlbumViewLayout.swift; sourceTree = "<group>"; };
|
||||
E489E39822B85D0400CA8CBD /* NSPasteboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSPasteboard.swift; sourceTree = "<group>"; };
|
||||
E489E39C22B9CF0000CA8CBD /* NSView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSView.swift; sourceTree = "<group>"; };
|
||||
E489E3A222B9D31800CA8CBD /* DraggedSongView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DraggedSongView.swift; sourceTree = "<group>"; };
|
||||
@ -307,8 +302,11 @@
|
||||
E4B11BBF2275EE150075461B /* QueueActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QueueActions.swift; sourceTree = "<group>"; };
|
||||
E4B11BC12275EE410075461B /* AlbumListActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlbumListActions.swift; sourceTree = "<group>"; };
|
||||
E4B5AE7D22F4C49600CCEC65 /* MPDServerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPDServerDelegate.swift; sourceTree = "<group>"; };
|
||||
E4BBD2E823356DC100702C16 /* BrowseViewButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowseViewButton.swift; sourceTree = "<group>"; };
|
||||
E4BBD2EA2335735500702C16 /* BrowseController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowseController.swift; sourceTree = "<group>"; };
|
||||
E4BBD2EC2335798E00702C16 /* ArtistViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistViewController.swift; sourceTree = "<group>"; };
|
||||
E4BBD2EE233579EF00702C16 /* ArtistViewItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistViewItem.swift; sourceTree = "<group>"; };
|
||||
E4BBD2EF233579EF00702C16 /* ArtistViewItem.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ArtistViewItem.xib; sourceTree = "<group>"; };
|
||||
E4BBD2F223357C0700702C16 /* ArtistListState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistListState.swift; sourceTree = "<group>"; };
|
||||
E4C8B53B22342005009A20F3 /* PreferencesWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesWindowController.swift; sourceTree = "<group>"; };
|
||||
E4C8B53D22349002009A20F3 /* MPDIdle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPDIdle.swift; sourceTree = "<group>"; };
|
||||
@ -319,10 +317,6 @@
|
||||
E4E8CC9922075D370024217A /* MPDSong.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPDSong.swift; sourceTree = "<group>"; };
|
||||
E4EB2378220F10B8008C70C0 /* MPDPair.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPDPair.swift; sourceTree = "<group>"; };
|
||||
E4EB237A220F7CF1008C70C0 /* MPDAlbum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPDAlbum.swift; sourceTree = "<group>"; };
|
||||
E4F26F722341166200D45FF9 /* ArtistDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistDataSource.swift; sourceTree = "<group>"; };
|
||||
E4F26F7623411AE300D45FF9 /* ArtistListActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistListActions.swift; sourceTree = "<group>"; };
|
||||
E4F26F7823411B1500D45FF9 /* ArtistReducer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistReducer.swift; sourceTree = "<group>"; };
|
||||
E4F26F7A23411D5400D45FF9 /* MPDClient+Artist.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MPDClient+Artist.swift"; sourceTree = "<group>"; };
|
||||
E4F6B45F221E119B00ACF42A /* QueueDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QueueDataSource.swift; sourceTree = "<group>"; };
|
||||
E4F6B462221E125900ACF42A /* QueueItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QueueItem.swift; sourceTree = "<group>"; };
|
||||
E4F6B466221E233200ACF42A /* AlbumDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlbumDataSource.swift; sourceTree = "<group>"; };
|
||||
@ -393,19 +387,25 @@
|
||||
E407861A2110CE6E006887B1 /* Persephone */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E44051932278765A0090CD6F /* App.swift */,
|
||||
E407861B2110CE6E006887B1 /* AppDelegate.swift */,
|
||||
E44051932278765A0090CD6F /* App.swift */,
|
||||
E407861F2110CE70006887B1 /* Assets.xcassets */,
|
||||
E442CCC42347D5B900004E0C /* Components */,
|
||||
E4D1B597220BA3A20026F233 /* Controllers */,
|
||||
E4F6B45E221E117600ACF42A /* DataSources */,
|
||||
E408D3B7220DE8CC0006D9BE /* Extensions */,
|
||||
E41B22C721FB966C00D544F6 /* include */,
|
||||
E40786242110CE70006887B1 /* Info.plist */,
|
||||
E47E2FE32220AA0700F747E6 /* Layouts */,
|
||||
E4F6B461221E124700ACF42A /* Models */,
|
||||
E4A642DB220912FA00067D21 /* MPDClient */,
|
||||
E450AD8922262B420091BED3 /* Operations */,
|
||||
E40786252110CE70006887B1 /* Persephone.entitlements */,
|
||||
E450AD9E2229B9BC0091BED3 /* PersephoneBridgingHeader.h */,
|
||||
E4A83BEC2221F5DD0098FED6 /* Preferences */,
|
||||
E4D1B598220BA3C90026F233 /* Resources */,
|
||||
E4A83BF2222207BE0098FED6 /* Services */,
|
||||
E4B11B64226A4F460075461B /* State */,
|
||||
E408D3C3220E138B0006D9BE /* Views */,
|
||||
);
|
||||
path = Persephone;
|
||||
sourceTree = "<group>";
|
||||
@ -448,7 +448,6 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E41E530A223C033700173814 /* MPDClient+Album.swift */,
|
||||
E4F26F7A23411D5400D45FF9 /* MPDClient+Artist.swift */,
|
||||
E41E5308223C020400173814 /* MPDClient+Command.swift */,
|
||||
E41E52FC223BF87300173814 /* MPDClient+Connection.swift */,
|
||||
E42410B52241B956005ED6DF /* MPDClient+Database.swift */,
|
||||
@ -463,6 +462,23 @@
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E408D3C3220E138B0006D9BE /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4A3A6A022A457B600EA2C40 /* AlbumDetailSongListView.swift */,
|
||||
E45878372296173C00586A1C /* AlbumDetailSongRowView.swift */,
|
||||
E47E2FD62220720300F747E6 /* AlbumItemView.swift */,
|
||||
E4B11BB7227538FA0075461B /* CurrentCoverArtView.swift */,
|
||||
E489E3A222B9D31800CA8CBD /* DraggedSongView.swift */,
|
||||
E47E2FD222205D2500F747E6 /* MainWindow.swift */,
|
||||
E423563F228623D2001216D6 /* QueueSongTitleView.swift */,
|
||||
E4120D6B22AD8139004CB1F8 /* QueueView.swift */,
|
||||
E43AC1F722C7065A001E483C /* AlbumCoverButton.swift */,
|
||||
E4BBD2E823356DC100702C16 /* BrowseViewButton.swift */,
|
||||
);
|
||||
path = Views;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E41B22BE21FB6B3300D544F6 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -532,104 +548,6 @@
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCC42347D5B900004E0C /* Components */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E442CCCB2347D77A00004E0C /* Browser */,
|
||||
E4A83BEC2221F5DD0098FED6 /* Preferences */,
|
||||
E442CCC62347D5E700004E0C /* Queue */,
|
||||
E442CCC92347D6FD00004E0C /* Shared */,
|
||||
E442CCC52347D5CA00004E0C /* Window */,
|
||||
);
|
||||
path = Components;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCC52347D5CA00004E0C /* Window */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E40786212110CE70006887B1 /* Main.storyboard */,
|
||||
E47E2FD022205C4600F747E6 /* MainSplitViewController.swift */,
|
||||
E47E2FD222205D2500F747E6 /* MainWindow.swift */,
|
||||
E465049921E94DF500A70F4C /* WindowController.swift */,
|
||||
);
|
||||
path = Window;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCC62347D5E700004E0C /* Queue */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4B11BB7227538FA0075461B /* CurrentCoverArtView.swift */,
|
||||
E4F6B45F221E119B00ACF42A /* QueueDataSource.swift */,
|
||||
E423563F228623D2001216D6 /* QueueSongTitleView.swift */,
|
||||
E4120D6B22AD8139004CB1F8 /* QueueView.swift */,
|
||||
E4E8CC912204F4B80024217A /* QueueViewController.swift */,
|
||||
E4D3BFA522B419C000C56F48 /* QueueViewController+NSOutlineViewDelegate.swift */,
|
||||
);
|
||||
path = Queue;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCC72347D62F00004E0C /* Album Browser */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E408D3C9220E341D0006D9BE /* AlbumViewItem.xib */,
|
||||
E43AC1F722C7065A001E483C /* AlbumCoverButton.swift */,
|
||||
E4F6B466221E233200ACF42A /* AlbumDataSource.swift */,
|
||||
E408D3C1220E134F0006D9BE /* AlbumViewController.swift */,
|
||||
E43AC1F222C6A439001E483C /* AlbumViewController+NSCollectionViewDelegate.swift */,
|
||||
E47E2FD4222071FD00F747E6 /* AlbumViewItem.swift */,
|
||||
);
|
||||
path = "Album Browser";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCC82347D65300004E0C /* Album Detail */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E43B67A922909793007DCF55 /* AlbumDetailView.xib */,
|
||||
E4A3A6A022A457B600EA2C40 /* AlbumDetailSongListView.swift */,
|
||||
E45878372296173C00586A1C /* AlbumDetailSongRowView.swift */,
|
||||
E43B67A822909793007DCF55 /* AlbumDetailView.swift */,
|
||||
E4E7A6AC22AAAF98006D566C /* AlbumDetailView+NSTableViewDelegate.swift */,
|
||||
E43B67AC229194CD007DCF55 /* AlbumTracksDataSource.swift */,
|
||||
);
|
||||
path = "Album Detail";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCC92347D6FD00004E0C /* Shared */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4E13C2C2350D8CB00092A6E /* Layouts */,
|
||||
E408D3B7220DE8CC0006D9BE /* Extensions */,
|
||||
E489E3A222B9D31800CA8CBD /* DraggedSongView.swift */,
|
||||
E489E3A322B9D31800CA8CBD /* DraggedSongView.xib */,
|
||||
E4405191227644340090CD6F /* MPDServerController.swift */,
|
||||
E4B5AE7D22F4C49600CCEC65 /* MPDServerDelegate.swift */,
|
||||
E4B11BB52275374B0075461B /* UserNotificationsController.swift */,
|
||||
);
|
||||
path = Shared;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCCA2347D74B00004E0C /* Artist Browser */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E442CCCE2347E90800004E0C /* ArtistViewItem.xib */,
|
||||
E4F26F722341166200D45FF9 /* ArtistDataSource.swift */,
|
||||
E442CCD02347EAEB00004E0C /* ArtistViewItem.swift */,
|
||||
E4BBD2EC2335798E00702C16 /* ArtistViewController.swift */,
|
||||
);
|
||||
path = "Artist Browser";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCCB2347D77A00004E0C /* Browser */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E442CCC82347D65300004E0C /* Album Detail */,
|
||||
E442CCC72347D62F00004E0C /* Album Browser */,
|
||||
E442CCCA2347D74B00004E0C /* Artist Browser */,
|
||||
E4BBD2EA2335735500702C16 /* BrowseController.swift */,
|
||||
);
|
||||
path = Browser;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E450AD8922262B420091BED3 /* Operations */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -638,6 +556,14 @@
|
||||
path = Operations;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E47E2FE32220AA0700F747E6 /* Layouts */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E47E2FE42220AA0700F747E6 /* AlbumViewLayout.swift */,
|
||||
);
|
||||
path = Layouts;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4A642DB220912FA00067D21 /* MPDClient */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -650,6 +576,14 @@
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4A83BEC2221F5DD0098FED6 /* Preferences */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4A83BED2221F5E60098FED6 /* Controllers */,
|
||||
);
|
||||
path = Preferences;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4A83BED2221F5E60098FED6 /* Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4A83BEE2221F8CF0098FED6 /* CoverArtPrefsController.swift */,
|
||||
@ -657,15 +591,15 @@
|
||||
E4A83BF02221FAA00098FED6 /* PreferencesViewController.swift */,
|
||||
E4C8B53B22342005009A20F3 /* PreferencesWindowController.swift */,
|
||||
);
|
||||
path = Preferences;
|
||||
path = Controllers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4A83BF2222207BE0098FED6 /* Services */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E41E530C223EF4BA00173814 /* Extensions */,
|
||||
E4A83BF3222207D50098FED6 /* CoverArtService.swift */,
|
||||
E439109722640213002982E9 /* SongNotifierService.swift */,
|
||||
E41E530C223EF4BA00173814 /* Extensions */,
|
||||
);
|
||||
path = Services;
|
||||
sourceTree = "<group>";
|
||||
@ -673,12 +607,11 @@
|
||||
E4B11B5F226A4BED0075461B /* Reducers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4B11B78226D346B0075461B /* AlbumListReducer.swift */,
|
||||
E4B11B62226A4C510075461B /* AppReducer.swift */,
|
||||
E4F26F7823411B1500D45FF9 /* ArtistReducer.swift */,
|
||||
E4B11B60226A4BFF0075461B /* PlayerReducer.swift */,
|
||||
E4FF718F227601B400D4C412 /* PreferencesReducer.swift */,
|
||||
E4B11B62226A4C510075461B /* AppReducer.swift */,
|
||||
E4B11B74226CC4D30075461B /* QueueReducer.swift */,
|
||||
E4B11B78226D346B0075461B /* AlbumListReducer.swift */,
|
||||
E4FF718F227601B400D4C412 /* PreferencesReducer.swift */,
|
||||
E440519D227BB0720090CD6F /* UIReducer.swift */,
|
||||
);
|
||||
path = Reducers;
|
||||
@ -689,13 +622,13 @@
|
||||
children = (
|
||||
E4B11B6B226A5AF50075461B /* Actions */,
|
||||
E4B11B5F226A4BED0075461B /* Reducers */,
|
||||
E4B11B69226A4FBC0075461B /* AlbumListState.swift */,
|
||||
E4B11B52226928F20075461B /* AppState.swift */,
|
||||
E4BBD2F223357C0700702C16 /* ArtistListState.swift */,
|
||||
E4B11B65226A4F830075461B /* PlayerState.swift */,
|
||||
E4FF718D2276010E00D4C412 /* PreferencesState.swift */,
|
||||
E4B11B67226A4FA00075461B /* QueueState.swift */,
|
||||
E440519F227BB0AB0090CD6F /* UIState.swift */,
|
||||
E4B11B65226A4F830075461B /* PlayerState.swift */,
|
||||
E4B11B67226A4FA00075461B /* QueueState.swift */,
|
||||
E4B11B69226A4FBC0075461B /* AlbumListState.swift */,
|
||||
E4FF718D2276010E00D4C412 /* PreferencesState.swift */,
|
||||
E4BBD2F223357C0700702C16 /* ArtistListState.swift */,
|
||||
);
|
||||
path = State;
|
||||
sourceTree = "<group>";
|
||||
@ -704,10 +637,9 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4B11BC12275EE410075461B /* AlbumListActions.swift */,
|
||||
E4F26F7623411AE300D45FF9 /* ArtistListActions.swift */,
|
||||
E4B11BBD2275EDAA0075461B /* PlayerActions.swift */,
|
||||
E4FF71912276029000D4C412 /* PreferencesActions.swift */,
|
||||
E4B11BBF2275EE150075461B /* QueueActions.swift */,
|
||||
E4FF71912276029000D4C412 /* PreferencesActions.swift */,
|
||||
E440519B227BAF2E0090CD6F /* UIActions.swift */,
|
||||
);
|
||||
path = Actions;
|
||||
@ -735,28 +667,63 @@
|
||||
path = Protocols;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4E13C2C2350D8CB00092A6E /* Layouts */ = {
|
||||
E4D1B597220BA3A20026F233 /* Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E47E2FE42220AA0700F747E6 /* FlexibleGridViewLayout.swift */,
|
||||
E43B67A822909793007DCF55 /* AlbumDetailView.swift */,
|
||||
E4E7A6AC22AAAF98006D566C /* AlbumDetailView+NSTableViewDelegate.swift */,
|
||||
E408D3C1220E134F0006D9BE /* AlbumViewController.swift */,
|
||||
E43AC1F222C6A439001E483C /* AlbumViewController+NSCollectionViewDelegate.swift */,
|
||||
E47E2FD4222071FD00F747E6 /* AlbumViewItem.swift */,
|
||||
E4BBD2EC2335798E00702C16 /* ArtistViewController.swift */,
|
||||
E4BBD2EE233579EF00702C16 /* ArtistViewItem.swift */,
|
||||
E4BBD2EA2335735500702C16 /* BrowseController.swift */,
|
||||
E47E2FD022205C4600F747E6 /* MainSplitViewController.swift */,
|
||||
E4405191227644340090CD6F /* MPDServerController.swift */,
|
||||
E4B5AE7D22F4C49600CCEC65 /* MPDServerDelegate.swift */,
|
||||
E4E8CC912204F4B80024217A /* QueueViewController.swift */,
|
||||
E4D3BFA522B419C000C56F48 /* QueueViewController+NSOutlineViewDelegate.swift */,
|
||||
E4B11BB52275374B0075461B /* UserNotificationsController.swift */,
|
||||
E465049921E94DF500A70F4C /* WindowController.swift */,
|
||||
);
|
||||
path = Layouts;
|
||||
path = Controllers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4D1B598220BA3C90026F233 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4BBD2EF233579EF00702C16 /* ArtistViewItem.xib */,
|
||||
E43B67A922909793007DCF55 /* AlbumDetailView.xib */,
|
||||
E408D3C9220E341D0006D9BE /* AlbumViewItem.xib */,
|
||||
E489E3A322B9D31800CA8CBD /* DraggedSongView.xib */,
|
||||
E40786212110CE70006887B1 /* Main.storyboard */,
|
||||
);
|
||||
path = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4F6B45E221E117600ACF42A /* DataSources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4F6B466221E233200ACF42A /* AlbumDataSource.swift */,
|
||||
E4F6B45F221E119B00ACF42A /* QueueDataSource.swift */,
|
||||
E43B67AC229194CD007DCF55 /* AlbumTracksDataSource.swift */,
|
||||
);
|
||||
path = DataSources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4F6B461221E124700ACF42A /* Models */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E450AD7D222620A10091BED3 /* Album.swift */,
|
||||
E442CCCC2347E73C00004E0C /* Artist.swift */,
|
||||
E43AC1F422C6A4F4001E483C /* DraggedAlbum.swift */,
|
||||
E451E36C22BD23DB008BE9B2 /* DraggedSong.swift */,
|
||||
E451E36A22BD214D008BE9B2 /* DraggedSongType.swift */,
|
||||
E4B11BA82274EDE30075461B /* Loading.swift */,
|
||||
E4FF71932276043A00D4C412 /* MPDServer.swift */,
|
||||
E4F6B462221E125900ACF42A /* QueueItem.swift */,
|
||||
E419E2862249B96600216A8C /* Song.swift */,
|
||||
E47E2FDC2220A6D100F747E6 /* Time.swift */,
|
||||
E4B11B72226A6C770075461B /* TrackTimer.swift */,
|
||||
E451E36A22BD214D008BE9B2 /* DraggedSongType.swift */,
|
||||
E451E36C22BD23DB008BE9B2 /* DraggedSong.swift */,
|
||||
E43AC1F422C6A4F4001E483C /* DraggedAlbum.swift */,
|
||||
);
|
||||
path = Models;
|
||||
sourceTree = "<group>";
|
||||
@ -905,7 +872,7 @@
|
||||
E40786202110CE70006887B1 /* Assets.xcassets in Resources */,
|
||||
E42A8F3C22176D6400A13ED9 /* README.md in Resources */,
|
||||
E408D3CB220E341D0006D9BE /* AlbumViewItem.xib in Resources */,
|
||||
E442CCCF2347E90800004E0C /* ArtistViewItem.xib in Resources */,
|
||||
E4BBD2F1233579EF00702C16 /* ArtistViewItem.xib in Resources */,
|
||||
E40786232110CE70006887B1 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -963,22 +930,22 @@
|
||||
E4B11B68226A4FA00075461B /* QueueState.swift in Sources */,
|
||||
E4928E0B2218D62A001D4BEA /* CGColor.swift in Sources */,
|
||||
E4BBD2ED2335798E00702C16 /* ArtistViewController.swift in Sources */,
|
||||
E4F26F732341166200D45FF9 /* ArtistDataSource.swift in Sources */,
|
||||
E4D3BFA622B419C000C56F48 /* QueueViewController+NSOutlineViewDelegate.swift in Sources */,
|
||||
E4405192227644340090CD6F /* MPDServerController.swift in Sources */,
|
||||
E4C8B53E22349002009A20F3 /* MPDIdle.swift in Sources */,
|
||||
E4F6B460221E119B00ACF42A /* QueueDataSource.swift in Sources */,
|
||||
E4C8B53C22342005009A20F3 /* PreferencesWindowController.swift in Sources */,
|
||||
E4B11B63226A4C510075461B /* AppReducer.swift in Sources */,
|
||||
E4BBD2F0233579EF00702C16 /* ArtistViewItem.swift in Sources */,
|
||||
E41E5307223C019100173814 /* MPDClient+Status.swift in Sources */,
|
||||
E41E5310223EF6CE00173814 /* CoverArtService+Remote.swift in Sources */,
|
||||
E442CCCD2347E73C00004E0C /* Artist.swift in Sources */,
|
||||
E41E530B223C033700173814 /* MPDClient+Album.swift in Sources */,
|
||||
E42410B62241B956005ED6DF /* MPDClient+Database.swift in Sources */,
|
||||
E4235640228623D2001216D6 /* QueueSongTitleView.swift in Sources */,
|
||||
E451E36E22BD2501008BE9B2 /* DraggedSong.swift in Sources */,
|
||||
E4A642DA22090CBE00067D21 /* MPDStatus.swift in Sources */,
|
||||
E4B11BC02275EE150075461B /* QueueActions.swift in Sources */,
|
||||
E47E2FD72220720300F747E6 /* AlbumItemView.swift in Sources */,
|
||||
E450AD9522262DF10091BED3 /* CoverArtQueue.swift in Sources */,
|
||||
E43B67AD229194CD007DCF55 /* AlbumTracksDataSource.swift in Sources */,
|
||||
E41E52FD223BF87300173814 /* MPDClient+Connection.swift in Sources */,
|
||||
@ -996,7 +963,6 @@
|
||||
E4F6B463221E125900ACF42A /* QueueItem.swift in Sources */,
|
||||
E4A83BF12221FAA00098FED6 /* PreferencesViewController.swift in Sources */,
|
||||
E4B11BC22275EE410075461B /* AlbumListActions.swift in Sources */,
|
||||
E4F26F7B23411D5400D45FF9 /* MPDClient+Artist.swift in Sources */,
|
||||
E4B11B61226A4C000075461B /* PlayerReducer.swift in Sources */,
|
||||
E4FF71922276029000D4C412 /* PreferencesActions.swift in Sources */,
|
||||
E489E39922B85D0400CA8CBD /* NSPasteboard.swift in Sources */,
|
||||
@ -1013,12 +979,12 @@
|
||||
E407861C2110CE6E006887B1 /* AppDelegate.swift in Sources */,
|
||||
E4B11B75226CC4D30075461B /* QueueReducer.swift in Sources */,
|
||||
E41E5309223C020400173814 /* MPDClient+Command.swift in Sources */,
|
||||
E4F26F7923411B1500D45FF9 /* ArtistReducer.swift in Sources */,
|
||||
E4BBD2E923356DC100702C16 /* BrowseViewButton.swift in Sources */,
|
||||
E4B11B73226A6C770075461B /* TrackTimer.swift in Sources */,
|
||||
E4BBD2EB2335735500702C16 /* BrowseController.swift in Sources */,
|
||||
E44051942278765A0090CD6F /* App.swift in Sources */,
|
||||
E4B11B79226D346B0075461B /* AlbumListReducer.swift in Sources */,
|
||||
E47E2FE52220AA0700F747E6 /* FlexibleGridViewLayout.swift in Sources */,
|
||||
E47E2FE52220AA0700F747E6 /* AlbumViewLayout.swift in Sources */,
|
||||
E41E52FF223BF95E00173814 /* MPDClient+Transport.swift in Sources */,
|
||||
E47E2FD322205D2500F747E6 /* MainWindow.swift in Sources */,
|
||||
E47E2FD122205C4600F747E6 /* MainSplitViewController.swift in Sources */,
|
||||
@ -1033,9 +999,7 @@
|
||||
E408D3BE220E03EE0006D9BE /* RawRepresentable.swift in Sources */,
|
||||
E4B11B66226A4F830075461B /* PlayerState.swift in Sources */,
|
||||
E4B11BBE2275EDAA0075461B /* PlayerActions.swift in Sources */,
|
||||
E4F26F7723411AE300D45FF9 /* ArtistListActions.swift in Sources */,
|
||||
E4FF71942276043A00D4C412 /* MPDServer.swift in Sources */,
|
||||
E442CCD12347EAEB00004E0C /* ArtistViewItem.swift in Sources */,
|
||||
E41E530E223EF4CF00173814 /* CoverArtService+Caching.swift in Sources */,
|
||||
E4E8CC922204F4B80024217A /* QueueViewController.swift in Sources */,
|
||||
E440519C227BAF2E0090CD6F /* UIActions.swift in Sources */,
|
||||
@ -1222,7 +1186,10 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = BDEE7ZBFZ3;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Carthage/Build/Mac",
|
||||
);
|
||||
INFOPLIST_FILE = Persephone/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -1250,7 +1217,10 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = BDEE7ZBFZ3;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Carthage/Build/Mac",
|
||||
);
|
||||
INFOPLIST_FILE = Persephone/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
||||
@ -1,70 +0,0 @@
|
||||
{
|
||||
"object": {
|
||||
"pins": [
|
||||
{
|
||||
"package": "CryptoSwift",
|
||||
"repositoryURL": "https://github.com/krzyzanowskim/CryptoSwift",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "3a2acbb32ab68215ee1596ee6004da8e90c3721b",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "Differ",
|
||||
"repositoryURL": "https://github.com/tonyarnold/Differ",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "e2cca36e7258dd8add88ae46b5ea56509b066e21",
|
||||
"version": "1.4.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "PMKFoundation",
|
||||
"repositoryURL": "https://github.com/PromiseKit/Foundation",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "ee06d95342a5007de2fffd898f4f35de026842ac",
|
||||
"version": "3.3.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "MediaKeyTap",
|
||||
"repositoryURL": "https://github.com/danbee/MediaKeyTap",
|
||||
"state": {
|
||||
"branch": "add-package-swift",
|
||||
"revision": "b6b83b1a3e78d25ad9c86a55babce4f60caf6fa4",
|
||||
"version": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "PromiseKit",
|
||||
"repositoryURL": "https://github.com/mxcl/PromiseKit",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "4d8d1287d2e50c53a9f8430ffe88925292838c57",
|
||||
"version": "6.11.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "ReSwift",
|
||||
"repositoryURL": "https://github.com/ReSwift/ReSwift",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "b92762b5aa85c5e94053d942fbd37124ee939e5b",
|
||||
"version": "5.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "SwiftyJSON",
|
||||
"repositoryURL": "https://github.com/SwiftyJSON/SwiftyJSON",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "2b6054efa051565954e1d2b9da831680026cd768",
|
||||
"version": "5.0.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@ -15,5 +15,5 @@ struct App {
|
||||
static let userNotificationsController = UserNotificationsController()
|
||||
static let mpdServerController = MPDServerController()
|
||||
static let mpdServerDelegate = MPDServerDelegate()
|
||||
static var mpdClient: MPDClient!
|
||||
static let mpdClient = MPDClient(withDelegate: mpdServerDelegate)
|
||||
}
|
||||
|
||||
@ -39,13 +39,10 @@ class AppDelegate: NSObject,
|
||||
func connectToMPDServer() {
|
||||
let mpdServer = App.store.state.preferencesState.mpdServer
|
||||
|
||||
App.mpdClient = MPDClient(
|
||||
App.mpdClient.connect(
|
||||
host: mpdServer.hostOrDefault,
|
||||
port: mpdServer.portOrDefault,
|
||||
withDelegate: App.mpdServerDelegate
|
||||
port: mpdServer.portOrDefault
|
||||
)
|
||||
|
||||
App.mpdClient.connect()
|
||||
}
|
||||
|
||||
func instantiateControllers() {
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
//
|
||||
// ArtistDataSource.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/29.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
class ArtistDataSource: NSObject, NSCollectionViewDataSource {
|
||||
var artists: [Artist] = []
|
||||
|
||||
func collectionView(_ collectionView: NSCollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return artists.count
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: NSCollectionView, itemForRepresentedObjectAt indexPath: IndexPath) -> NSCollectionViewItem {
|
||||
let item = collectionView.makeItem(withIdentifier: .artistViewItem, for: indexPath)
|
||||
guard let artistViewItem = item as? ArtistViewItem else { return item }
|
||||
|
||||
artistViewItem.view.wantsLayer = true
|
||||
artistViewItem.setArtist(artists[indexPath.item])
|
||||
|
||||
return artistViewItem
|
||||
}
|
||||
}
|
||||
@ -1,63 +0,0 @@
|
||||
//
|
||||
// ArtistViewController.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/20.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import ReSwift
|
||||
import Differ
|
||||
|
||||
class ArtistViewController: NSViewController,
|
||||
NSCollectionViewDelegateFlowLayout {
|
||||
var dataSource = ArtistDataSource()
|
||||
let layout = FlexibleGridViewLayout(coder: NSCoder())
|
||||
|
||||
@IBOutlet var artistCollectionView: NSCollectionView!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
App.store.subscribe(self) {
|
||||
$0.select { $0.artistListState }
|
||||
}
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(didConnect), name: .didConnect, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(willDisconnect), name: .willDisconnect, object: nil)
|
||||
|
||||
artistCollectionView.dataSource = dataSource
|
||||
layout?.extraHeight = 26
|
||||
artistCollectionView.collectionViewLayout = layout
|
||||
}
|
||||
|
||||
deinit {
|
||||
App.store.unsubscribe(self)
|
||||
}
|
||||
|
||||
@objc func didConnect() {
|
||||
App.mpdClient.fetchAllArtists()
|
||||
}
|
||||
|
||||
@objc func willDisconnect() {
|
||||
DispatchQueue.main.async {
|
||||
App.store.dispatch(UpdateArtistListAction(artists: []))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension ArtistViewController: StoreSubscriber {
|
||||
typealias StoreSubscriberStateType = ArtistListState
|
||||
|
||||
func newState(state: StoreSubscriberStateType) {
|
||||
let oldArtists = dataSource.artists
|
||||
|
||||
dataSource.artists = state.artists
|
||||
|
||||
artistCollectionView.animateItemChanges(
|
||||
oldData: oldArtists,
|
||||
newData: dataSource.artists
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
//
|
||||
// artistViewItem.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/2/08.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
class ArtistViewItem: NSCollectionViewItem {
|
||||
var observer: NSKeyValueObservation?
|
||||
var artist: Artist?
|
||||
|
||||
// override var isSelected: Bool {
|
||||
// didSet {
|
||||
// artistCoverBox.layer?.borderWidth = isSelected ? 5 : 0
|
||||
// }
|
||||
// }
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
//
|
||||
// artistCoverView.wantsLayer = true
|
||||
// artistCoverView.layer?.cornerRadius = 3
|
||||
// artistCoverView.layer?.borderWidth = 1
|
||||
//
|
||||
// artistCoverBox.wantsLayer = true
|
||||
// artistCoverBox.layer?.cornerRadius = 5
|
||||
// artistCoverBox.layer?.borderWidth = 0
|
||||
//
|
||||
// setAppearance()
|
||||
//
|
||||
// if #available(OSX 10.14, *) {
|
||||
// observer = NSApp.observe(\.effectiveAppearance) { (app, _) in
|
||||
// self.setAppearance()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
// override func prepareForReuse() {
|
||||
// super.prepareForReuse()
|
||||
//
|
||||
// artistDetailView.popover.close()
|
||||
// }
|
||||
|
||||
func setArtist(_ artist: Artist) {
|
||||
self.artist = artist
|
||||
artistName.stringValue = artist.name
|
||||
}
|
||||
|
||||
// func setAppearance() {
|
||||
// if #available(OSX 10.14, *) {
|
||||
// let darkMode = NSApp.effectiveAppearance.bestMatch(from:
|
||||
// [.darkAqua, .aqua]) == .darkAqua
|
||||
//
|
||||
// artistCoverView.layer?.borderColor = darkMode ? .albumBorderColorDark : .albumBorderColorLight
|
||||
// artistCoverBox.layer?.borderColor = NSColor.controlAccentColor.cgColor
|
||||
// } else {
|
||||
// artistCoverView.layer?.borderColor = .albumBorderColorLight
|
||||
// artistImageBox.layer?.borderColor = NSColor.selectedControlColor.cgColor
|
||||
// }
|
||||
// }
|
||||
|
||||
@IBOutlet var artistName: NSTextField!
|
||||
}
|
||||
@ -1,80 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14868" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14868"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="ArtistViewItem" customModule="Persephone" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="artistName" destination="KEh-NL-c2W" id="xf0-q9-NIs"/>
|
||||
<outlet property="view" destination="Hz6-mo-xeY" id="v7W-XA-Emc"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView id="Hz6-mo-xeY">
|
||||
<rect key="frame" x="0.0" y="0.0" width="158" height="173"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<box boxType="custom" borderType="none" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="oat-Vd-t1v" userLabel="Artist Cover Box">
|
||||
<rect key="frame" x="5" y="30" width="148" height="138"/>
|
||||
<view key="contentView" wantsLayer="YES" id="h1X-3X-S5v">
|
||||
<rect key="frame" x="0.0" y="0.0" width="148" height="138"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="juD-33-Glf" customClass="AlbumCoverButton" customModule="Persephone" customModuleProvider="target">
|
||||
<rect key="frame" x="5" y="5" width="138" height="128"/>
|
||||
<shadow key="shadow" blurRadius="4">
|
||||
<size key="offset" width="0.0" height="2"/>
|
||||
<color key="color" white="0.0" alpha="0.34603323063380281" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</shadow>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="defaultCoverArt" imagePosition="only" alignment="center" lineBreakMode="truncatingTail" refusesFirstResponder="YES" state="on" transparent="YES" imageScaling="proportionallyUpOrDown" inset="2" id="t8A-Hz-L38">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="juD-33-Glf" firstAttribute="leading" secondItem="h1X-3X-S5v" secondAttribute="leading" constant="5" id="0bH-QU-yNJ"/>
|
||||
<constraint firstItem="juD-33-Glf" firstAttribute="top" secondItem="h1X-3X-S5v" secondAttribute="top" constant="5" id="iOP-iI-5gF"/>
|
||||
<constraint firstAttribute="bottom" secondItem="juD-33-Glf" secondAttribute="bottom" constant="5" id="kaN-bP-Ej1"/>
|
||||
<constraint firstItem="juD-33-Glf" firstAttribute="top" secondItem="h1X-3X-S5v" secondAttribute="top" constant="5" id="rvB-6b-GGM"/>
|
||||
<constraint firstAttribute="trailing" secondItem="juD-33-Glf" secondAttribute="trailing" constant="5" id="suk-y8-rCG"/>
|
||||
<constraint firstItem="juD-33-Glf" firstAttribute="leading" secondItem="h1X-3X-S5v" secondAttribute="leading" constant="5" id="tEg-gx-mw1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="juD-33-Glf" secondAttribute="trailing" constant="5" id="tYM-2j-z4N"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</box>
|
||||
<textField identifier="artistName" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KEh-NL-c2W" userLabel="Artist Name">
|
||||
<rect key="frame" x="8" y="9" width="142" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="17" id="kyh-jb-F0f"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" title="Label" id="pDs-0t-e1j">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="oat-Vd-t1v" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="5" id="KmJ-Lb-i34"/>
|
||||
<constraint firstItem="oat-Vd-t1v" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="bv4-qt-QTu"/>
|
||||
<constraint firstItem="KEh-NL-c2W" firstAttribute="top" secondItem="oat-Vd-t1v" secondAttribute="bottom" constant="4" id="jrN-Au-nkP"/>
|
||||
<constraint firstAttribute="trailing" secondItem="oat-Vd-t1v" secondAttribute="trailing" constant="5" id="n0s-RV-XbI"/>
|
||||
<constraint firstItem="oat-Vd-t1v" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="5" id="nLr-b7-Yfv"/>
|
||||
<constraint firstItem="KEh-NL-c2W" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="10" id="qDQ-KT-BNm"/>
|
||||
<constraint firstItem="oat-Vd-t1v" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="5" id="vFS-1V-I70"/>
|
||||
<constraint firstItem="oat-Vd-t1v" firstAttribute="centerX" secondItem="KEh-NL-c2W" secondAttribute="centerX" id="zoQ-iI-caI"/>
|
||||
<constraint firstAttribute="bottom" secondItem="KEh-NL-c2W" secondAttribute="bottom" constant="9" id="zvu-px-zE8"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="-20" y="102.5"/>
|
||||
</customView>
|
||||
<collectionViewItem id="Zx6-dd-JBD" customClass="ArtistViewItem" customModule="Persephone" customModuleProvider="target"/>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="defaultCoverArt" width="128" height="128"/>
|
||||
</resources>
|
||||
</document>
|
||||
@ -1,30 +0,0 @@
|
||||
//
|
||||
// BrowseController.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/20.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import ReSwift
|
||||
|
||||
class BrowseController: NSViewController {
|
||||
@IBOutlet var browseTabView: NSTabView!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
App.store.subscribe(self) {
|
||||
$0.select { $0.uiState }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension BrowseController: StoreSubscriber {
|
||||
typealias BrowseSubscriberStateType = UIState
|
||||
|
||||
func newState(state: BrowseSubscriberStateType) {
|
||||
browseTabView.selectTabViewItem(at: state.browseViewState.rawValue)
|
||||
}
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
//
|
||||
// Notification.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/2/08.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Notification.Name {
|
||||
static let didConnect = Notification.Name("MPDClientDidConnect")
|
||||
static let willDisconnect = Notification.Name("MPDClientWillDisconnect")
|
||||
}
|
||||
@ -13,7 +13,6 @@ import Differ
|
||||
class AlbumViewController: NSViewController,
|
||||
NSCollectionViewDelegateFlowLayout {
|
||||
var dataSource = AlbumDataSource()
|
||||
let layout = FlexibleGridViewLayout(coder: NSCoder())
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
@ -22,14 +21,9 @@ class AlbumViewController: NSViewController,
|
||||
$0.select { $0.albumListState }
|
||||
}
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(didConnect), name: .didConnect, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(willDisconnect), name: .willDisconnect, object: nil)
|
||||
|
||||
albumScrollView.postsBoundsChangedNotifications = true
|
||||
|
||||
albumCollectionView.dataSource = dataSource
|
||||
layout?.extraHeight = 44
|
||||
albumCollectionView.collectionViewLayout = layout
|
||||
|
||||
registerForDragAndDrop(albumCollectionView)
|
||||
}
|
||||
@ -41,7 +35,7 @@ class AlbumViewController: NSViewController,
|
||||
override func viewWillLayout() {
|
||||
super.viewWillLayout()
|
||||
|
||||
if let layout = albumCollectionView.collectionViewLayout as? FlexibleGridViewLayout {
|
||||
if let layout = albumCollectionView.collectionViewLayout as? AlbumViewLayout {
|
||||
layout.saveScrollPosition()
|
||||
}
|
||||
|
||||
@ -51,22 +45,12 @@ class AlbumViewController: NSViewController,
|
||||
override func viewDidLayout() {
|
||||
super.viewDidLayout()
|
||||
|
||||
guard let layout = albumCollectionView.collectionViewLayout as? FlexibleGridViewLayout
|
||||
guard let layout = albumCollectionView.collectionViewLayout as? AlbumViewLayout
|
||||
else { return }
|
||||
|
||||
layout.setScrollPosition()
|
||||
}
|
||||
|
||||
@objc func didConnect() {
|
||||
App.mpdClient.fetchAllAlbums()
|
||||
}
|
||||
|
||||
@objc func willDisconnect() {
|
||||
DispatchQueue.main.async {
|
||||
App.store.dispatch(UpdateAlbumListAction(albums: []))
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet var albumScrollView: NSScrollView!
|
||||
@IBOutlet var albumCollectionView: NSCollectionView!
|
||||
}
|
||||
@ -76,7 +60,7 @@ extension AlbumViewController: StoreSubscriber {
|
||||
|
||||
func newState(state: StoreSubscriberStateType) {
|
||||
let oldAlbums = dataSource.albums
|
||||
|
||||
|
||||
dataSource.albums = state.albums
|
||||
|
||||
albumCollectionView.animateItemChanges(
|
||||
13
Persephone/Controllers/ArtistViewController.swift
Normal file
13
Persephone/Controllers/ArtistViewController.swift
Normal file
@ -0,0 +1,13 @@
|
||||
//
|
||||
// ArtistViewController.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/20.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
class ArtistViewController: NSViewController {
|
||||
|
||||
}
|
||||
26
Persephone/Controllers/ArtistViewItem.swift
Normal file
26
Persephone/Controllers/ArtistViewItem.swift
Normal file
@ -0,0 +1,26 @@
|
||||
//
|
||||
// ArtistViewItem.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/20.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import Cocoa
|
||||
|
||||
class ArtistViewItem: NSViewController {
|
||||
var artist: String?
|
||||
|
||||
@IBOutlet var artistName: NSTextField!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Do view setup here.
|
||||
}
|
||||
|
||||
func setArtist(_ artist: String) {
|
||||
self.artist = artist
|
||||
|
||||
artistName.stringValue = artist
|
||||
}
|
||||
}
|
||||
32
Persephone/Controllers/BrowseController.swift
Normal file
32
Persephone/Controllers/BrowseController.swift
Normal file
@ -0,0 +1,32 @@
|
||||
//
|
||||
// BrowseController.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/20.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
class BrowseController: NSViewController {
|
||||
@IBOutlet var artistsButton: NSButton!
|
||||
@IBOutlet var albumsButton: NSButton!
|
||||
|
||||
@IBOutlet var browseTabView: NSTabView!
|
||||
|
||||
@IBAction func switchToTab(_ sender: NSButton) {
|
||||
artistsButton.state = .off
|
||||
albumsButton.state = .off
|
||||
|
||||
switch sender.identifier?.rawValue {
|
||||
case "artists":
|
||||
artistsButton.state = .on
|
||||
browseTabView.selectTabViewItem(at: 0)
|
||||
case "albums":
|
||||
albumsButton.state = .on
|
||||
browseTabView.selectTabViewItem(at: 1)
|
||||
default:
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11,9 +11,9 @@ import ReSwift
|
||||
|
||||
class MPDServerController {
|
||||
init() {
|
||||
// App.store.subscribe(self) {
|
||||
// $0.select { $0.preferencesState.mpdServer }
|
||||
// }
|
||||
App.store.subscribe(self) {
|
||||
$0.select { $0.preferencesState.mpdServer }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,6 +22,9 @@ extension MPDServerController: StoreSubscriber {
|
||||
|
||||
func newState(state: MPDServer) {
|
||||
App.mpdClient.disconnect()
|
||||
App.mpdClient.connect()
|
||||
App.mpdClient.connect(
|
||||
host: state.hostOrDefault,
|
||||
port: state.portOrDefault
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -9,12 +9,12 @@
|
||||
import Foundation
|
||||
|
||||
class MPDServerDelegate: MPDClientDelegate {
|
||||
func didConnect(mpdClient: MPDClient) {
|
||||
NotificationCenter.default.post(name: .didConnect, object: nil)
|
||||
}
|
||||
func didConnect(mpdClient: MPDClient) {}
|
||||
|
||||
func willDisconnect(mpdClient: MPDClient) {
|
||||
NotificationCenter.default.post(name: .willDisconnect, object: nil)
|
||||
DispatchQueue.main.async {
|
||||
App.store.dispatch(UpdateAlbumListAction(albums: []))
|
||||
}
|
||||
}
|
||||
|
||||
func didUpdateStatus(mpdClient: MPDClient, status: MPDClient.MPDStatus) {
|
||||
@ -52,10 +52,4 @@ class MPDServerDelegate: MPDClientDelegate {
|
||||
App.store.dispatch(UpdateAlbumListAction(albums: albums))
|
||||
}
|
||||
}
|
||||
|
||||
func didLoadArtists(mpdClient: MPDClient, artists: [String]) {
|
||||
DispatchQueue.main.async {
|
||||
App.store.dispatch(UpdateArtistListAction(artists: artists))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -22,19 +22,12 @@ class QueueViewController: NSViewController {
|
||||
$0.select { $0.queueState }
|
||||
}
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(didConnect), name: .didConnect, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(willDisconnect), name: .willDisconnect, object: nil)
|
||||
|
||||
queueView.dataSource = dataSource
|
||||
queueView.columnAutoresizingStyle = .sequentialColumnAutoresizingStyle
|
||||
queueView.registerForDraggedTypes([.songPasteboardType, .albumPasteboardType])
|
||||
queueView.draggingDestinationFeedbackStyle = .regular
|
||||
}
|
||||
|
||||
deinit {
|
||||
App.store.unsubscribe(self)
|
||||
}
|
||||
|
||||
override func keyDown(with event: NSEvent) {
|
||||
switch event.keyCode {
|
||||
case NSEvent.keyCodeSpace:
|
||||
@ -50,17 +43,6 @@ class QueueViewController: NSViewController {
|
||||
}
|
||||
}
|
||||
|
||||
@objc func didConnect() {
|
||||
App.mpdClient.fetchQueue()
|
||||
}
|
||||
|
||||
@objc func willDisconnect() {
|
||||
DispatchQueue.main.async {
|
||||
App.store.dispatch(UpdateQueuePosAction(queuePos: -1))
|
||||
App.store.dispatch(UpdateQueueAction(queue: []))
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func playTrack(_ sender: Any) {
|
||||
let queuePos = queueView.selectedRow - 1
|
||||
|
||||
@ -27,8 +27,6 @@ class WindowController: NSWindowController {
|
||||
@IBOutlet var shuffleState: NSButton!
|
||||
@IBOutlet var repeatState: NSButton!
|
||||
|
||||
@IBOutlet var browseViewControls: NSSegmentedControl!
|
||||
|
||||
override func windowDidLoad() {
|
||||
super.windowDidLoad()
|
||||
window?.titleVisibility = .hidden
|
||||
@ -40,8 +38,6 @@ class WindowController: NSWindowController {
|
||||
}
|
||||
}
|
||||
|
||||
browseViewControls.setSelected(true, forSegment: App.store.state.uiState.browseViewState.rawValue)
|
||||
|
||||
App.store.dispatch(MainWindowDidOpenAction())
|
||||
|
||||
trackProgress.font = .timerFont
|
||||
@ -164,12 +160,6 @@ class WindowController: NSWindowController {
|
||||
App.mpdClient.setRepeatState(repeatState: sender.state == .on)
|
||||
}
|
||||
|
||||
@IBAction func setBrowseViewState(_ sender: NSSegmentedControl) {
|
||||
guard let browseViewState = BrowseViewState(rawValue: sender.selectedSegment)
|
||||
else { return }
|
||||
|
||||
App.store.dispatch(SetVisibleBrowseView(browseViewState: browseViewState))
|
||||
}
|
||||
}
|
||||
|
||||
extension WindowController: NSWindowDelegate {
|
||||
@ -189,7 +179,7 @@ extension WindowController: NSWindowDelegate {
|
||||
extension WindowController: StoreSubscriber {
|
||||
typealias StoreSubscriberStateType = (playerState: PlayerState, uiState: UIState)
|
||||
|
||||
func newState(state: StoreSubscriberStateType) {
|
||||
func newState(state: (playerState: PlayerState, uiState: UIState)) {
|
||||
DispatchQueue.main.async {
|
||||
self.setTransportControlState(state.playerState)
|
||||
self.setShuffleRepeatState(state.playerState)
|
||||
@ -17,12 +17,9 @@ extension NSUserInterfaceItemIdentifier {
|
||||
static let queueSongTitle = NSUserInterfaceItemIdentifier("songTitleCell")
|
||||
|
||||
static let albumViewItem = NSUserInterfaceItemIdentifier("AlbumViewItem")
|
||||
static let artistViewItem = NSUserInterfaceItemIdentifier("ArtistViewItem")
|
||||
|
||||
static let discNumber = NSUserInterfaceItemIdentifier("discNumberCell")
|
||||
static let trackNumber = NSUserInterfaceItemIdentifier("trackNumberCell")
|
||||
static let songTitle = NSUserInterfaceItemIdentifier("songTitleCell")
|
||||
static let songDuration = NSUserInterfaceItemIdentifier("songDurationCell")
|
||||
|
||||
static let artistListName = NSUserInterfaceItemIdentifier("artistCell")
|
||||
}
|
||||
29
Persephone/Extensions/Notification.swift
Normal file
29
Persephone/Extensions/Notification.swift
Normal file
@ -0,0 +1,29 @@
|
||||
//
|
||||
// Notification.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/2/08.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Notification {
|
||||
static let didConnect = Name("MPDClientDidConnect")
|
||||
static let willDisconnect = Name("MPDClientWillDisconnect")
|
||||
|
||||
static let stateChanged = Name("MPDClientStateChanged")
|
||||
static let timeChanged = Name("MPDClientTimeChanged")
|
||||
static let databaseUpdateStarted = Name("MPDClientDatabaseUpdateStarted")
|
||||
static let databaseUpdateFinished = Name("MPDClientDatabaseUpdateFinished")
|
||||
static let queueChanged = Name("MPDClientQueueChanged")
|
||||
static let queuePosChanged = Name("MPDClientQueuePosChanged")
|
||||
static let loadedAlbums = Name("MPDClientLoadedAlbums")
|
||||
|
||||
static let stateKey = "state"
|
||||
static let queueKey = "queue"
|
||||
static let queuePosKey = "song"
|
||||
static let albumsKey = "albums"
|
||||
static let totalTimeKey = "totalTime"
|
||||
static let elapsedTimeMsKey = "elapsedTimeMs"
|
||||
}
|
||||
@ -8,9 +8,9 @@
|
||||
|
||||
import AppKit
|
||||
|
||||
class FlexibleGridViewLayout: NSCollectionViewFlowLayout {
|
||||
class AlbumViewLayout: NSCollectionViewFlowLayout {
|
||||
let maxItemWidth: CGFloat = 200
|
||||
var extraHeight: CGFloat = 0
|
||||
let albumInfoHeight: CGFloat = 44
|
||||
var scrollPosition: CGFloat = 0
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
@ -43,7 +43,7 @@ class FlexibleGridViewLayout: NSCollectionViewFlowLayout {
|
||||
divider = divider + 1
|
||||
} while itemWidth > maxItemWidth
|
||||
|
||||
let itemHeight = itemWidth + extraHeight
|
||||
let itemHeight = itemWidth + albumInfoHeight
|
||||
|
||||
itemSize = NSSize(width: itemWidth, height: itemHeight)
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
//
|
||||
// MPDClient+Artist.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/29.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import mpdclient
|
||||
|
||||
extension MPDClient {
|
||||
func fetchAllArtists() {
|
||||
enqueueCommand(command: .fetchAllArtists)
|
||||
}
|
||||
|
||||
func allArtists() {
|
||||
var artists: [String] = []
|
||||
|
||||
mpd_search_db_tags(self.connection, MPD_TAG_ALBUM_ARTIST)
|
||||
mpd_search_commit(self.connection)
|
||||
|
||||
while let pair = mpd_recv_pair(self.connection) {
|
||||
let pair = MPDPair(pair)
|
||||
|
||||
switch pair.name {
|
||||
case "AlbumArtist":
|
||||
artists.append(pair.value)
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
mpd_return_pair(self.connection, pair.pair)
|
||||
}
|
||||
|
||||
self.delegate?.didLoadArtists(mpdClient: self, artists: artists)
|
||||
}
|
||||
}
|
||||
@ -87,10 +87,6 @@ extension MPDClient {
|
||||
else { return }
|
||||
sendAddAlbumToQueue(album: album, at: queuePos)
|
||||
|
||||
// Artist commands
|
||||
case .fetchAllArtists:
|
||||
allArtists()
|
||||
|
||||
// Album commands
|
||||
case .fetchAllAlbums:
|
||||
allAlbums()
|
||||
@ -111,7 +107,6 @@ extension MPDClient {
|
||||
|
||||
albumSongs(for: album, callback: callback)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func enqueueCommand(
|
||||
|
||||
@ -10,8 +10,8 @@ import Foundation
|
||||
import mpdclient
|
||||
|
||||
extension MPDClient {
|
||||
func makeConnectionOperation(host: String, port: Int) -> BlockOperation {
|
||||
BlockOperation { [unowned self] in
|
||||
func connect(host: String, port: Int) {
|
||||
commandQueue.addOperation { [unowned self] in
|
||||
guard let connection = mpd_connection_new(host, UInt32(port), 10000),
|
||||
mpd_connection_get_error(connection) == MPD_ERROR_SUCCESS
|
||||
else { return }
|
||||
@ -24,17 +24,17 @@ extension MPDClient {
|
||||
self.connection = connection
|
||||
self.status = MPDStatus(status)
|
||||
|
||||
self.fetchQueue()
|
||||
self.fetchAllAlbums()
|
||||
self.idle()
|
||||
|
||||
self.delegate?.didConnect(mpdClient: self)
|
||||
self.delegate?.didUpdateStatus(mpdClient: self, status: self.status!)
|
||||
|
||||
self.idle()
|
||||
self.delegate?.didUpdateQueue(mpdClient: self, queue: self.queue)
|
||||
self.delegate?.didUpdateQueuePos(mpdClient: self, song: self.status!.song)
|
||||
}
|
||||
}
|
||||
|
||||
func connect() {
|
||||
commandQueue.addOperation(connectionOperation)
|
||||
}
|
||||
|
||||
func disconnect() {
|
||||
guard isConnected else { return }
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import mpdclient
|
||||
|
||||
extension MPDClient {
|
||||
func fetchQueue() {
|
||||
enqueueCommand(command: .fetchQueue)
|
||||
sendCommand(command: .fetchQueue)
|
||||
}
|
||||
|
||||
func clearQueue() {
|
||||
@ -54,8 +54,6 @@ extension MPDClient {
|
||||
let song = MPDSong(mpdSong)
|
||||
self.queue.append(song)
|
||||
}
|
||||
|
||||
self.delegate?.didUpdateQueue(mpdClient: self, queue: self.queue)
|
||||
}
|
||||
|
||||
func sendClearQueue() {
|
||||
|
||||
@ -10,8 +10,6 @@ import Foundation
|
||||
import mpdclient
|
||||
|
||||
class MPDClient {
|
||||
var connectionOperation: BlockOperation!
|
||||
|
||||
var delegate: MPDClientDelegate?
|
||||
|
||||
var connection: OpaquePointer?
|
||||
@ -22,9 +20,8 @@ class MPDClient {
|
||||
|
||||
let commandQueue = OperationQueue()
|
||||
|
||||
init(host: String, port: Int, withDelegate delegate: MPDClientDelegate?) {
|
||||
init(withDelegate delegate: MPDClientDelegate?) {
|
||||
commandQueue.maxConcurrentOperationCount = 1
|
||||
self.delegate = delegate
|
||||
self.connectionOperation = makeConnectionOperation(host: host, port: port)
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,9 +37,6 @@ extension MPDClient {
|
||||
case addSongToQueue
|
||||
case addAlbumToQueue
|
||||
|
||||
// Artist commands
|
||||
case fetchAllArtists
|
||||
|
||||
// Album commands
|
||||
case fetchAllAlbums
|
||||
case playAlbum
|
||||
|
||||
@ -21,6 +21,4 @@ protocol MPDClientDelegate {
|
||||
func didUpdateQueuePos(mpdClient: MPDClient, song: Int)
|
||||
|
||||
func didLoadAlbums(mpdClient: MPDClient, albums: [MPDClient.MPDAlbum])
|
||||
|
||||
func didLoadArtists(mpdClient: MPDClient, artists: [String])
|
||||
}
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
//
|
||||
// Artist.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/10/04.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
struct Artist {
|
||||
var name: String
|
||||
var image: Loading<NSImage?> = .notLoaded
|
||||
|
||||
init(name: String) {
|
||||
self.name = name
|
||||
}
|
||||
}
|
||||
|
||||
extension Artist: Equatable {
|
||||
static func == (lhs: Artist, rhs: Artist) -> Bool {
|
||||
return (lhs.name == rhs.name)
|
||||
}
|
||||
}
|
||||
@ -18,6 +18,7 @@ class GeneralPrefsViewController: NSViewController {
|
||||
}
|
||||
|
||||
if let mpdPort = App.store.state.preferencesState.mpdServer.port {
|
||||
print(mpdPort)
|
||||
mpdPortField.stringValue = "\(mpdPort)"
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14868" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14868"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@ -22,7 +22,7 @@
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="m2v-pR-e9v">
|
||||
<rect key="frame" x="357" y="515" width="448" height="28"/>
|
||||
<rect key="frame" x="357" y="514" width="448" height="29"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="444" id="erC-QS-9hc"/>
|
||||
</constraints>
|
||||
@ -33,7 +33,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4Jx-I5-Nkv">
|
||||
<rect key="frame" x="357" y="488" width="448" height="19"/>
|
||||
<rect key="frame" x="357" y="487" width="448" height="19"/>
|
||||
<textFieldCell key="cell" title="Artist Name" id="ztJ-4E-qvI">
|
||||
<font key="font" metaFont="system" size="16"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -53,14 +53,28 @@
|
||||
</shadow>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="defaultCoverArt" id="scE-kj-gex"/>
|
||||
</imageView>
|
||||
<button verticalHuggingPriority="750" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jMU-bv-TNF">
|
||||
<rect key="frame" x="31" y="184" width="119" height="35"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="33" id="2uQ-mC-4QY"/>
|
||||
<constraint firstAttribute="width" constant="119" id="h2n-ZB-Ufr"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="smallSquare" title="Play Album" bezelStyle="smallSquare" image="playButton" imagePosition="left" alignment="center" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Rtg-Zd-JYc">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="playAlbum:" target="-2" id="LTw-Lg-yH2"/>
|
||||
</connections>
|
||||
</button>
|
||||
<scrollView horizontalCompressionResistancePriority="250" borderType="none" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" hasHorizontalScroller="NO" horizontalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="BOb-Lr-10M">
|
||||
<rect key="frame" x="359" y="33" width="444" height="426"/>
|
||||
<rect key="frame" x="359" y="33" width="444" height="425"/>
|
||||
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="9QN-UB-b4l">
|
||||
<rect key="frame" x="0.0" y="0.0" width="444" height="426"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="444" height="425"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="none" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" id="ehr-qh-87Q" customClass="AlbumDetailSongListView" customModule="Persephone" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="444" height="426"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="444" height="425"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" red="0.11764705882352941" green="0.11764705882352941" blue="0.11764705882352941" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
@ -84,7 +98,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="6eU-Jx-HDR">
|
||||
<rect key="frame" x="0.0" y="1" width="40" height="16"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="left" title="1." id="Z5y-oS-Qm8">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -106,7 +120,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="nwx-zY-r5o">
|
||||
<rect key="frame" x="0.0" y="1" width="441" height="16"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="441" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="437" id="irN-AG-Pcj"/>
|
||||
</constraints>
|
||||
@ -145,7 +159,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="R8t-bV-9LI">
|
||||
<rect key="frame" x="0.0" y="1" width="353" height="16"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="353" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="left" title="My Song Title" id="Sdi-jJ-EOM">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -182,7 +196,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="pCr-f1-wNs">
|
||||
<rect key="frame" x="0.0" y="1" width="42" height="16"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="42" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="right" title="0:00" id="Qe2-WO-eXr">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -219,20 +233,6 @@
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
<button verticalHuggingPriority="750" misplaced="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jMU-bv-TNF">
|
||||
<rect key="frame" x="31" y="32" width="119" height="35"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="33" id="2uQ-mC-4QY"/>
|
||||
<constraint firstAttribute="width" constant="119" id="h2n-ZB-Ufr"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="smallSquare" title="Play Album" bezelStyle="smallSquare" image="playButton" imagePosition="left" alignment="center" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Rtg-Zd-JYc">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="playAlbum:" target="-2" id="LTw-Lg-yH2"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="FWd-vZ-5CT" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="31" id="694-aS-G4N"/>
|
||||
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14868" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14868"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@ -17,7 +17,7 @@
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView identifier="albumViewItem" id="Hz6-mo-xeY">
|
||||
<customView id="Hz6-mo-xeY" customClass="AlbumItemView" customModule="Persephone" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="158" height="192"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
@ -59,7 +59,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField identifier="albumArtist" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5Uu-j1-qyT">
|
||||
<rect key="frame" x="8" y="10" width="142" height="16"/>
|
||||
<rect key="frame" x="8" y="10" width="142" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" title="Label" id="yZn-e9-zyP">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
37
Persephone/Resources/ArtistViewItem.xib
Normal file
37
Persephone/Resources/ArtistViewItem.xib
Normal file
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="ArtistViewItem" customModule="Persephone" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="artistName" destination="XcT-rc-7KI" id="Sj2-H7-b4t"/>
|
||||
<outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView id="Hz6-mo-xeY">
|
||||
<rect key="frame" x="0.0" y="0.0" width="497" height="63"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<textField identifier="artistName" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XcT-rc-7KI">
|
||||
<rect key="frame" x="18" y="21" width="108" height="22"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Artist Name" id="Ojy-kp-TUe">
|
||||
<font key="font" metaFont="systemBold" size="18"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="XcT-rc-7KI" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" symbolic="YES" id="0Ro-rq-VVD"/>
|
||||
<constraint firstItem="XcT-rc-7KI" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" symbolic="YES" id="r6f-6f-Lq2"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="-21.5" y="-20.5"/>
|
||||
</customView>
|
||||
</objects>
|
||||
</document>
|
||||
@ -302,23 +302,6 @@
|
||||
</connections>
|
||||
</button>
|
||||
</toolbarItem>
|
||||
<toolbarItem implicitItemIdentifier="D1F09BC1-069E-4734-AFB1-C8E4542D0F75" label="Browse View" paletteLabel="Browse View" sizingBehavior="auto" id="CDA-Tu-0RJ">
|
||||
<nil key="toolTip"/>
|
||||
<segmentedControl key="view" verticalHuggingPriority="750" id="F8b-3l-HcP">
|
||||
<rect key="frame" x="0.0" y="14" width="141" height="24"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<segmentedCell key="cell" borderStyle="border" alignment="left" style="texturedSquare" trackingMode="selectOne" id="iXx-16-jmI">
|
||||
<font key="font" metaFont="system"/>
|
||||
<segments>
|
||||
<segment label="Artists"/>
|
||||
<segment label="Albums"/>
|
||||
</segments>
|
||||
</segmentedCell>
|
||||
<connections>
|
||||
<action selector="setBrowseViewState:" target="B8D-0N-5wS" id="fVP-WG-uOi"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
</toolbarItem>
|
||||
</allowedToolbarItems>
|
||||
<defaultToolbarItems>
|
||||
<toolbarItem reference="p3r-ty-Pxf"/>
|
||||
@ -331,7 +314,6 @@
|
||||
<toolbarItem reference="s1h-EC-nvL"/>
|
||||
<toolbarItem reference="5U7-UV-xn2"/>
|
||||
<toolbarItem reference="9ol-aR-mzv"/>
|
||||
<toolbarItem reference="CDA-Tu-0RJ"/>
|
||||
</defaultToolbarItems>
|
||||
</toolbar>
|
||||
<connections>
|
||||
@ -339,7 +321,6 @@
|
||||
</connections>
|
||||
</window>
|
||||
<connections>
|
||||
<outlet property="browseViewControls" destination="F8b-3l-HcP" id="AMQ-6B-8Zd"/>
|
||||
<outlet property="databaseUpdatingIndicator" destination="LpV-iM-o6t" id="y0T-eR-ygY"/>
|
||||
<outlet property="repeatState" destination="OqH-lV-sAg" id="DPC-Ff-Srr"/>
|
||||
<outlet property="shuffleState" destination="E8L-uK-XT0" id="dCF-hm-dBs"/>
|
||||
@ -524,64 +505,123 @@
|
||||
<objects>
|
||||
<viewController id="SjO-VS-1bb" customClass="BrowseController" customModule="Persephone" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" id="BRY-0R-F3u">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="558"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="536"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<tabView type="noTabsNoBorder" initialItem="XgS-cX-SDH" translatesAutoresizingMaskIntoConstraints="NO" id="ARv-cj-xlz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="558"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<tabViewItems>
|
||||
<tabViewItem label="Artists" identifier="" id="bV1-g9-37C">
|
||||
<view key="view" id="5Ye-bM-Ifl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="558"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<containerView translatesAutoresizingMaskIntoConstraints="NO" id="EBh-Di-UhX">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="558"/>
|
||||
<connections>
|
||||
<segue destination="LpS-90-tby" kind="embed" id="00m-3s-fzb"/>
|
||||
</connections>
|
||||
</containerView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="EBh-Di-UhX" firstAttribute="leading" secondItem="5Ye-bM-Ifl" secondAttribute="leading" id="SR7-0Y-U4Q"/>
|
||||
<constraint firstItem="EBh-Di-UhX" firstAttribute="top" secondItem="5Ye-bM-Ifl" secondAttribute="top" id="bcN-6r-OFW"/>
|
||||
<constraint firstAttribute="bottom" secondItem="EBh-Di-UhX" secondAttribute="bottom" id="kOK-UG-b31"/>
|
||||
<constraint firstAttribute="trailing" secondItem="EBh-Di-UhX" secondAttribute="trailing" id="vB5-SX-6iT"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</tabViewItem>
|
||||
<tabViewItem label="Albums" identifier="" id="XgS-cX-SDH">
|
||||
<view key="view" id="hB7-hN-SbB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="558"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<containerView translatesAutoresizingMaskIntoConstraints="NO" id="moE-bb-Zvg">
|
||||
<rect key="frame" x="-3" y="-3" width="481" height="561"/>
|
||||
<connections>
|
||||
<segue destination="gPn-fP-LFc" kind="embed" id="2iB-9y-I9h"/>
|
||||
</connections>
|
||||
</containerView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="moE-bb-Zvg" firstAttribute="top" secondItem="hB7-hN-SbB" secondAttribute="top" id="DUI-jy-8D7"/>
|
||||
<constraint firstItem="moE-bb-Zvg" firstAttribute="leading" secondItem="hB7-hN-SbB" secondAttribute="leading" constant="-3" id="dCS-Kx-2UP"/>
|
||||
<constraint firstAttribute="trailing" secondItem="moE-bb-Zvg" secondAttribute="trailing" id="qey-4e-xfu"/>
|
||||
<constraint firstAttribute="bottom" secondItem="moE-bb-Zvg" secondAttribute="bottom" constant="-3" id="ziA-Xh-dlz"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</tabViewItem>
|
||||
</tabViewItems>
|
||||
</tabView>
|
||||
<stackView distribution="fill" orientation="vertical" alignment="centerX" spacing="2" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="35G-X1-hrz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="536"/>
|
||||
<subviews>
|
||||
<stackView distribution="equalCentering" orientation="horizontal" alignment="centerY" spacing="2" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LBv-o9-2Ya">
|
||||
<rect key="frame" x="181" y="498" width="116" height="38"/>
|
||||
<subviews>
|
||||
<button identifier="artists" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SFs-nF-qQx" customClass="BrowseViewButton" customModule="Persephone" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="9" width="54" height="19"/>
|
||||
<buttonCell key="cell" type="recessed" title="Artists" bezelStyle="recessed" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="wYx-jY-G52">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="switchToTab:" target="SjO-VS-1bb" id="wPl-Ga-LZU"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button identifier="albums" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OnP-F2-wY0" customClass="BrowseViewButton" customModule="Persephone" customModuleProvider="target">
|
||||
<rect key="frame" x="56" y="9" width="60" height="19"/>
|
||||
<buttonCell key="cell" type="recessed" title="Albums" bezelStyle="recessed" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="7XB-MN-6Ms">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="switchToTab:" target="SjO-VS-1bb" id="rql-oa-9AB"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<edgeInsets key="edgeInsets" left="0.0" right="0.0" top="8" bottom="8"/>
|
||||
<constraints>
|
||||
<constraint firstItem="OnP-F2-wY0" firstAttribute="top" secondItem="LBv-o9-2Ya" secondAttribute="top" constant="10" id="6XX-6Q-E1u"/>
|
||||
<constraint firstItem="OnP-F2-wY0" firstAttribute="leading" secondItem="SFs-nF-qQx" secondAttribute="trailing" constant="2" id="tBi-h3-VCC"/>
|
||||
</constraints>
|
||||
<visibilityPriorities>
|
||||
<integer value="1000"/>
|
||||
<integer value="1000"/>
|
||||
</visibilityPriorities>
|
||||
<customSpacing>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
</customSpacing>
|
||||
</stackView>
|
||||
<tabView type="noTabsNoBorder" initialItem="XgS-cX-SDH" translatesAutoresizingMaskIntoConstraints="NO" id="ARv-cj-xlz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="496"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<tabViewItems>
|
||||
<tabViewItem label="Artists" identifier="" id="bV1-g9-37C">
|
||||
<view key="view" id="5Ye-bM-Ifl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="496"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<containerView translatesAutoresizingMaskIntoConstraints="NO" id="EBh-Di-UhX">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="496"/>
|
||||
<connections>
|
||||
<segue destination="LpS-90-tby" kind="embed" id="00m-3s-fzb"/>
|
||||
</connections>
|
||||
</containerView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="EBh-Di-UhX" firstAttribute="leading" secondItem="5Ye-bM-Ifl" secondAttribute="leading" id="SR7-0Y-U4Q"/>
|
||||
<constraint firstItem="EBh-Di-UhX" firstAttribute="top" secondItem="5Ye-bM-Ifl" secondAttribute="top" id="bcN-6r-OFW"/>
|
||||
<constraint firstAttribute="bottom" secondItem="EBh-Di-UhX" secondAttribute="bottom" id="kOK-UG-b31"/>
|
||||
<constraint firstAttribute="trailing" secondItem="EBh-Di-UhX" secondAttribute="trailing" id="vB5-SX-6iT"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</tabViewItem>
|
||||
<tabViewItem label="Albums" identifier="" id="XgS-cX-SDH">
|
||||
<view key="view" id="hB7-hN-SbB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="496"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<containerView translatesAutoresizingMaskIntoConstraints="NO" id="moE-bb-Zvg">
|
||||
<rect key="frame" x="-3" y="-3" width="481" height="499"/>
|
||||
<connections>
|
||||
<segue destination="gPn-fP-LFc" kind="embed" id="2iB-9y-I9h"/>
|
||||
</connections>
|
||||
</containerView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="moE-bb-Zvg" firstAttribute="top" secondItem="hB7-hN-SbB" secondAttribute="top" id="DUI-jy-8D7"/>
|
||||
<constraint firstItem="moE-bb-Zvg" firstAttribute="leading" secondItem="hB7-hN-SbB" secondAttribute="leading" constant="-3" id="dCS-Kx-2UP"/>
|
||||
<constraint firstAttribute="trailing" secondItem="moE-bb-Zvg" secondAttribute="trailing" id="qey-4e-xfu"/>
|
||||
<constraint firstAttribute="bottom" secondItem="moE-bb-Zvg" secondAttribute="bottom" constant="-3" id="ziA-Xh-dlz"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</tabViewItem>
|
||||
</tabViewItems>
|
||||
</tabView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="ARv-cj-xlz" secondAttribute="trailing" id="4XJ-un-DRm"/>
|
||||
<constraint firstItem="LBv-o9-2Ya" firstAttribute="top" secondItem="35G-X1-hrz" secondAttribute="top" id="wk2-ZY-TMz"/>
|
||||
<constraint firstItem="LBv-o9-2Ya" firstAttribute="centerX" secondItem="35G-X1-hrz" secondAttribute="centerX" id="xAR-qw-hiL"/>
|
||||
<constraint firstItem="ARv-cj-xlz" firstAttribute="leading" secondItem="35G-X1-hrz" secondAttribute="leading" id="yL8-Gq-8bT"/>
|
||||
</constraints>
|
||||
<visibilityPriorities>
|
||||
<integer value="1000"/>
|
||||
<integer value="1000"/>
|
||||
</visibilityPriorities>
|
||||
<customSpacing>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
</customSpacing>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="ARv-cj-xlz" secondAttribute="trailing" id="nXk-bi-ua4"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ARv-cj-xlz" secondAttribute="bottom" id="nzf-Jw-Bpk"/>
|
||||
<constraint firstItem="ARv-cj-xlz" firstAttribute="top" secondItem="BRY-0R-F3u" secondAttribute="top" id="v6W-0L-kQ1"/>
|
||||
<constraint firstItem="ARv-cj-xlz" firstAttribute="leading" secondItem="BRY-0R-F3u" secondAttribute="leading" id="w2Z-xv-Fwz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="35G-X1-hrz" secondAttribute="trailing" id="GmC-07-TZ9"/>
|
||||
<constraint firstAttribute="bottom" secondItem="35G-X1-hrz" secondAttribute="bottom" id="QLO-5f-nea"/>
|
||||
<constraint firstItem="35G-X1-hrz" firstAttribute="leading" secondItem="BRY-0R-F3u" secondAttribute="leading" id="T5b-dY-ac0"/>
|
||||
<constraint firstItem="35G-X1-hrz" firstAttribute="top" secondItem="BRY-0R-F3u" secondAttribute="top" id="dCC-1m-Dc6"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="albumsButton" destination="OnP-F2-wY0" id="Ft9-h6-5MU"/>
|
||||
<outlet property="artistsButton" destination="SFs-nF-qQx" id="Khk-Wu-ZIs"/>
|
||||
<outlet property="browseTabView" destination="ARv-cj-xlz" id="h93-fi-yY7"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
@ -881,45 +921,44 @@
|
||||
<!--Artist View Controller-->
|
||||
<scene sceneID="SZb-JU-J7O">
|
||||
<objects>
|
||||
<viewController id="LpS-90-tby" customClass="ArtistViewController" customModule="Persephone" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<viewController id="LpS-90-tby" customClass="ArtistViewController" sceneMemberID="viewController">
|
||||
<view key="view" id="vxO-fC-BpZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lkE-Eh-ZKl">
|
||||
<scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hef-8H-doh">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
|
||||
<clipView key="contentView" id="W3C-r7-oJL">
|
||||
<clipView key="contentView" id="NYM-zm-wx1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<collectionView id="bg7-32-4Jl">
|
||||
<collectionView id="8MP-vD-0zS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="158"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
|
||||
<collectionViewLayout key="collectionViewLayout" id="48h-7k-nVB" customClass="FlexibleGridViewLayout" customModule="Persephone" customModuleProvider="target"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" id="0jX-3t-OLG">
|
||||
<size key="itemSize" width="50" height="50"/>
|
||||
</collectionViewFlowLayout>
|
||||
<color key="primaryBackgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
</clipView>
|
||||
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="aW3-Xd-iIz">
|
||||
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="AK9-5R-0F5">
|
||||
<rect key="frame" x="1" y="144" width="233" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="DhO-CB-eX0">
|
||||
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="f89-z2-LIY">
|
||||
<rect key="frame" x="234" y="1" width="15" height="143"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="lkE-Eh-ZKl" secondAttribute="trailing" id="HPW-OE-lpd"/>
|
||||
<constraint firstItem="lkE-Eh-ZKl" firstAttribute="leading" secondItem="vxO-fC-BpZ" secondAttribute="leading" id="LnL-RZ-Lcm"/>
|
||||
<constraint firstItem="lkE-Eh-ZKl" firstAttribute="top" secondItem="vxO-fC-BpZ" secondAttribute="top" id="ZyG-hn-fPw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="lkE-Eh-ZKl" secondAttribute="bottom" id="l4W-l0-fZS"/>
|
||||
<constraint firstItem="Hef-8H-doh" firstAttribute="leading" secondItem="vxO-fC-BpZ" secondAttribute="leading" id="9Jt-Aa-9B9"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Hef-8H-doh" secondAttribute="trailing" id="Znr-1M-fxs"/>
|
||||
<constraint firstItem="Hef-8H-doh" firstAttribute="top" secondItem="vxO-fC-BpZ" secondAttribute="top" id="mpB-KM-RZw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Hef-8H-doh" secondAttribute="bottom" id="puR-GX-c6y"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="artistCollectionView" destination="bg7-32-4Jl" id="g9V-jO-2wj"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<customObject id="Ras-zf-6qF" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
@ -942,7 +981,7 @@
|
||||
<collectionView identifier="albumCollectionView" selectable="YES" id="lfq-AB-epE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="158"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
|
||||
<collectionViewLayout key="collectionViewLayout" id="YE8-sD-l5P" customClass="FlexibleGridViewLayout" customModule="Persephone" customModuleProvider="target"/>
|
||||
<collectionViewLayout key="collectionViewLayout" id="YE8-sD-l5P" customClass="AlbumViewLayout" customModule="Persephone" customModuleProvider="target"/>
|
||||
<color key="primaryBackgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="gPn-fP-LFc" id="LQ2-Vl-r08"/>
|
||||
@ -1,14 +0,0 @@
|
||||
//
|
||||
// ArtistListActions.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/29.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import ReSwift
|
||||
|
||||
struct UpdateArtistListAction: Action {
|
||||
var artists: [String]
|
||||
}
|
||||
@ -18,10 +18,6 @@ struct DatabaseUpdateStartedAction: Action {}
|
||||
|
||||
struct DatabaseUpdateFinishedAction: Action {}
|
||||
|
||||
struct SetVisibleBrowseView: Action {
|
||||
let browseViewState: BrowseViewState
|
||||
}
|
||||
|
||||
struct SetSelectedQueueItem: Action {
|
||||
let selectedQueueItem: QueueItem?
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ struct AppState: StateType {
|
||||
var playerState = PlayerState()
|
||||
var queueState = QueueState()
|
||||
var albumListState = AlbumListState()
|
||||
var artistListState = ArtistListState()
|
||||
var preferencesState = PreferencesState()
|
||||
var uiState = UIState()
|
||||
}
|
||||
|
||||
@ -9,5 +9,5 @@
|
||||
import ReSwift
|
||||
|
||||
struct ArtistListState: StateType, Equatable {
|
||||
var artists: [Artist] = []
|
||||
var artists: [String] = []
|
||||
}
|
||||
|
||||
@ -13,7 +13,6 @@ func appReducer(action: Action, state: AppState?) -> AppState {
|
||||
playerState: playerReducer(action: action, state: state?.playerState),
|
||||
queueState: queueReducer(action: action, state: state?.queueState),
|
||||
albumListState: albumListReducer(action: action, state: state?.albumListState),
|
||||
artistListState: artistListReducer(action: action, state: state?.artistListState),
|
||||
preferencesState: preferencesReducer(action: action, state: state?.preferencesState),
|
||||
uiState: uiReducer(action: action, state: state?.uiState)
|
||||
)
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
//
|
||||
// ArtistReducer.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/29.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import ReSwift
|
||||
|
||||
func artistListReducer(action: Action, state: ArtistListState?) -> ArtistListState {
|
||||
var state = state ?? ArtistListState()
|
||||
|
||||
switch action {
|
||||
case let action as UpdateArtistListAction:
|
||||
state.artists = action.artists.map { Artist(name: $0) }
|
||||
|
||||
default:
|
||||
break
|
||||
|
||||
}
|
||||
|
||||
return state
|
||||
}
|
||||
|
||||
@ -27,9 +27,6 @@ func uiReducer(action: Action, state: UIState?) -> UIState {
|
||||
case is DatabaseUpdateFinishedAction:
|
||||
state.databaseUpdating = false
|
||||
|
||||
case let action as SetVisibleBrowseView:
|
||||
state.browseViewState = action.browseViewState
|
||||
|
||||
case let action as SetSelectedSong:
|
||||
state.selectedSong = action.selectedSong
|
||||
|
||||
|
||||
@ -14,14 +14,8 @@ enum MainWindowState {
|
||||
case minimised
|
||||
}
|
||||
|
||||
enum BrowseViewState: Int {
|
||||
case artists = 0
|
||||
case albums = 1
|
||||
}
|
||||
|
||||
struct UIState: StateType {
|
||||
var mainWindowState: MainWindowState = .closed
|
||||
var browseViewState: BrowseViewState = .albums
|
||||
|
||||
var databaseUpdating: Bool = false
|
||||
|
||||
|
||||
17
Persephone/Views/AlbumItemView.swift
Normal file
17
Persephone/Views/AlbumItemView.swift
Normal file
@ -0,0 +1,17 @@
|
||||
//
|
||||
// AlbumItemView.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/2/17.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
class AlbumItemView: NSView {
|
||||
required init?(coder decoder: NSCoder) {
|
||||
super.init(coder: decoder)
|
||||
}
|
||||
|
||||
@IBOutlet var imageView: NSImageView!
|
||||
}
|
||||
23
Persephone/Views/BrowseViewButton.swift
Normal file
23
Persephone/Views/BrowseViewButton.swift
Normal file
@ -0,0 +1,23 @@
|
||||
//
|
||||
// BrowseViewButton.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/20.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
class BrowseViewButton: NSButton {
|
||||
override func draw(_ dirtyRect: NSRect) {
|
||||
super.draw(dirtyRect)
|
||||
// Drawing code here.
|
||||
self.layer?.cornerRadius = 4
|
||||
self.layer?.masksToBounds = true
|
||||
if #available(OSX 10.14, *) {
|
||||
self.layer?.backgroundColor = NSColor.controlAccentColor.cgColor
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user