Browse Source

aufräumen

master
Marco Schmickler 10 years ago
parent
commit
78280da162
  1. 119
      .idea/kplayer.iml
  2. 4
      Podfile
  3. 12
      kplayer.xcodeproj/project.pbxproj
  4. 2
      kplayer/core/ItemModel.swift
  5. 132
      kplayer/core/MediaItem.swift
  6. 60
      kplayer/core/NetworkManager.swift
  7. 56
      kplayer/detail/DetailViewController.swift
  8. 1
      kplayer/detail/HeaderCell.swift
  9. 5
      kplayer/detail/ItemCell.swift
  10. 36
      kplayer/detail/VideoPlayerController.swift
  11. 94
      kplayer/master/MasterViewController.swift
  12. 25
      kplayer/photo/MediaPhotoController.swift
  13. 2
      kplayer/util/DataLoadOperation.swift
  14. 2
      kplayer/util/ImageLoadOperation.swift
  15. 2
      kplayer/util/LayoutTools.swift
  16. 6
      kplayer/util/NetworkHelper.swift
  17. 5
      kplayer/util/UploadOperation.swift
  18. 5
      kplayer/util/ViewControllerExtensions.swift
  19. 32
      kplayer/util/alamoimage.swift

119
.idea/kplayer.iml

@ -16,13 +16,12 @@
<sourceFolder url="file://$MODULE_DIR$/kplayer/photo/MediaPhotoController.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/photo/MediaPhotoController.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/util/NetData.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/util/NetData.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/util/ImageLoadOperation.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/util/ImageLoadOperation.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/util/DataLoadOperation.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/util/HanekeFetchOperation.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/util/HanekeFetchOperation.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/util/UIImageExtension.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/util/UIImageExtension.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/util/ViewControllerExtensions.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/util/ViewControllerExtensions.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/util/LayoutTools.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/util/LayoutTools.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/util/UploadOperation.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/util/UploadOperation.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/util/alamoimage.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/util/DataLoadOperation.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/util/NetworkHelper.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/util/NetworkHelper.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/util/stringutil.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/util/stringutil.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/core/NetworkManager.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/core/NetworkManager.swift" isTestSource="false" />
@ -32,35 +31,35 @@
<sourceFolder url="file://$MODULE_DIR$/kplayer/master/MasterViewController.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/master/MasterViewController.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/Base.lproj/LaunchScreen.xib" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/Base.lproj/LaunchScreen.xib" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/kplayer/Base.lproj/Main.storyboard" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/kplayer/Base.lproj/Main.storyboard" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/MultipartFormData.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Download.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Download.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/ParameterEncoding.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/MultipartFormData.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/ResponseSerialization.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/ResponseSerialization.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/ServerTrustPolicy.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/ServerTrustPolicy.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/ParameterEncoding.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Manager.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Manager.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Result.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Error.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Alamofire.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Alamofire.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Request.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Request.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Stream.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Stream.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Upload.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Upload.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Validation.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Validation.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Error.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Alamofire/Source/Result.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/DiskFetcher.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/DiskFetcher.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Data.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/String+Haneke.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/String+Haneke.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/CGSize+Swift.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Log.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Log.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/CryptoSwiftMD5.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/NetworkFetcher.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/NetworkFetcher.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/UIButton+Haneke.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Data.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Format.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Format.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/UIButton+Haneke.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Haneke.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Haneke.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/UIImageView+Haneke.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/UIImageView+Haneke.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/DiskCache.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/DiskCache.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/UIView+Haneke.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/UIView+Haneke.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/CryptoSwiftMD5.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/NSFileManager+Haneke.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/UIImage+Haneke.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/UIImage+Haneke.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/NSFileManager+Haneke.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Fetcher.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Fetcher.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/CGSize+Swift.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/NSHTTPURLResponse+Haneke.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/NSHTTPURLResponse+Haneke.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Fetch.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Fetch.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Cache.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/HanekeSwift/Haneke/Cache.swift" isTestSource="false" />
@ -90,12 +89,6 @@
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Cent/Cent.modulemap" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Cent/Cent.modulemap" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Cent/Cent-prefix.pch" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Cent/Cent-prefix.pch" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Cent/Cent.xcconfig" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Cent/Cent.xcconfig" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/AFNetworking/AFNetworking-umbrella.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/AFNetworking/Info.plist" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/AFNetworking/AFNetworking.modulemap" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Nimbus/Nimbus.xcconfig" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Nimbus/Nimbus.xcconfig" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Nimbus/Nimbus-prefix.pch" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Nimbus/Nimbus-prefix.pch" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Nimbus/Nimbus-dummy.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Nimbus/Nimbus-dummy.m" isTestSource="false" />
@ -103,8 +96,8 @@
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Nimbus/Nimbus.modulemap" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Nimbus/Nimbus.modulemap" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Nimbus/Nimbus-umbrella.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Nimbus/Nimbus-umbrella.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/ALMoviePlayerController/ALMoviePlayerController-dummy.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/ALMoviePlayerController/ALMoviePlayerController-dummy.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/ALMoviePlayerController/ALMoviePlayerController-prefix.pch" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/ALMoviePlayerController/ALMoviePlayerController.modulemap" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/ALMoviePlayerController/ALMoviePlayerController.modulemap" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/ALMoviePlayerController/ALMoviePlayerController-prefix.pch" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/ALMoviePlayerController/Info.plist" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/ALMoviePlayerController/Info.plist" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/ALMoviePlayerController/ALMoviePlayerController.xcconfig" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/ALMoviePlayerController/ALMoviePlayerController.xcconfig" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/ALMoviePlayerController/ALMoviePlayerController-umbrella.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/ALMoviePlayerController/ALMoviePlayerController-umbrella.h" isTestSource="false" />
@ -114,82 +107,38 @@
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Dollar/Info.plist" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Dollar/Info.plist" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Dollar/Dollar.xcconfig" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Dollar/Dollar.xcconfig" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Dollar/Dollar-umbrella.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Dollar/Dollar-umbrella.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/SwiftyJSON/SwiftyJSON.xcconfig" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-umbrella.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/SwiftyJSON/Info.plist" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-prefix.pch" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/SwiftyJSON/SwiftyJSON.modulemap" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-dummy.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods.modulemap" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods.modulemap" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods-resources.sh" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods-dummy.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods-dummy.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods.debug.xcconfig" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods.release.xcconfig" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods.release.xcconfig" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Info.plist" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Info.plist" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods-umbrella.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods-umbrella.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods-frameworks.sh" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods-frameworks.sh" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods.debug.xcconfig" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods-resources.sh" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods-acknowledgements.plist" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Target Support Files/Pods/Pods-acknowledgements.plist" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFNetworking.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFURLSessionManager.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFURLSessionManager.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIDebuggingTools.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIDebuggingTools.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NISnapshotRotation.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NISnapshotRotation.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIDebuggingTools.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIDebuggingTools.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIFoundationMethods.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIFoundationMethods.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIDeviceOrientation.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIDeviceOrientation.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NimbusCore.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NimbusCore.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIFoundationMethods.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIFoundationMethods.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIActions.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIInMemoryCache.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIInMemoryCache.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIRuntimeClassModifications.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIRuntimeClassModifications.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIInMemoryCache.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIPaths.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIRuntimeClassModifications.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIRuntimeClassModifications.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIButtonUtilities.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIImageUtilities.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NISnapshotRotation.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIButtonUtilities.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIButtonUtilities.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIOperations.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NINonEmptyCollectionTesting.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIImageUtilities.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NINonEmptyCollectionTesting.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIActions.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIActions.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIDeviceOrientation.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NINonEmptyCollectionTesting.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIState.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIState.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIImageUtilities.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIActions.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NICommonMetrics.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NICommonMetrics.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NINonEmptyCollectionTesting.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIActions+Subclassing.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIDeviceOrientation.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIState.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIState.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIError.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIError.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NICommonMetrics.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NICommonMetrics.h" isTestSource="false" />
@ -197,21 +146,22 @@
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIPreprocessorMacros.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIPreprocessorMacros.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIError.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIError.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/UIResponder+NimbusCore.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/UIResponder+NimbusCore.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIPaths.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIViewRecycler.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIViewRecycler.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NISDKAvailability.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NISDKAvailability.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/UIResponder+NimbusCore.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/UIResponder+NimbusCore.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIOperations.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIOperations.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIViewRecycler.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIViewRecycler.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NISDKAvailability.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NISDKAvailability.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIOperations+Subclassing.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIOperations+Subclassing.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NINonRetainingCollections.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NINonRetainingCollections.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIOperations.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NINetworkActivity.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NINetworkActivity.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIActions+Subclassing.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIPaths.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NINonRetainingCollections.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NINonRetainingCollections.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIInMemoryCache.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NimbusCore+Additions.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NimbusCore+Additions.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIPaths.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NISnapshotRotation.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIImageUtilities.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/core/src/NIButtonUtilities.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/pagingscrollview/src/NIPagingScrollView.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/pagingscrollview/src/NIPagingScrollView.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/pagingscrollview/src/NIPagingScrollViewPage.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/pagingscrollview/src/NIPagingScrollViewPage.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/pagingscrollview/src/NIPagingScrollView.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/pagingscrollview/src/NIPagingScrollView.h" isTestSource="false" />
@ -232,6 +182,12 @@
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/photos/src/NIPhotoScrollViewDelegate.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/photos/src/NIPhotoScrollViewDelegate.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/photos/src/NIPhotoScrubberView.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Nimbus/src/photos/src/NIPhotoScrubberView.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALMoviePlayerController.m" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALMoviePlayerController.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALAirplayView.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALButton.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALMoviePlayerController.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALAirplayView.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALButton.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALMoviePlayerControls.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/Images/moviePause.png" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/Images/moviePause.png" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/Images/movieBackward.png" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/Images/movieBackward.png" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/Images/movieForward.png" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/Images/movieForward.png" isTestSource="false" />
@ -248,17 +204,10 @@
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/Images/movieFullscreen@2x.png" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/Images/movieFullscreen@2x.png" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/Images/movieFullscreen.png" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/Images/movieFullscreen.png" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/Images/movieForwardSelected@2x.png" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/Images/movieForwardSelected@2x.png" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALButton.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALAirplayView.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALMoviePlayerController.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALAirplayView.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALButton.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALMoviePlayerControls.m" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALMoviePlayerControls.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/ALMoviePlayerController/ALMoviePlayerController/ALMoviePlayerControls.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Dollar/Dollar/Dollar/Dollar.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Dollar/Dollar/Dollar/Dollar.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Dollar/Dollar/Dollar/Dollar.h" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Dollar/Dollar/Dollar/Dollar.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/Dollar/Dollar/Dollar/AutoCurry.swift" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/Pods/Dollar/Dollar/Dollar/AutoCurry.swift" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Pods/SwiftyJSON/Source/SwiftyJSON.swift" isTestSource="false" />
</content> </content>
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library"> <orderEntry type="module-library">

4
Podfile

@ -9,11 +9,11 @@ use_frameworks!
pod 'Alamofire', '~> 2.0' pod 'Alamofire', '~> 2.0'
pod 'ALMoviePlayerController', '~>0.3.0' pod 'ALMoviePlayerController', '~>0.3.0'
#pod 'DZVideoPlayerViewController' #pod 'DZVideoPlayerViewController'
pod 'SwiftyJSON'
#pod 'SwiftyJSON'
pod 'HanekeSwift' pod 'HanekeSwift'
pod 'Nimbus/Photos' pod 'Nimbus/Photos'
pod 'Nimbus/PagingScrollView' pod 'Nimbus/PagingScrollView'
pod 'AFNetworking', '~>2.1'
#pod 'AFNetworking', '~>2.1'
pod 'Dollar' pod 'Dollar'
pod 'Cent' pod 'Cent'
#, '1.2.0' #, '1.2.0'

12
kplayer.xcodeproj/project.pbxproj

@ -7,10 +7,8 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
1C73626E34BA4D64ACF94AE5 /* alamoimage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736C60C423AE87B8D0F22A /* alamoimage.swift */; };
1C73631EACF56BABD3B2BCFB /* LayoutTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736BC4450890C45F8FBC63 /* LayoutTools.swift */; }; 1C73631EACF56BABD3B2BCFB /* LayoutTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736BC4450890C45F8FBC63 /* LayoutTools.swift */; };
1C73635138BBD2BB480A308F /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C736777456388CA571DA17B /* MediaPlayer.framework */; }; 1C73635138BBD2BB480A308F /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C736777456388CA571DA17B /* MediaPlayer.framework */; };
1C7363D9DC8F9D1F866DE935 /* Kirschkeks-256x256.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C7368DC7EF11A553145E169 /* Kirschkeks-256x256.png */; };
1C73640D928DE56D35175D39 /* UploadOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736260E748CF136FF37EA7 /* UploadOperation.swift */; }; 1C73640D928DE56D35175D39 /* UploadOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736260E748CF136FF37EA7 /* UploadOperation.swift */; };
1C73646F87B495A47D7943C7 /* NetData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7369EC16B19B32B515169E /* NetData.swift */; }; 1C73646F87B495A47D7943C7 /* NetData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7369EC16B19B32B515169E /* NetData.swift */; };
1C736503B656C999E5E12081 /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7365B06FA66294E99AC2D3 /* NetworkManager.swift */; }; 1C736503B656C999E5E12081 /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7365B06FA66294E99AC2D3 /* NetworkManager.swift */; };
@ -24,6 +22,7 @@
1C73691A9C7174E0C6B57267 /* stringutil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736B794396F2E50387B8F2 /* stringutil.swift */; }; 1C73691A9C7174E0C6B57267 /* stringutil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736B794396F2E50387B8F2 /* stringutil.swift */; };
1C73693A1334A7792856FC58 /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73611D226B48C24DB37535 /* MasterViewController.swift */; }; 1C73693A1334A7792856FC58 /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73611D226B48C24DB37535 /* MasterViewController.swift */; };
1C7369ABC44CFB530EA71FB6 /* HeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736D9BB5498E7E8F11C754 /* HeaderCell.swift */; }; 1C7369ABC44CFB530EA71FB6 /* HeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736D9BB5498E7E8F11C754 /* HeaderCell.swift */; };
1C736A5FA5BA53B2597F2ED7 /* Kirschkeks-256x256.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C736059262A57AADE6AB761 /* Kirschkeks-256x256.png */; };
1C736D16E81BA1FB325200E0 /* HanekeFetchOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7360744ABACC3557D05760 /* HanekeFetchOperation.swift */; }; 1C736D16E81BA1FB325200E0 /* HanekeFetchOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7360744ABACC3557D05760 /* HanekeFetchOperation.swift */; };
1C736D24891597F2728230EE /* ImageLoadOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7360A94DBECA685ED8602F /* ImageLoadOperation.swift */; }; 1C736D24891597F2728230EE /* ImageLoadOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7360A94DBECA685ED8602F /* ImageLoadOperation.swift */; };
1C736D24B49451141CD4B64D /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7369F53095B7A4D65679C2 /* DetailViewController.swift */; }; 1C736D24B49451141CD4B64D /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7369F53095B7A4D65679C2 /* DetailViewController.swift */; };
@ -50,6 +49,7 @@
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
127AC1F28342F9AAE3CEC5C2 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 127AC1F28342F9AAE3CEC5C2 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1C736059262A57AADE6AB761 /* Kirschkeks-256x256.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Kirschkeks-256x256.png"; path = "kplayer/Kirschkeks-256x256.png"; sourceTree = "<group>"; };
1C736069C214E9522BB1BD97 /* ItemCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemCell.swift; sourceTree = "<group>"; }; 1C736069C214E9522BB1BD97 /* ItemCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemCell.swift; sourceTree = "<group>"; };
1C7360744ABACC3557D05760 /* HanekeFetchOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HanekeFetchOperation.swift; sourceTree = "<group>"; }; 1C7360744ABACC3557D05760 /* HanekeFetchOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HanekeFetchOperation.swift; sourceTree = "<group>"; };
1C7360A94DBECA685ED8602F /* ImageLoadOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageLoadOperation.swift; sourceTree = "<group>"; }; 1C7360A94DBECA685ED8602F /* ImageLoadOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageLoadOperation.swift; sourceTree = "<group>"; };
@ -63,12 +63,10 @@
1C73673DC671535E3A049F54 /* MediaPhotoController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaPhotoController.swift; sourceTree = "<group>"; }; 1C73673DC671535E3A049F54 /* MediaPhotoController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaPhotoController.swift; sourceTree = "<group>"; };
1C736777456388CA571DA17B /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; 1C736777456388CA571DA17B /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
1C73688DAB88F9360FB62A49 /* MediaItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaItem.swift; sourceTree = "<group>"; }; 1C73688DAB88F9360FB62A49 /* MediaItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaItem.swift; sourceTree = "<group>"; };
1C7368DC7EF11A553145E169 /* Kirschkeks-256x256.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Kirschkeks-256x256.png"; sourceTree = "<group>"; };
1C7369EC16B19B32B515169E /* NetData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetData.swift; sourceTree = "<group>"; }; 1C7369EC16B19B32B515169E /* NetData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetData.swift; sourceTree = "<group>"; };
1C7369F53095B7A4D65679C2 /* DetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = "<group>"; }; 1C7369F53095B7A4D65679C2 /* DetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = "<group>"; };
1C736B794396F2E50387B8F2 /* stringutil.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = stringutil.swift; sourceTree = "<group>"; }; 1C736B794396F2E50387B8F2 /* stringutil.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = stringutil.swift; sourceTree = "<group>"; };
1C736BC4450890C45F8FBC63 /* LayoutTools.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutTools.swift; sourceTree = "<group>"; }; 1C736BC4450890C45F8FBC63 /* LayoutTools.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutTools.swift; sourceTree = "<group>"; };
1C736C60C423AE87B8D0F22A /* alamoimage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = alamoimage.swift; sourceTree = "<group>"; };
1C736D9BB5498E7E8F11C754 /* HeaderCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeaderCell.swift; sourceTree = "<group>"; }; 1C736D9BB5498E7E8F11C754 /* HeaderCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeaderCell.swift; sourceTree = "<group>"; };
1C736DCCE3AA9993E15F7652 /* UIImageExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageExtension.swift; sourceTree = "<group>"; }; 1C736DCCE3AA9993E15F7652 /* UIImageExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageExtension.swift; sourceTree = "<group>"; };
1C736F9338CE36708244D42A /* DataLoadOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataLoadOperation.swift; sourceTree = "<group>"; }; 1C736F9338CE36708244D42A /* DataLoadOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataLoadOperation.swift; sourceTree = "<group>"; };
@ -143,7 +141,6 @@
1C7369EC16B19B32B515169E /* NetData.swift */, 1C7369EC16B19B32B515169E /* NetData.swift */,
1C7360744ABACC3557D05760 /* HanekeFetchOperation.swift */, 1C7360744ABACC3557D05760 /* HanekeFetchOperation.swift */,
1C7360A94DBECA685ED8602F /* ImageLoadOperation.swift */, 1C7360A94DBECA685ED8602F /* ImageLoadOperation.swift */,
1C736C60C423AE87B8D0F22A /* alamoimage.swift */,
1C736F9338CE36708244D42A /* DataLoadOperation.swift */, 1C736F9338CE36708244D42A /* DataLoadOperation.swift */,
1C736B794396F2E50387B8F2 /* stringutil.swift */, 1C736B794396F2E50387B8F2 /* stringutil.swift */,
1C73648CEC974A2500172064 /* ViewControllerExtensions.swift */, 1C73648CEC974A2500172064 /* ViewControllerExtensions.swift */,
@ -187,6 +184,7 @@
C98AF5D01B124D6A00D196CC /* Products */, C98AF5D01B124D6A00D196CC /* Products */,
8EB26707CC8BD3E10F328A9E /* Pods */, 8EB26707CC8BD3E10F328A9E /* Pods */,
8CB608B13A2BDFA9D708982B /* Frameworks */, 8CB608B13A2BDFA9D708982B /* Frameworks */,
1C736059262A57AADE6AB761 /* Kirschkeks-256x256.png */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -209,7 +207,6 @@
C98AF5D61B124D6A00D196CC /* kplayer.xcdatamodeld */, C98AF5D61B124D6A00D196CC /* kplayer.xcdatamodeld */,
C98AF5D21B124D6A00D196CC /* Supporting Files */, C98AF5D21B124D6A00D196CC /* Supporting Files */,
1C736DC8C3AFB991541A2079 /* core */, 1C736DC8C3AFB991541A2079 /* core */,
1C7368DC7EF11A553145E169 /* Kirschkeks-256x256.png */,
1C7365603CAE04E39B73D843 /* util */, 1C7365603CAE04E39B73D843 /* util */,
1C73615846EE8B07DAAFD230 /* detail */, 1C73615846EE8B07DAAFD230 /* detail */,
1C7364808E72BFA7575E75E1 /* master */, 1C7364808E72BFA7575E75E1 /* master */,
@ -332,7 +329,7 @@
C98AF5DF1B124D6A00D196CC /* Main.storyboard in Resources */, C98AF5DF1B124D6A00D196CC /* Main.storyboard in Resources */,
C98AF5E41B124D6A00D196CC /* LaunchScreen.xib in Resources */, C98AF5E41B124D6A00D196CC /* LaunchScreen.xib in Resources */,
C98AF5E11B124D6A00D196CC /* Images.xcassets in Resources */, C98AF5E11B124D6A00D196CC /* Images.xcassets in Resources */,
1C7363D9DC8F9D1F866DE935 /* Kirschkeks-256x256.png in Resources */,
1C736A5FA5BA53B2597F2ED7 /* Kirschkeks-256x256.png in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -415,7 +412,6 @@
1C7365885FAF292F2221ED44 /* MediaPhotoController.swift in Sources */, 1C7365885FAF292F2221ED44 /* MediaPhotoController.swift in Sources */,
1C736D16E81BA1FB325200E0 /* HanekeFetchOperation.swift in Sources */, 1C736D16E81BA1FB325200E0 /* HanekeFetchOperation.swift in Sources */,
1C736D24891597F2728230EE /* ImageLoadOperation.swift in Sources */, 1C736D24891597F2728230EE /* ImageLoadOperation.swift in Sources */,
1C73626E34BA4D64ACF94AE5 /* alamoimage.swift in Sources */,
1C7367AF39961D2BA72480ED /* DataLoadOperation.swift in Sources */, 1C7367AF39961D2BA72480ED /* DataLoadOperation.swift in Sources */,
1C73675C34BE0990D44570BE /* ItemModel.swift in Sources */, 1C73675C34BE0990D44570BE /* ItemModel.swift in Sources */,
1C73691A9C7174E0C6B57267 /* stringutil.swift in Sources */, 1C73691A9C7174E0C6B57267 /* stringutil.swift in Sources */,

2
kplayer/core/ItemModel.swift

@ -10,7 +10,7 @@ class ItemModel {
var itemsMap = Dictionary<String, MediaItem>() var itemsMap = Dictionary<String, MediaItem>()
func addItem(item: MediaItem) { func addItem(item: MediaItem) {
let path = item.rootSlash + item.path
let path = item.root + "/" + item.path
print(path) print(path)
var folder = itemsMap[path] var folder = itemsMap[path]

132
kplayer/core/MediaItem.swift

@ -6,39 +6,82 @@
import Foundation import Foundation
import UIKit import UIKit
enum ItemType : String, CustomStringConvertible {
enum ItemType: String, CustomStringConvertible {
/**
Repräsentiert eine Wurzel, in der nur Bilder angezeigt werden.
*/
case ROOT = "root" case ROOT = "root"
/**
Repräsentiert eine Wurzel, in der nur Videos angezeigt werden.
*/
case VIDEOROOT = "videoroot" case VIDEOROOT = "videoroot"
/**
Repräsentiert einen Ordner. Darin sind weitere Ordner enthalten.
*/
case FOLDER = "folder" case FOLDER = "folder"
/**
Repräsentiert ein Video. Hat keine Unterordner. Die Children sind Snapshots.
*/
case VIDEO = "video" case VIDEO = "video"
/**
Snapshots eines Videos.
*/
case SNAPSHOT = "snapshot"
/**
Repräsentiert einen Bilder-Ordner.
*/
case PICS = "pics" case PICS = "pics"
/**
Repräsentiert einen Ordner, der Videos oder Bilder-Ordner enthält. Wird im DetailViewController angezeigt.
*/
case DETAILS = "details" case DETAILS = "details"
case SNAPSHOT = "snapshot"
var description: String { var description: String {
return self.rawValue return self.rawValue
} }
} }
class MediaItem : CustomDebugStringConvertible {
var name : String
var path : String
var root: String
/**
Repräsentiert ein Item eines der festgelegten Typen.
*/
class MediaItem: CustomDebugStringConvertible {
var image: UIImage?
var time: NSTimeInterval?
var thumbUrl: String?
/**
Wird durch name, path und root identifiziert.
*/
var name: String
var path: String
var root: String
var children: [MediaItem] var children: [MediaItem]
var parent: MediaItem? var parent: MediaItem?
var type: ItemType var type: ItemType
/**
Position innerhalb der Children
*/
var index = 0 var index = 0
/**
true, wenn die Children geladen sind
*/
var loaded = false var loaded = false
var featured = true
// abgeleitet
var sortName = "" var sortName = ""
// Nutzinhalt
var image: UIImage?
var time: NSTimeInterval?
var thumbUrl: String?
init(name: String, path: String, root: String, type: ItemType) { init(name: String, path: String, root: String, type: ItemType) {
self.name = name self.name = name
let trim = NSCharacterSet(charactersInString: "/ ") let trim = NSCharacterSet(charactersInString: "/ ")
@ -51,10 +94,14 @@ class MediaItem : CustomDebugStringConvertible {
sortName = computeSortName(name) sortName = computeSortName(name)
} }
func computeSortName(sname: String) -> String {
private func computeSortName(sname: String) -> String {
var lsortName = sname.stringByReplacingOccurrencesOfString("full", withString: "") var lsortName = sname.stringByReplacingOccurrencesOfString("full", withString: "")
var fullNameArr = sortName.characters.split {$0 == "_"}.map { String($0) }
// println (lsortName)
var fullNameArr = sortName.characters.split {
$0 == "_"
}.map {
String($0)
}
if !fullNameArr.isEmpty { if !fullNameArr.isEmpty {
lsortName = fullNameArr[0] lsortName = fullNameArr[0]
} }
@ -66,63 +113,58 @@ class MediaItem : CustomDebugStringConvertible {
return lsortName return lsortName
} }
var thumbPath: String {
/**
Ordner, in dem die Snapshots eines Videos abgelegt sind.
Absoluter Pfad mit Slash am Ende.
*/
var snapshotDirPathForVideo: String {
let len = "/srv/samba/ren".characters.count let len = "/srv/samba/ren".characters.count
let tpath = "/srv/samba/ren/thumb" + (rootSlash as NSString).substringFromIndex(len) + pathSlash + name
let enc = tpath.stringByAddingPercentEscapesUsingEncoding(NSISOLatin1StringEncoding)! //.stringByReplacingOccurrencesOfString(" ", withString: "%20")
let rootPostfix = (root as NSString).substringFromIndex(len)
let tpath = "/srv/samba/ren/thumb\(rootPostfix)/\(path)/\(name)"
let enc = tpath.stringByAddingPercentEscapesUsingEncoding(NSISOLatin1StringEncoding)!
return enc + "/" return enc + "/"
} }
/**
Absolute URL, unter der das Thumbnail des Items abgerufen werden kann.
*/
var thumbUrlAbsolute: String { var thumbUrlAbsolute: String {
let enc = thumbUrl!.stringByAddingPercentEscapesUsingEncoding(NSISOLatin1StringEncoding)! //.stringByReplacingOccurrencesOfString(" ", withString: "%20")
let enc = thumbUrl!.stringByAddingPercentEscapesUsingEncoding(NSISOLatin1StringEncoding)!
return NetworkManager.sharedInstance.baseurl + "/service/download" + enc return NetworkManager.sharedInstance.baseurl + "/service/download" + enc
} }
/**
Absolute URL, unter der das Image des Items abgerufen werden kann.
*/
var imageUrlAbsolute: String { var imageUrlAbsolute: String {
var imageUrl = thumbUrl!.stringByReplacingOccurrencesOfString("_thumb.", withString: ".") var imageUrl = thumbUrl!.stringByReplacingOccurrencesOfString("_thumb.", withString: ".")
imageUrl = imageUrl.stringByReplacingOccurrencesOfString("?preview=true", withString: "") imageUrl = imageUrl.stringByReplacingOccurrencesOfString("?preview=true", withString: "")
imageUrl = imageUrl.stringByAddingPercentEscapesUsingEncoding(NSISOLatin1StringEncoding)! //.stringByReplacingOccurrencesOfString(" ", withString: "%20")
imageUrl = imageUrl.stringByAddingPercentEscapesUsingEncoding(NSISOLatin1StringEncoding)!
return NetworkManager.sharedInstance.baseurl + "/service/download" + imageUrl return NetworkManager.sharedInstance.baseurl + "/service/download" + imageUrl
} }
var playerURL: NSURL? {
let enc = name.stringByReplacingOccurrencesOfString(" ", withString: "%20")
return NSURL(string: NetworkManager.sharedInstance.baseurl + "/service/stream" + encodedDir! + enc)
}
/**
Absoluter Pfad des Items.
*/
var fullPath: String { var fullPath: String {
let fpath = rootSlash + pathSlash + name
let enc = fpath.stringByAddingPercentEscapesUsingEncoding(NSISOLatin1StringEncoding) //.stringByReplacingOccurrencesOfString(" ", withString: "%20")
let fpath = "\(root)/\(path)/\(name)"
let enc = fpath.stringByAddingPercentEscapesUsingEncoding(NSISOLatin1StringEncoding)
return enc! return enc!
} }
var debugDescription: String { var debugDescription: String {
return "\(type): \(root) \(path) \(name) (\(index)) Child count \(children.count)" return "\(type): \(root) \(path) \(name) (\(index)) Child count \(children.count)"
} }
var rootSlash: String {
if root.endsWith("/") {
return root
}
else {
return root + "/"
}
}
var pathSlash: String {
if path.characters.count == 0 {
return ""
}
if path.endsWith("/") {
return path
}
else {
return path + "/"
}
}
var encodedDir: String? { var encodedDir: String? {
let dir = rootSlash + path
let dir = "\(root)/\(path)"
return dir.stringByAddingPercentEscapesUsingEncoding(NSISOLatin1StringEncoding) return dir.stringByAddingPercentEscapesUsingEncoding(NSISOLatin1StringEncoding)
} }

60
kplayer/core/NetworkManager.swift

@ -21,7 +21,7 @@ class NetworkManager {
}() }()
public typealias Weiter = ([MediaItem]) -> Void
internal typealias Weiter = ([MediaItem]) -> Void
func loadDirs(root: String, completionHandler: Weiter) -> Void { func loadDirs(root: String, completionHandler: Weiter) -> Void {
let url1 = baseurl + "/service/listvideos" + root let url1 = baseurl + "/service/listvideos" + root
@ -33,8 +33,7 @@ class NetworkManager {
(_, _, response) in (_, _, response) in
if let json = response.value { if let json = response.value {
var hashes = Set<String>()
for s in json as! [String] { for s in json as! [String] {
print(s) print(s)
if s.hasSuffix(".mp4") || s.hasSuffix(".m4v") { if s.hasSuffix(".mp4") || s.hasSuffix(".m4v") {
@ -121,39 +120,7 @@ class NetworkManager {
} }
} }
func loadDir(root: String, completionHandler: ([MediaItem]) -> Void) -> Void {
var itemsArray = [];
let url = (root as NSString).stringByReplacingOccurrencesOfString(" ", withString: "+")
Alamofire.request(.GET, baseurl + "/service/dirs" + url)
.responseString {
(_, _, result) in
let string = result.value!
let f = string.componentsSeparatedByString("\r\n")
let len = root.length
var res = [MediaItem]()
for s in f {
if s.hasSuffix(".mp4") || s.hasSuffix(".m4v") {
let l = s.length
let name = NSURL(fileURLWithPath: s).lastPathComponent!
let pathlen = l - len - name.length
let path = (s as NSString).substringWithRange(NSMakeRange(len + 1, pathlen - 2))
let i = MediaItem(name: name, path: path, root: root, type: ItemType.VIDEO)
if !name.hasPrefix(".") {
res.append(i)
}
}
}
completionHandler(res)
}
}
func listDirs(root: String, completionHandler: ([MediaItem], Bool) -> Void) -> Void { func listDirs(root: String, completionHandler: ([MediaItem], Bool) -> Void) -> Void {
var itemsArray = [];
let len = root.characters.count let len = root.characters.count
let url = (root as NSString).stringByReplacingOccurrencesOfString(" ", withString: "+") let url = (root as NSString).stringByReplacingOccurrencesOfString(" ", withString: "+")
@ -174,8 +141,8 @@ class NetworkManager {
// let (a,b) = j # // let (a,b) = j #
var index1 = s.startIndex.advancedBy(len)
var st = s.substringFromIndex(index1)
let index1 = s.startIndex.advancedBy(len)
let st = s.substringFromIndex(index1)
print(st) print(st)
@ -186,7 +153,7 @@ class NetworkManager {
if s.lowercaseString.hasSuffix(".jpg") { if s.lowercaseString.hasSuffix(".jpg") {
let l = s.length let l = s.length
let name = (s as NSString).lastPathComponent let name = (s as NSString).lastPathComponent
var pathlen = l - len - name.length
let pathlen = l - len - name.length
// if (pathlen > 1000) { // if (pathlen > 1000) {
print(pathlen) print(pathlen)
@ -222,11 +189,6 @@ class NetworkManager {
} }
} }
func playerURL(item: MediaItem) -> String {
let enc = item.name.stringByReplacingOccurrencesOfString(" ", withString: "%20")
return baseurl + "/service/stream" + item.rootSlash + item.pathSlash + enc
}
func loadItems(item: MediaItem) { func loadItems(item: MediaItem) {
if (item.type != ItemType.FOLDER && item.type != ItemType.DETAILS) { if (item.type != ItemType.FOLDER && item.type != ItemType.DETAILS) {
return return
@ -259,7 +221,7 @@ class NetworkManager {
return return
} }
let url = baseurl + "/service/listfiles" + item.thumbPath
let url = baseurl + "/service/listfiles" + item.snapshotDirPathForVideo
print(url) print(url)
@ -276,13 +238,13 @@ class NetworkManager {
if p.containsString("_thumb.jpg") { if p.containsString("_thumb.jpg") {
let ts = p[0 ..< p.length - 10] let ts = p[0 ..< p.length - 10]
hashes[ts] = b as! String
hashes[ts] = b
} else { } else {
let ende = p.length - 4 let ende = p.length - 4
let ts = p[0 ..< ende] let ts = p[0 ..< ende]
if hashes[ts] == nil { if hashes[ts] == nil {
hashes[ts] = b as! String
hashes[ts] = b
} }
} }
} }
@ -325,7 +287,7 @@ class NetworkManager {
return return
} }
let url = baseurl + "/service/listfiles" + item.thumbPath
let url = baseurl + "/service/listfiles" + item.snapshotDirPathForVideo
print(url) print(url)
@ -344,8 +306,8 @@ class NetworkManager {
for c in item.children { for c in item.children {
if let t = c.time { if let t = c.time {
let ms = Int(t * 1000) let ms = Int(t * 1000)
let p = c.thumbPath + "\(ms).jpg"
let pt = c.thumbPath + "\(ms)_thumb.jpg"
let p = c.snapshotDirPathForVideo + "\(ms).jpg"
let pt = c.snapshotDirPathForVideo + "\(ms)_thumb.jpg"
print(p) print(p)
if hashes.contains(pt) { if hashes.contains(pt) {
print("contained") print("contained")

56
kplayer/detail/DetailViewController.swift

@ -26,41 +26,9 @@ class DetailViewController: UIViewController, UICollectionViewDelegateFlowLayout
if collectionView != nil { if collectionView != nil {
collectionView.reloadData() collectionView.reloadData()
} }
// Update the view.
// self.configureView()
} }
} }
func configureView() {
// Update the user interface for the detail item.
print(detailItem)
if let detail: MediaItem = self.detailItem {
print(detail)
print(detail.children)
if let label = self.detailDescriptionLabel {
label.text = detail.name
}
if detail.children.count > 0 {
let i = detail.children[0]
let url = NetworkManager.sharedInstance.playerURL(i)
print(url)
// if moviePlayer == nil {
// play(url)
// }
}
}
}
override func loadView() {
super.loadView()
}
required init?(coder aDecoder: NSCoder) { required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder) super.init(coder: aDecoder)
@ -152,10 +120,6 @@ class DetailViewController: UIViewController, UICollectionViewDelegateFlowLayout
print("Object: \(oid.hashValue) Index \(index) Item: \(i) Parent: \(i.parent) Detail: \(detailItem)") print("Object: \(oid.hashValue) Index \(index) Item: \(i) Parent: \(i.parent) Detail: \(detailItem)")
// if (count(detail.children) > 100) {
// self.collectionView.reloadData()
// }
// else {
collectionView.performBatchUpdates({ collectionView.performBatchUpdates({
var newItems = [NSIndexPath]() var newItems = [NSIndexPath]()
var j = 0 var j = 0
@ -164,7 +128,7 @@ class DetailViewController: UIViewController, UICollectionViewDelegateFlowLayout
let path = NSIndexPath(forItem: 0, inSection: index) let path = NSIndexPath(forItem: 0, inSection: index)
self.collectionView.reloadItemsAtIndexPaths([path]) self.collectionView.reloadItemsAtIndexPaths([path])
for i in detail.children[index].children {
for _ in detail.children[index].children {
if j >= 1 { if j >= 1 {
newItems.append(NSIndexPath(forItem: j, inSection: index)) newItems.append(NSIndexPath(forItem: j, inSection: index))
} }
@ -174,7 +138,6 @@ class DetailViewController: UIViewController, UICollectionViewDelegateFlowLayout
} }
return return
}, completion: nil) }, completion: nil)
// }
} }
} }
@ -199,8 +162,8 @@ class DetailViewController: UIViewController, UICollectionViewDelegateFlowLayout
let c = items.children.removeAtIndex(indexPath!.item) let c = items.children.removeAtIndex(indexPath!.item)
if let t = c.time { if let t = c.time {
let ms = Int(t * 1000) let ms = Int(t * 1000)
let p = c.thumbPath + "\(ms).jpg"
let pt = c.thumbPath + "\(ms)_thumb.jpg"
let p = c.snapshotDirPathForVideo + "\(ms).jpg"
let pt = c.snapshotDirPathForVideo + "\(ms)_thumb.jpg"
Alamofire.request(.GET, NetworkManager.sharedInstance.baseurl + "/service/deletethumb\(p)") Alamofire.request(.GET, NetworkManager.sharedInstance.baseurl + "/service/deletethumb\(p)")
Alamofire.request(.GET, NetworkManager.sharedInstance.baseurl + "/service/deletethumb\(pt)") Alamofire.request(.GET, NetworkManager.sharedInstance.baseurl + "/service/deletethumb\(pt)")
} }
@ -212,18 +175,6 @@ class DetailViewController: UIViewController, UICollectionViewDelegateFlowLayout
} }
} }
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
// self.configureView()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int {
if let detail: MediaItem = self.detailItem { if let detail: MediaItem = self.detailItem {
let cnt = detail.children.count let cnt = detail.children.count
@ -307,7 +258,6 @@ class DetailViewController: UIViewController, UICollectionViewDelegateFlowLayout
if let json = response.value { if let json = response.value {
var im = [MediaItem]() var im = [MediaItem]()
var hashes = Dictionary<String, String>()
for s in json as! [String] { for s in json as! [String] {

1
kplayer/detail/HeaderCell.swift

@ -5,7 +5,6 @@
import Foundation import Foundation
import UIKit import UIKit
import Haneke
class HeaderCell: UICollectionViewCell { class HeaderCell: UICollectionViewCell {
var item: MediaItem? var item: MediaItem?

5
kplayer/detail/ItemCell.swift

@ -16,10 +16,8 @@ class ItemCell: UICollectionViewCell {
required init?(coder aDecoder: NSCoder) { required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder) super.init(coder: aDecoder)
} }
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
@ -36,12 +34,11 @@ class ItemCell: UICollectionViewCell {
func setItem(item: MediaItem) { func setItem(item: MediaItem) {
self.item = item self.item = item
if let url = item.thumbUrl, nsurl = NSURL(string: item.thumbUrlAbsolute) {
if let _ = item.thumbUrl, nsurl = NSURL(string: item.thumbUrlAbsolute) {
image.hnk_setImageFromURL(nsurl, placeholder: defaultImage) image.hnk_setImageFromURL(nsurl, placeholder: defaultImage)
} else { } else {
if let i = item.image { if let i = item.image {
image.image = i.scaleToSize(15 * 16, height: 15 * 9) image.image = i.scaleToSize(15 * 16, height: 15 * 9)
// image.sizeToFit()
} else { } else {
image.image = defaultImage image.image = defaultImage
} }

36
kplayer/detail/VideoPlayerController.swift

@ -35,10 +35,6 @@ class VideoPlayerController: UIViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
let url = NetworkManager.sharedInstance.playerURL(currentItem!)
print(url)
barbutton = UIBarButtonItem(barButtonSystemItem: .Action, target: self, action: Selector("twoFingersTwoTaps")); barbutton = UIBarButtonItem(barButtonSystemItem: .Action, target: self, action: Selector("twoFingersTwoTaps"));
navigationItem.rightBarButtonItems = [barbutton!] navigationItem.rightBarButtonItems = [barbutton!]
@ -49,7 +45,10 @@ class VideoPlayerController: UIViewController {
navigationItem.leftBarButtonItems = [backButton!, playButton!, speedButton!, reviewButton!] navigationItem.leftBarButtonItems = [backButton!, playButton!, speedButton!, reviewButton!]
play(url)
if let c = currentItem, url = c.playerURL {
print(url)
play(url)
}
} }
func doEdit(sender: AnyObject) { func doEdit(sender: AnyObject) {
@ -96,7 +95,7 @@ print("play")
completionHandler!() completionHandler!()
} }
func play(url: String) {
func play(url: NSURL) {
self.moviePlayer = ALMoviePlayerController(frame: CGRectMake(0, 0, view.frame.width, view.frame.height)) self.moviePlayer = ALMoviePlayerController(frame: CGRectMake(0, 0, view.frame.width, view.frame.height))
if let player = self.moviePlayer { if let player = self.moviePlayer {
@ -115,21 +114,11 @@ print("play")
// player.controlStyle = MPMovieControlStyle.Embedded // player.controlStyle = MPMovieControlStyle.Embedded
player.movieSourceType = MPMovieSourceType.Streaming player.movieSourceType = MPMovieSourceType.Streaming
player.repeatMode = MPMovieRepeatMode.One player.repeatMode = MPMovieRepeatMode.One
player.contentURL = NSURL(string: url)
// player.play()
// var timer = NSTimer.scheduledTimerWithTimeInterval(0.8, target: self, selector: Selector("update"), userInfo: nil, repeats: false)
player.contentURL = url
// view.autolayout(["controls": movieControls, "player": player.view],
// constraints:
// "H:|-[player]-|",
// "H:|-[controls]-|",
// "V:|-[player]-[controls(<=50)]-|" )
self.view.addSubview(player.view) self.view.addSubview(player.view)
installGestures(player.view) installGestures(player.view)
update() update()
// view.addSubview(movieControls)
// player.setFrame(view.frame)
} }
} }
@ -193,9 +182,9 @@ print("play")
func update() { func update() {
if let player = self.moviePlayer { if let player = self.moviePlayer {
if !(player.duration > 0.0) { // player.loadState == MPMovieLoadState.Unknown || player.loadState == MPMovieLoadState.Stalled {
if !(player.duration > 0.0) {
print("again") print("again")
var timer = NSTimer.scheduledTimerWithTimeInterval(0.3, target: self, selector: Selector("update"), userInfo: nil, repeats: false)
NSTimer.scheduledTimerWithTimeInterval(0.3, target: self, selector: Selector("update"), userInfo: nil, repeats: false)
return return
} }
@ -221,7 +210,6 @@ print("play")
} }
player.play() player.play()
// player.fullscreen = true
} }
} }
@ -288,9 +276,9 @@ print("play")
print("'Switched Type: \(currentItem!.type) Count: \(currentItem!.children.count) Index: \(index) Current: \(currentItem!.index)") print("'Switched Type: \(currentItem!.type) Count: \(currentItem!.children.count) Index: \(index) Current: \(currentItem!.index)")
index = 0 index = 0
player.contentURL = NSURL(string: NetworkManager.sharedInstance.playerURL(currentItem!))
player.contentURL = currentItem!.playerURL
player.play() player.play()
var timer = NSTimer.scheduledTimerWithTimeInterval(1.2, target: self, selector: Selector("update"), userInfo: nil, repeats: false)
NSTimer.scheduledTimerWithTimeInterval(1.2, target: self, selector: Selector("update"), userInfo: nil, repeats: false)
return return
} }
@ -331,9 +319,9 @@ print("play")
currentItem = currentItem!.parent!.children[newIndex] currentItem = currentItem!.parent!.children[newIndex]
index = 0; index = 0;
player.contentURL = NSURL(string: NetworkManager.sharedInstance.playerURL(currentItem!))
player.contentURL = currentItem!.playerURL
player.play() player.play()
var timer = NSTimer.scheduledTimerWithTimeInterval(1.2, target: self, selector: Selector("update"), userInfo: nil, repeats: false)
NSTimer.scheduledTimerWithTimeInterval(1.2, target: self, selector: Selector("update"), userInfo: nil, repeats: false)
return return
} }

94
kplayer/master/MasterViewController.swift

@ -11,8 +11,6 @@ import CoreData
class MasterViewController: UITableViewController { class MasterViewController: UITableViewController {
var detailViewController: DetailViewController? = nil
var items = [MediaItem]() var items = [MediaItem]()
var itemsMap = Dictionary<String, MediaItem>() var itemsMap = Dictionary<String, MediaItem>()
@ -25,8 +23,9 @@ class MasterViewController: UITableViewController {
} }
func addItem(item: MediaItem) { func addItem(item: MediaItem) {
let path = item.rootSlash + item.path
let path = item.encodedDir!
print(path) print(path)
var folder = itemsMap[path] var folder = itemsMap[path]
if folder == nil { if folder == nil {
@ -40,27 +39,8 @@ class MasterViewController: UITableViewController {
item.parent = folder item.parent = folder
} }
func loadDirs(dir: String) {
NetworkManager.sharedInstance.loadDirs(dir) {
(g) in
for f in g {
self.addItem(f)
}
self.tableView.reloadData()
}
}
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
// self.navigationItem.leftBarButtonItem = self.editButtonItem()
// let addButton = UIBarButtonItem(barButtonSystemItem: .Add, target: self, action: "insertNewObject:")
// self.navigationItem.rightBarButtonItem = addButton
if let split = self.splitViewController {
self.detailViewController = split.findChildController(DetailViewController.self)
}
} }
override func didReceiveMemoryWarning() { override func didReceiveMemoryWarning() {
@ -75,11 +55,6 @@ class MasterViewController: UITableViewController {
let selectedItem = items[indexPath.row] let selectedItem = items[indexPath.row]
if (selectedItem.type == ItemType.DETAILS) { if (selectedItem.type == ItemType.DETAILS) {
// if !selectedItem.loaded {
// NetworkManager.sharedInstance.loadPicDirs(selectedItem.encodedDir!, completionHandler: weiter)
// return
// }
performSegueWithIdentifier("showDetail", sender: self) performSegueWithIdentifier("showDetail", sender: self)
return return
} }
@ -99,57 +74,7 @@ class MasterViewController: UITableViewController {
if (selectedItem.type == ItemType.FOLDER) { if (selectedItem.type == ItemType.FOLDER) {
vc.navigationItem.title = selectedItem.name; vc.navigationItem.title = selectedItem.name;
if !selectedItem.loaded {
let dir = selectedItem.encodedDir!
let weiter: NetworkManager.Weiter = {
(g) in
for f in g {
vc.addItem(f)
}
selectedItem.children = vc.items
selectedItem.loaded = true
var all: [MediaItem]?
for f in selectedItem.children {
print(f.path)
if f.type == ItemType.FOLDER && f.path != "" {
self.navigationController!.pushViewController(vc, animated: true)
return
}
if f.type == ItemType.FOLDER && f.path == "" {
all = f.children
// break
}
}
if all != nil {
selectedItem.children = all!
selectedItem.loaded = false
for f in all! {
f.loaded = false
f.parent = selectedItem
}
}
self.performSegueWithIdentifier("showDetail", sender: self)
return
}
let p = selectedItem.parent!
if p.type == ItemType.VIDEOROOT {
// NetworkManager.sharedInstance.loadDirs(dir, completionHandler: weiter)
}
else if p.type == ItemType.DETAILS {
// NetworkManager.sharedInstance.loadPicDirs(dir, completionHandler: weiter)
}
else if p.type == ItemType.FOLDER {
}
} else {
if selectedItem.loaded {
vc.items = selectedItem.children vc.items = selectedItem.children
navigationController!.pushViewController(vc, animated: true) navigationController!.pushViewController(vc, animated: true)
return return
@ -170,7 +95,6 @@ class MasterViewController: UITableViewController {
for item in i { for item in i {
if item.type != ItemType.FOLDER && supertype != ItemType.VIDEOROOT { if item.type != ItemType.FOLDER && supertype != ItemType.VIDEOROOT {
item.parent = newFolder item.parent = newFolder
// item.path = ""
newFolder.children.append(item) newFolder.children.append(item)
} }
else { else {
@ -238,25 +162,15 @@ class MasterViewController: UITableViewController {
else { else {
NetworkManager.sharedInstance.loadPicDirs(dir, completionHandler: weiter) NetworkManager.sharedInstance.loadPicDirs(dir, completionHandler: weiter)
} }
// self.performSegueWithIdentifier("showDetail", sender: self)
return return
} }
else {
// var folders = [MediaItem]()
// var folders = [MediaItem]()
// for item in i {
//
// }
}
vc.items = neu vc.items = neu
vc.tableView.reloadData() vc.tableView.reloadData()
vc.navigationItem.title = selectedItem.name; vc.navigationItem.title = selectedItem.name;
self.navigationController!.pushViewController(vc, animated: true) self.navigationController!.pushViewController(vc, animated: true)
}) })
} }
} }
override func shouldPerformSegueWithIdentifier(identifier: String, sender: AnyObject?) -> Bool { override func shouldPerformSegueWithIdentifier(identifier: String, sender: AnyObject?) -> Bool {

25
kplayer/photo/MediaPhotoController.swift

@ -5,7 +5,6 @@
import Foundation import Foundation
import Nimbus import Nimbus
import Haneke
import Alamofire import Alamofire
class MediaPhotoController: NIToolbarPhotoViewController, NIPhotoAlbumScrollViewDataSource, NIPhotoScrubberViewDataSource { class MediaPhotoController: NIToolbarPhotoViewController, NIPhotoAlbumScrollViewDataSource, NIPhotoScrubberViewDataSource {
@ -95,7 +94,6 @@ class MediaPhotoController: NIToolbarPhotoViewController, NIPhotoAlbumScrollView
imageCache.removeAllObjects() imageCache.removeAllObjects()
super.didReceiveMemoryWarning() super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
} }
func shot() { func shot() {
@ -158,14 +156,13 @@ class MediaPhotoController: NIToolbarPhotoViewController, NIPhotoAlbumScrollView
(request, response, result) in (request, response, result) in
var im = [MediaItem]() var im = [MediaItem]()
var hashes = Dictionary<String, String>()
if let json = result.value { if let json = result.value {
for s in json as! [String] { for s in json as! [String] {
if s.hasSuffix(".jpg") { if s.hasSuffix(".jpg") {
let l = s.length let l = s.length
let name = NSURL(fileURLWithPath: s as! String).lastPathComponent!
let name = NSURL(fileURLWithPath: s ).lastPathComponent!
var pathlen = l - len - name.length var pathlen = l - len - name.length
// if (pathlen > 1000) { // if (pathlen > 1000) {
@ -251,8 +248,6 @@ class MediaPhotoController: NIToolbarPhotoViewController, NIPhotoAlbumScrollView
func photoAlbumScrollView(photoAlbumScrollView: NIPhotoAlbumScrollView!, photoAtIndex: Int, photoSize: UnsafeMutablePointer<NIPhotoScrollViewPhotoSize>, func photoAlbumScrollView(photoAlbumScrollView: NIPhotoAlbumScrollView!, photoAtIndex: Int, photoSize: UnsafeMutablePointer<NIPhotoScrollViewPhotoSize>,
isLoading: UnsafeMutablePointer<ObjCBool>, originalPhotoDimensions: UnsafeMutablePointer<CGSize>) -> UIImage! { isLoading: UnsafeMutablePointer<ObjCBool>, originalPhotoDimensions: UnsafeMutablePointer<CGSize>) -> UIImage! {
let c = items.count
// println("Index: \(photoAtIndex) of \(c)")
let newItem = items[photoAtIndex] let newItem = items[photoAtIndex]
let u1 = NSURL(string: newItem.imageUrlAbsolute) let u1 = NSURL(string: newItem.imageUrlAbsolute)
let u2 = NSURL(string: newItem.thumbUrlAbsolute) let u2 = NSURL(string: newItem.thumbUrlAbsolute)
@ -280,7 +275,7 @@ class MediaPhotoController: NIToolbarPhotoViewController, NIPhotoAlbumScrollView
image = imageCache.objectForKey(URL.absoluteString) as? UIImage image = imageCache.objectForKey(URL.absoluteString) as? UIImage
if let i = image {
if image != nil {
size = NIPhotoScrollViewPhotoSizeThumbnail size = NIPhotoScrollViewPhotoSizeThumbnail
isLoading[0] = false isLoading[0] = false
} else { } else {
@ -302,7 +297,6 @@ class MediaPhotoController: NIToolbarPhotoViewController, NIPhotoAlbumScrollView
} }
}, index: photoAtIndex) }, index: photoAtIndex)
op3.qualityOfService = NSQualityOfService.UserInteractive op3.qualityOfService = NSQualityOfService.UserInteractive
// requests.append(op3)
operationQueue.addOperation(op3) operationQueue.addOperation(op3)
} }
@ -367,7 +361,6 @@ class MediaPhotoController: NIToolbarPhotoViewController, NIPhotoAlbumScrollView
return nil return nil
} }
let c = items.count
let newItem = items[thumbnailIndex] let newItem = items[thumbnailIndex]
var image: UIImage? var image: UIImage?
@ -404,15 +397,3 @@ class MediaPhotoController: NIToolbarPhotoViewController, NIPhotoAlbumScrollView
} }
} }
class MediaFetcher<T:DataConvertible>: NetworkFetcher<T> {
let bsession: NSURLSession?
init(URL: NSURL, session: NSURLSession) {
self.bsession = session
super.init(URL: URL)
}
override public var session: NSURLSession {
return bsession!
}
}

2
kplayer/util/DataLoadOperation.swift

@ -8,7 +8,7 @@ import Alamofire
import Darwin import Darwin
class DataLoadOperation: NSOperation { class DataLoadOperation: NSOperation {
public typealias Succeeder = (NSData) -> ()
internal typealias Succeeder = (NSData) -> ()
let imageURL: NSURL let imageURL: NSURL
let succeeder: Succeeder let succeeder: Succeeder

2
kplayer/util/ImageLoadOperation.swift

@ -31,8 +31,6 @@ class ImageLoadOperation: NSOperation {
return return
} }
// println("do load \(imageURL.absoluteString!)")
if let m = manager { if let m = manager {
request = m.request(.GET, imageURL) request = m.request(.GET, imageURL)
} else { } else {

2
kplayer/util/LayoutTools.swift

@ -48,7 +48,7 @@ public extension UIView {
let cn = String(v.dynamicType) let cn = String(v.dynamicType)
if cn == classname { if cn == classname {
return v as? UIView
return v
} }
if result != nil { if result != nil {

6
kplayer/util/NetworkHelper.swift

@ -9,7 +9,7 @@ import Alamofire
func urlRequestWithComponents(urlString: String, parameters: NSDictionary) -> (URLRequestConvertible, NSData) { func urlRequestWithComponents(urlString: String, parameters: NSDictionary) -> (URLRequestConvertible, NSData) {
// create url request to send // create url request to send
var mutableURLRequest = NSMutableURLRequest(URL: NSURL(string: urlString)!)
let mutableURLRequest = NSMutableURLRequest(URL: NSURL(string: urlString)!)
mutableURLRequest.HTTPMethod = Alamofire.Method.POST.rawValue mutableURLRequest.HTTPMethod = Alamofire.Method.POST.rawValue
//let boundaryConstant = "myRandomBoundary12345" //let boundaryConstant = "myRandomBoundary12345"
let boundaryConstant = "NET-POST-boundary-\(arc4random())-\(arc4random())" let boundaryConstant = "NET-POST-boundary-\(arc4random())-\(arc4random())"
@ -27,12 +27,12 @@ func urlRequestWithComponents(urlString: String, parameters: NSDictionary) -> (U
if value is NetData { if value is NetData {
// add image // add image
var postData = value as! NetData
let postData = value as! NetData
//uploadData.appendData("Content-Disposition: form-data; name=\"\(key)\"; filename=\"\(postData.filename)\"\r\n".dataUsingEncoding(NSUTF8StringEncoding)!) //uploadData.appendData("Content-Disposition: form-data; name=\"\(key)\"; filename=\"\(postData.filename)\"\r\n".dataUsingEncoding(NSUTF8StringEncoding)!)
// append content disposition // append content disposition
var filenameClause = " filename=\"\(postData.filename)\""
let filenameClause = " filename=\"\(postData.filename)\""
let contentDispositionString = "Content-Disposition: form-data; name=\"\(key)\";\(filenameClause)\r\n" let contentDispositionString = "Content-Disposition: form-data; name=\"\(key)\";\(filenameClause)\r\n"
let contentDispositionData = contentDispositionString.dataUsingEncoding(NSUTF8StringEncoding) let contentDispositionData = contentDispositionString.dataUsingEncoding(NSUTF8StringEncoding)
uploadData.appendData(contentDispositionData!) uploadData.appendData(contentDispositionData!)

5
kplayer/util/UploadOperation.swift

@ -23,7 +23,7 @@ class UploadOperation: NSOperation {
return return
} }
var parameters = [
let parameters = [
"file": NetData(data: data, mimeType: MimeType.Json, filename: path), "file": NetData(data: data, mimeType: MimeType.Json, filename: path),
"name": path "name": path
] ]
@ -31,11 +31,10 @@ class UploadOperation: NSOperation {
print("PATH: \(path)") print("PATH: \(path)")
let urlRequest = urlRequestWithComponents(baseUrl, parameters: parameters) let urlRequest = urlRequestWithComponents(baseUrl, parameters: parameters)
let request = Alamofire.upload(urlRequest.0, data: urlRequest.1)
Alamofire.upload(urlRequest.0, data: urlRequest.1)
// success: todo set url to item // success: todo set url to item
// .progress { // .progress {
// (bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) in // (bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) in
// print("progress : \(totalBytesWritten) / \(totalBytesExpectedToWrite)") // print("progress : \(totalBytesWritten) / \(totalBytesExpectedToWrite)")

5
kplayer/util/ViewControllerExtensions.swift

@ -35,11 +35,10 @@ public extension UIViewController {
// (XXX) // (XXX)
return result return result
} }
if let childControl = child as? UIViewController {
if let found = childControl.findChildController(my) {
if let found = child.findChildController(my) {
return found; return found;
} }
}
} }
return nil return nil
} }

32
kplayer/util/alamoimage.swift

@ -1,32 +0,0 @@
//
// Created by Marco Schmickler on 22.06.15.
// Copyright (c) 2015 Marco Schmickler. All rights reserved.
//
import Foundation
import Alamofire
extension Alamofire.Request {
// class func imageResponseSerializer() -> Serializer {
// return { request, response, data in
// if data == nil || data!.length == 0 {
// return (nil, nil)
// }
//
// if let i = UIImage(data: data!) {
//// let image = i.hnk_decompressedImage()
//
// return (i, nil)
// }
// return (nil, nil)
// }
// }
//
// func responseImage(completionHandler: (NSURLRequest, NSHTTPURLResponse?, UIImage?, NSError?) -> Void) -> Self {
// return response(serializer: Request.imageResponseSerializer(), completionHandler: { (request, response, image, error) in
// completionHandler(request, response, image as? UIImage, error)
// })
// }
}
Loading…
Cancel
Save