Skip to content
Permalink
Browse files

Merge pull request #345 from TortugaPower/develop

Release 3.3.1
  • Loading branch information...
GianniCarlo committed Apr 13, 2019
2 parents ef5cc17 + a7a0a08 commit 834ffe8d53ed2d15b10e72807c1f5977e839b2dd
Showing with 333 additions and 94 deletions.
  1. +1 −6 .travis.yml
  2. +8 −0 BookPlayer.xcodeproj/project.pbxproj
  3. +8 −10 BookPlayer/AppDelegate.swift
  4. +26 −0 BookPlayer/Assets.xcassets/defaultDarkThemeThreshold.imageset/Contents.json
  5. BIN BookPlayer/Assets.xcassets/defaultDarkThemeThreshold.imageset/defaultDarkThemeThreshold.png
  6. BIN BookPlayer/Assets.xcassets/defaultDarkThemeThreshold.imageset/defaultDarkThemeThreshold@2x.png
  7. BIN BookPlayer/Assets.xcassets/defaultDarkThemeThreshold.imageset/defaultDarkThemeThreshold@3x.png
  8. +18 −4 BookPlayer/Base.lproj/Settings.storyboard
  9. +12 −2 BookPlayer/Info.plist
  10. +33 −1 BookPlayer/Library/DataManagement/DataManager+CoreData.swift
  11. +3 −1 BookPlayer/Library/DataManagement/DataManager.swift
  12. +6 −2 BookPlayer/Library/DataManagement/ImportManager.swift
  13. +46 −28 BookPlayer/Library/DataManagement/ImportOperation.swift
  14. +20 −3 BookPlayer/Library/ItemListViewController.swift
  15. +2 −1 BookPlayer/Library/LibraryViewController.swift
  16. +8 −15 BookPlayer/Library/PlaylistViewController.swift
  17. +3 −1 BookPlayer/Library/Views/BookCellView.swift
  18. +5 −1 BookPlayer/Models/Book+CoreDataClass.swift
  19. +4 −2 BookPlayer/Models/BookActivityItemProvider.swift
  20. +6 −1 BookPlayer/Models/BookPlayer.xcdatamodeld/Audiobook Player.xcdatamodel/contents
  21. +18 −0 BookPlayer/Models/PlaybackRecord+CoreDataClass.swift
  22. +25 −0 BookPlayer/Models/PlaybackRecord+CoreDataProperties.swift
  23. +21 −14 BookPlayer/Player/PlayerManager.swift
  24. +18 −0 BookPlayer/Services/UserActivityManager.swift
  25. +10 −2 BookPlayer/Services/VoiceOverService.swift
  26. +32 −0 BookPlayer/Settings/ThemesViewController.swift
@@ -1,17 +1,12 @@
language: swift
osx_image: xcode10
osx_image: xcode10.2
xcode_project: BookPlayer.xcodeproj
xcode_scheme: BookPlayer
xcode_destination: platform=iOS Simulator,OS=11.3,name=iPhone 5s
cache:
directories:
- Carthage
- $HOME/Library/Caches/Homebrew
before_install:
- brew update
- brew outdated carthage || brew upgrade carthage
before_script:
# bootstrap the dependencies for the project
# you can remove if you don't have dependencies
- carthage bootstrap --no-use-binaries --platform iOS --cache-builds
- swiftlint
@@ -14,6 +14,8 @@
4112AFD6223AD27D00BFEA55 /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4112AFD5223AD27D00BFEA55 /* Sentry.framework */; };
412451841D489204008AC0E5 /* Crashlytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 412451821D489204008AC0E5 /* Crashlytics.framework */; };
413616401D2E21F000E48944 /* LibraryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4136163F1D2E21F000E48944 /* LibraryViewController.swift */; };
413C7D9022580A0F009F3658 /* PlaybackRecord+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413C7D8E22580A0F009F3658 /* PlaybackRecord+CoreDataClass.swift */; };
413C7D9122580A0F009F3658 /* PlaybackRecord+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413C7D8F22580A0F009F3658 /* PlaybackRecord+CoreDataProperties.swift */; };
4142964421F21D95004356DA /* BulkControlsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4142964321F21D95004356DA /* BulkControlsView.swift */; };
4142964621F21DAE004356DA /* BulkControlsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4142964521F21DAE004356DA /* BulkControlsView.xib */; };
4142964921F2E2BA004356DA /* ThemeCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4142964721F2E2BA004356DA /* ThemeCellView.swift */; };
@@ -185,6 +187,8 @@
4112AFD5223AD27D00BFEA55 /* Sentry.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sentry.framework; path = Carthage/Build/iOS/Sentry.framework; sourceTree = "<group>"; };
412451821D489204008AC0E5 /* Crashlytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Crashlytics.framework; sourceTree = "<group>"; };
4136163F1D2E21F000E48944 /* LibraryViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LibraryViewController.swift; sourceTree = "<group>"; };
413C7D8E22580A0F009F3658 /* PlaybackRecord+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PlaybackRecord+CoreDataClass.swift"; sourceTree = "<group>"; };
413C7D8F22580A0F009F3658 /* PlaybackRecord+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PlaybackRecord+CoreDataProperties.swift"; sourceTree = "<group>"; };
4142964321F21D95004356DA /* BulkControlsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BulkControlsView.swift; sourceTree = "<group>"; };
4142964521F21DAE004356DA /* BulkControlsView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BulkControlsView.xib; sourceTree = "<group>"; };
4142964721F2E2BA004356DA /* ThemeCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeCellView.swift; sourceTree = "<group>"; };
@@ -644,6 +648,8 @@
isa = PBXGroup;
children = (
4165EDF920A743D500616EDF /* BookPlayer.xcdatamodeld */,
413C7D8E22580A0F009F3658 /* PlaybackRecord+CoreDataClass.swift */,
413C7D8F22580A0F009F3658 /* PlaybackRecord+CoreDataProperties.swift */,
41839AB120AA8B960047E55D /* Theme+CoreDataClass.swift */,
41839AB220AA8B960047E55D /* Theme+CoreDataProperties.swift */,
41839AB520AA8C970047E55D /* Book+CoreDataClass.swift */,
@@ -1057,7 +1063,9 @@
410D0FED1EDCF4B000A52EB9 /* SettingsViewController.swift in Sources */,
41B2A5DE21CAF20E00917584 /* ThemesViewController.swift in Sources */,
C398559C20C492FF00BE9EC0 /* AddButton.swift in Sources */,
413C7D9022580A0F009F3658 /* PlaybackRecord+CoreDataClass.swift in Sources */,
4175E1242206CF9600FB7B71 /* DataManager+CoreData.swift in Sources */,
413C7D9122580A0F009F3658 /* PlaybackRecord+CoreDataProperties.swift in Sources */,
C3EC372E206EE0650094B4E8 /* SleepTimer.swift in Sources */,
4165EE1220A7D1E100616EDF /* RootViewController.swift in Sources */,
4165EE0820A743D500616EDF /* Playlist+CoreDataProperties.swift in Sources */,
@@ -90,16 +90,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return true
}

func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
@@ -178,6 +168,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Pause playback if route changes due to a disconnect
switch reason {
case .oldDeviceUnavailable:
guard let storedPort = PlayerManager.shared.outputPort,
let currentRoute = AVAudioSession.sharedInstance().currentRoute.outputs.first else { return }

guard storedPort != currentRoute else { return }

guard currentRoute.portType == .builtInSpeaker else { return }

DispatchQueue.main.async {
PlayerManager.shared.pause()
}
@@ -257,6 +254,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func setupDocumentListener() {
let documentsUrl = DataManager.getDocumentsFolderURL()
self.watcher = DirectoryWatcher.watch(documentsUrl)
self.watcher?.ignoreDirectories = false
self.watcher?.onNewFiles = { newFiles in
for url in newFiles {
DataManager.processFile(at: url)
@@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "defaultDarkThemeThreshold.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "defaultDarkThemeThreshold@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "defaultDarkThemeThreshold@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="nNa-3d-7ZC">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="nNa-3d-7ZC">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -1204,8 +1204,14 @@
<action selector="toggleAutomaticBrightness:" destination="NEQ-oF-OIb" eventType="valueChanged" id="cSx-FA-fMx"/>
</connections>
</switch>
<imageView userInteractionEnabled="NO" alpha="0.0" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="currentScreenBrightnessIndicator" translatesAutoresizingMaskIntoConstraints="NO" id="UXs-vJ-DCL">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" alpha="0.0" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="defaultDarkThemeThreshold" translatesAutoresizingMaskIntoConstraints="NO" id="cmz-wB-Puk">
<rect key="frame" x="25" y="-19" width="177" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="dSM-zk-MCz"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" alpha="0.0" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="currentScreenBrightnessIndicator" translatesAutoresizingMaskIntoConstraints="NO" id="UXs-vJ-DCL">
<rect key="frame" x="25" y="-19" width="30" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="hxQ-nh-ii6"/>
</constraints>
@@ -1217,6 +1223,8 @@
<constraint firstAttribute="height" constant="20" id="e67-GY-GHG"/>
</constraints>
<connections>
<action selector="sliderUp:" destination="NEQ-oF-OIb" eventType="touchUpOutside" id="F6D-ID-YgO"/>
<action selector="sliderUp:" destination="NEQ-oF-OIb" eventType="touchUpInside" id="tOl-cI-1SP"/>
<action selector="sliderUpdated:" destination="NEQ-oF-OIb" eventType="valueChanged" id="hUH-7g-f7m"/>
</connections>
</slider>
@@ -1234,17 +1242,19 @@
<constraint firstItem="aWK-yK-lEJ" firstAttribute="top" secondItem="1H3-4M-C6V" secondAttribute="bottom" constant="22.5" id="7Lq-PW-00v"/>
<constraint firstItem="Mg5-1E-BOM" firstAttribute="centerY" secondItem="Oz0-TQ-7Us" secondAttribute="centerY" id="8Z0-md-eJo"/>
<constraint firstItem="2PH-0T-Kfp" firstAttribute="top" secondItem="q9M-oW-UvF" secondAttribute="top" id="AOr-CM-UQp"/>
<constraint firstItem="cmz-wB-Puk" firstAttribute="centerY" secondItem="1H3-4M-C6V" secondAttribute="centerY" constant="-10" id="DKY-QN-SGp"/>
<constraint firstItem="UXs-vJ-DCL" firstAttribute="leading" secondItem="1H3-4M-C6V" secondAttribute="leading" id="NTP-cF-sx4"/>
<constraint firstItem="Mg5-1E-BOM" firstAttribute="leading" secondItem="Oz0-TQ-7Us" secondAttribute="trailing" constant="20" id="QOT-vj-HU3"/>
<constraint firstItem="cmz-wB-Puk" firstAttribute="width" secondItem="1H3-4M-C6V" secondAttribute="width" multiplier="0.545" id="SSx-OB-tM5"/>
<constraint firstAttribute="trailing" secondItem="Mg5-1E-BOM" secondAttribute="trailing" constant="16" id="WbU-av-WYV"/>
<constraint firstItem="UXs-vJ-DCL" firstAttribute="centerY" secondItem="1H3-4M-C6V" secondAttribute="centerY" constant="-10" id="Xan-Rk-JqY"/>
<constraint firstAttribute="trailing" secondItem="1H3-4M-C6V" secondAttribute="trailing" constant="25" id="Zf6-HA-hJE"/>
<constraint firstAttribute="trailing" secondItem="aWK-yK-lEJ" secondAttribute="trailing" id="bbc-sm-gUd"/>
<constraint firstItem="2PH-0T-Kfp" firstAttribute="leading" secondItem="q9M-oW-UvF" secondAttribute="leading" id="bgW-st-ySa"/>
<constraint firstItem="aWK-yK-lEJ" firstAttribute="leading" secondItem="q9M-oW-UvF" secondAttribute="leading" id="d1w-UN-xNw"/>
<constraint firstAttribute="bottom" secondItem="aWK-yK-lEJ" secondAttribute="bottom" id="hSc-m5-IIb"/>
<constraint firstItem="UXs-vJ-DCL" firstAttribute="width" secondItem="1H3-4M-C6V" secondAttribute="width" multiplier="0.545" id="iYt-zp-DNP"/>
<constraint firstAttribute="height" constant="44" id="kYu-Vk-xfW"/>
<constraint firstItem="cmz-wB-Puk" firstAttribute="leading" secondItem="1H3-4M-C6V" secondAttribute="leading" id="n9Y-J9-6kL"/>
<constraint firstAttribute="trailing" secondItem="2PH-0T-Kfp" secondAttribute="trailing" id="qLC-mO-meA"/>
<constraint firstItem="Oz0-TQ-7Us" firstAttribute="leading" secondItem="q9M-oW-UvF" secondAttribute="leading" constant="16" id="trh-a4-SJX"/>
<constraint firstItem="Oz0-TQ-7Us" firstAttribute="top" secondItem="q9M-oW-UvF" secondAttribute="top" constant="11.5" id="xo3-hC-yQ5"/>
@@ -1490,6 +1500,7 @@
<outlet property="bannerView" destination="24B-Po-72V" id="pxi-Lo-36X"/>
<outlet property="brightnessContainerHeightConstraint" destination="kYu-Vk-xfW" id="bl1-J0-FAG"/>
<outlet property="brightnessDescriptionLabel" destination="TU0-qj-CIf" id="hzF-GM-ygx"/>
<outlet property="brightnessPipView" destination="cmz-wB-Puk" id="abi-Yg-uZG"/>
<outlet property="brightnessSlider" destination="1H3-4M-C6V" id="bpe-B7-JH4"/>
<outlet property="brightnessSwitch" destination="Mg5-1E-BOM" id="Oex-1F-Jt2"/>
<outlet property="darkModeSwitch" destination="dGm-Ck-k4z" id="kVe-sw-TRl"/>
@@ -1499,6 +1510,7 @@
<outlet property="localThemesTableView" destination="BnV-BH-ZSC" id="9s7-Ah-R5a"/>
<outlet property="scrollContentHeightConstraint" destination="isV-yD-co8" id="YdG-bV-nkn"/>
<outlet property="sunImageView" destination="UXs-vJ-DCL" id="6SL-Ss-HB9"/>
<outlet property="sunLeadingConstraint" destination="NTP-cF-sx4" id="jTv-51-NIa"/>
<outletCollection property="separatorViews" destination="tsq-Cg-nOl" collectionClass="NSMutableArray" id="fWv-Rp-mtP"/>
<outletCollection property="separatorViews" destination="fZv-P8-1pN" collectionClass="NSMutableArray" id="MRp-ds-m3h"/>
<outletCollection property="sectionHeaderLabels" destination="f3H-Jd-vev" collectionClass="NSMutableArray" id="UUn-9i-Jgk"/>
@@ -1514,6 +1526,7 @@
<outletCollection property="separatorViews" destination="2PH-0T-Kfp" collectionClass="NSMutableArray" id="ZrT-2g-qvk"/>
<outletCollection property="separatorViews" destination="3je-PX-Pgn" collectionClass="NSMutableArray" id="Spy-uo-b6m"/>
<outletCollection property="brightnessViews" destination="UXs-vJ-DCL" collectionClass="NSMutableArray" id="zXx-Fi-3P3"/>
<outletCollection property="brightnessViews" destination="cmz-wB-Puk" collectionClass="NSMutableArray" id="8hV-8T-O0z"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="CI1-pK-d7y" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -1764,6 +1777,7 @@ Use with caution and care for your hearing.</string>
<resources>
<image name="BookPlayerPlus" width="102" height="102"/>
<image name="currentScreenBrightnessIndicator" width="30" height="40"/>
<image name="defaultDarkThemeThreshold" width="30" height="40"/>
<image name="listAdd" width="29" height="29"/>
<image name="plusImageAppIcons" width="64" height="64"/>
<image name="plusImageSupport" width="64" height="64"/>
@@ -30,6 +30,16 @@
<string>com.pkware.zip-archive</string>
</array>
</dict>
<dict>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string>Folders</string>
<key>LSItemContentTypes</key>
<array>
<string>public.folder</string>
</array>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
@@ -170,7 +180,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.3.0</string>
<string>3.3.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -187,7 +197,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>4</string>
<string>2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
Oops, something went wrong.

0 comments on commit 834ffe8

Please sign in to comment.
You can’t perform that action at this time.