Browse Source

init

master
Marco Schmickler 11 years ago
parent
commit
5bf9c5d7fc
  1. 84
      kplayer.xcodeproj/project.pbxproj
  2. 59
      kplayer/core/ImageLoadOperation.swift
  3. 7
      kplayer/core/MediaItem.swift
  4. 4
      kplayer/core/NetworkManager.swift
  5. 37
      kplayer/detail/DetailViewController.swift
  6. 0
      kplayer/detail/HeaderCell.swift
  7. 0
      kplayer/detail/ItemCell.swift
  8. 0
      kplayer/detail/VideoPlayerController.swift
  9. 0
      kplayer/util/LayoutTools.swift
  10. 0
      kplayer/util/NetData.swift
  11. 0
      kplayer/util/NetworkHelper.swift
  12. 2
      kplayer/util/UploadOperation.swift
  13. 0
      kplayer/util/alamojson.swift

84
kplayer.xcodeproj/project.pbxproj

@ -7,25 +7,24 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
1C736261CBA1D13D16DCBAFB /* VideoPlayerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7366EF59D75216EBC0D3F0 /* VideoPlayerController.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 */; }; 1C7363D9DC8F9D1F866DE935 /* Kirschkeks-256x256.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C7368DC7EF11A553145E169 /* Kirschkeks-256x256.png */; };
1C73641627BE29D9FA819F3C /* LayoutTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73649CEA7BDD2AC1496F76 /* LayoutTools.swift */; };
1C73640D928DE56D35175D39 /* UploadOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736260E748CF136FF37EA7 /* UploadOperation.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 */; };
1C73664F657BE51633B69851 /* alamojson.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736683E76027D72412D440 /* alamojson.swift */; };
1C73670791CDD5C9BB6B1DDC /* NetData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7364950C3B8C5DFA243D62 /* NetData.swift */; };
1C7367A160B25EEC5E99A517 /* ImageLoadOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736E98DC8F46C7FF9CD540 /* ImageLoadOperation.swift */; };
1C73654C9EA6D255CFC039C5 /* NetworkHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73620D01687FB4F1811C5C /* NetworkHelper.swift */; };
1C7368364397315E12E90F05 /* VideoPlayerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7367379DEE94EBF3FAFA78 /* VideoPlayerController.swift */; };
1C73688D13E5A804880C8768 /* UIImageExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736DCCE3AA9993E15F7652 /* UIImageExtension.swift */; }; 1C73688D13E5A804880C8768 /* UIImageExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736DCCE3AA9993E15F7652 /* UIImageExtension.swift */; };
1C73691418724950CCD87C14 /* HeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736C189E5F32219F4B4B13 /* HeaderCell.swift */; };
1C736AD52D967F2F4000F997 /* UploadOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7362F9C26405D4F3FA15A1 /* UploadOperation.swift */; };
1C736BF3C4F2D3BE570A89C7 /* NetworkHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7368F1190278747E95C12F /* NetworkHelper.swift */; };
1C736C90DB50C4FDED266C3D /* ItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7362C647AEBF03F5FD9FEB /* ItemCell.swift */; };
1C7369ABC44CFB530EA71FB6 /* HeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736D9BB5498E7E8F11C754 /* HeaderCell.swift */; };
1C736C5DD23466269607E07F /* alamojson.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73618272969871601AB817 /* alamojson.swift */; };
1C736D24B49451141CD4B64D /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7369F53095B7A4D65679C2 /* DetailViewController.swift */; };
1C736F6A223D4ADB2E1BA733 /* ItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736069C214E9522BB1BD97 /* ItemCell.swift */; };
1C736FB92B19FE17E4357C85 /* MediaItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73688DAB88F9360FB62A49 /* MediaItem.swift */; }; 1C736FB92B19FE17E4357C85 /* MediaItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73688DAB88F9360FB62A49 /* MediaItem.swift */; };
A5D637AE4588AAB5DC1CBC6B /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 127AC1F28342F9AAE3CEC5C2 /* Pods.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; A5D637AE4588AAB5DC1CBC6B /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 127AC1F28342F9AAE3CEC5C2 /* Pods.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
C98AF5D51B124D6A00D196CC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C98AF5D41B124D6A00D196CC /* AppDelegate.swift */; }; C98AF5D51B124D6A00D196CC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C98AF5D41B124D6A00D196CC /* AppDelegate.swift */; };
C98AF5D81B124D6A00D196CC /* kplayer.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = C98AF5D61B124D6A00D196CC /* kplayer.xcdatamodeld */; }; C98AF5D81B124D6A00D196CC /* kplayer.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = C98AF5D61B124D6A00D196CC /* kplayer.xcdatamodeld */; };
C98AF5DA1B124D6A00D196CC /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C98AF5D91B124D6A00D196CC /* MasterViewController.swift */; }; C98AF5DA1B124D6A00D196CC /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C98AF5D91B124D6A00D196CC /* MasterViewController.swift */; };
C98AF5DC1B124D6A00D196CC /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C98AF5DB1B124D6A00D196CC /* DetailViewController.swift */; };
C98AF5DF1B124D6A00D196CC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C98AF5DD1B124D6A00D196CC /* Main.storyboard */; }; C98AF5DF1B124D6A00D196CC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C98AF5DD1B124D6A00D196CC /* Main.storyboard */; };
C98AF5E11B124D6A00D196CC /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C98AF5E01B124D6A00D196CC /* Images.xcassets */; }; C98AF5E11B124D6A00D196CC /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C98AF5E01B124D6A00D196CC /* Images.xcassets */; };
C98AF5E41B124D6A00D196CC /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = C98AF5E21B124D6A00D196CC /* LaunchScreen.xib */; }; C98AF5E41B124D6A00D196CC /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = C98AF5E21B124D6A00D196CC /* LaunchScreen.xib */; };
@ -44,20 +43,20 @@
/* 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; };
1C7362C647AEBF03F5FD9FEB /* ItemCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemCell.swift; sourceTree = "<group>"; };
1C7362F9C26405D4F3FA15A1 /* UploadOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadOperation.swift; sourceTree = "<group>"; };
1C7364950C3B8C5DFA243D62 /* NetData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetData.swift; sourceTree = "<group>"; };
1C73649CEA7BDD2AC1496F76 /* LayoutTools.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutTools.swift; sourceTree = "<group>"; };
1C736069C214E9522BB1BD97 /* ItemCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemCell.swift; sourceTree = "<group>"; };
1C73618272969871601AB817 /* alamojson.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = alamojson.swift; sourceTree = "<group>"; };
1C73620D01687FB4F1811C5C /* NetworkHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkHelper.swift; sourceTree = "<group>"; };
1C736260E748CF136FF37EA7 /* UploadOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadOperation.swift; sourceTree = "<group>"; };
1C7365B06FA66294E99AC2D3 /* NetworkManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = "<group>"; }; 1C7365B06FA66294E99AC2D3 /* NetworkManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = "<group>"; };
1C736683E76027D72412D440 /* alamojson.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = alamojson.swift; sourceTree = "<group>"; };
1C7366EF59D75216EBC0D3F0 /* VideoPlayerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoPlayerController.swift; sourceTree = "<group>"; };
1C7367379DEE94EBF3FAFA78 /* VideoPlayerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoPlayerController.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>"; }; 1C7368DC7EF11A553145E169 /* Kirschkeks-256x256.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Kirschkeks-256x256.png"; sourceTree = "<group>"; };
1C7368F1190278747E95C12F /* NetworkHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkHelper.swift; sourceTree = "<group>"; };
1C736C189E5F32219F4B4B13 /* HeaderCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeaderCell.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>"; };
1C736BC4450890C45F8FBC63 /* LayoutTools.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutTools.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>"; };
1C736E98DC8F46C7FF9CD540 /* ImageLoadOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageLoadOperation.swift; sourceTree = "<group>"; };
5C6CBA548F885BF342F594EA /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; }; 5C6CBA548F885BF342F594EA /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
A170BFB886D61D57F7009BFC /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; }; A170BFB886D61D57F7009BFC /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
C98AF5CF1B124D6A00D196CC /* kplayer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = kplayer.app; sourceTree = BUILT_PRODUCTS_DIR; }; C98AF5CF1B124D6A00D196CC /* kplayer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = kplayer.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -65,7 +64,6 @@
C98AF5D41B124D6A00D196CC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; C98AF5D41B124D6A00D196CC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
C98AF5D71B124D6A00D196CC /* kplayer.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = kplayer.xcdatamodel; sourceTree = "<group>"; }; C98AF5D71B124D6A00D196CC /* kplayer.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = kplayer.xcdatamodel; sourceTree = "<group>"; };
C98AF5D91B124D6A00D196CC /* MasterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterViewController.swift; sourceTree = "<group>"; }; C98AF5D91B124D6A00D196CC /* MasterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterViewController.swift; sourceTree = "<group>"; };
C98AF5DB1B124D6A00D196CC /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = "<group>"; };
C98AF5DE1B124D6A00D196CC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; C98AF5DE1B124D6A00D196CC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
C98AF5E01B124D6A00D196CC /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; }; C98AF5E01B124D6A00D196CC /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
C98AF5E31B124D6A00D196CC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; }; C98AF5E31B124D6A00D196CC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
@ -94,10 +92,26 @@
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
1C73615846EE8B07DAAFD230 /* detail */ = {
isa = PBXGroup;
children = (
1C7367379DEE94EBF3FAFA78 /* VideoPlayerController.swift */,
1C736069C214E9522BB1BD97 /* ItemCell.swift */,
1C736D9BB5498E7E8F11C754 /* HeaderCell.swift */,
1C7369F53095B7A4D65679C2 /* DetailViewController.swift */,
);
path = detail;
sourceTree = "<group>";
};
1C7365603CAE04E39B73D843 /* util */ = { 1C7365603CAE04E39B73D843 /* util */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
1C736DCCE3AA9993E15F7652 /* UIImageExtension.swift */, 1C736DCCE3AA9993E15F7652 /* UIImageExtension.swift */,
1C736BC4450890C45F8FBC63 /* LayoutTools.swift */,
1C73620D01687FB4F1811C5C /* NetworkHelper.swift */,
1C736260E748CF136FF37EA7 /* UploadOperation.swift */,
1C7369EC16B19B32B515169E /* NetData.swift */,
1C73618272969871601AB817 /* alamojson.swift */,
); );
path = util; path = util;
sourceTree = "<group>"; sourceTree = "<group>";
@ -107,11 +121,6 @@
children = ( children = (
1C7365B06FA66294E99AC2D3 /* NetworkManager.swift */, 1C7365B06FA66294E99AC2D3 /* NetworkManager.swift */,
1C73688DAB88F9360FB62A49 /* MediaItem.swift */, 1C73688DAB88F9360FB62A49 /* MediaItem.swift */,
1C7362F9C26405D4F3FA15A1 /* UploadOperation.swift */,
1C7368F1190278747E95C12F /* NetworkHelper.swift */,
1C7364950C3B8C5DFA243D62 /* NetData.swift */,
1C736683E76027D72412D440 /* alamojson.swift */,
1C736E98DC8F46C7FF9CD540 /* ImageLoadOperation.swift */,
); );
path = core; path = core;
sourceTree = "<group>"; sourceTree = "<group>";
@ -159,19 +168,15 @@
children = ( children = (
C98AF5D41B124D6A00D196CC /* AppDelegate.swift */, C98AF5D41B124D6A00D196CC /* AppDelegate.swift */,
C98AF5D91B124D6A00D196CC /* MasterViewController.swift */, C98AF5D91B124D6A00D196CC /* MasterViewController.swift */,
C98AF5DB1B124D6A00D196CC /* DetailViewController.swift */,
C98AF5DD1B124D6A00D196CC /* Main.storyboard */, C98AF5DD1B124D6A00D196CC /* Main.storyboard */,
C98AF5E01B124D6A00D196CC /* Images.xcassets */, C98AF5E01B124D6A00D196CC /* Images.xcassets */,
C98AF5E21B124D6A00D196CC /* LaunchScreen.xib */, C98AF5E21B124D6A00D196CC /* LaunchScreen.xib */,
C98AF5D61B124D6A00D196CC /* kplayer.xcdatamodeld */, C98AF5D61B124D6A00D196CC /* kplayer.xcdatamodeld */,
C98AF5D21B124D6A00D196CC /* Supporting Files */, C98AF5D21B124D6A00D196CC /* Supporting Files */,
1C736DC8C3AFB991541A2079 /* core */, 1C736DC8C3AFB991541A2079 /* core */,
1C7362C647AEBF03F5FD9FEB /* ItemCell.swift */,
1C73649CEA7BDD2AC1496F76 /* LayoutTools.swift */,
1C7368DC7EF11A553145E169 /* Kirschkeks-256x256.png */, 1C7368DC7EF11A553145E169 /* Kirschkeks-256x256.png */,
1C7366EF59D75216EBC0D3F0 /* VideoPlayerController.swift */,
1C7365603CAE04E39B73D843 /* util */, 1C7365603CAE04E39B73D843 /* util */,
1C736C189E5F32219F4B4B13 /* HeaderCell.swift */,
1C73615846EE8B07DAAFD230 /* detail */,
); );
path = kplayer; path = kplayer;
sourceTree = "<group>"; sourceTree = "<group>";
@ -356,19 +361,18 @@
C98AF5D81B124D6A00D196CC /* kplayer.xcdatamodeld in Sources */, C98AF5D81B124D6A00D196CC /* kplayer.xcdatamodeld in Sources */,
C98AF5D51B124D6A00D196CC /* AppDelegate.swift in Sources */, C98AF5D51B124D6A00D196CC /* AppDelegate.swift in Sources */,
C98AF5DA1B124D6A00D196CC /* MasterViewController.swift in Sources */, C98AF5DA1B124D6A00D196CC /* MasterViewController.swift in Sources */,
C98AF5DC1B124D6A00D196CC /* DetailViewController.swift in Sources */,
1C736503B656C999E5E12081 /* NetworkManager.swift in Sources */, 1C736503B656C999E5E12081 /* NetworkManager.swift in Sources */,
1C736FB92B19FE17E4357C85 /* MediaItem.swift in Sources */, 1C736FB92B19FE17E4357C85 /* MediaItem.swift in Sources */,
1C736C90DB50C4FDED266C3D /* ItemCell.swift in Sources */,
1C73641627BE29D9FA819F3C /* LayoutTools.swift in Sources */,
1C736261CBA1D13D16DCBAFB /* VideoPlayerController.swift in Sources */,
1C736AD52D967F2F4000F997 /* UploadOperation.swift in Sources */,
1C736BF3C4F2D3BE570A89C7 /* NetworkHelper.swift in Sources */,
1C73670791CDD5C9BB6B1DDC /* NetData.swift in Sources */,
1C73664F657BE51633B69851 /* alamojson.swift in Sources */,
1C7367A160B25EEC5E99A517 /* ImageLoadOperation.swift in Sources */,
1C73688D13E5A804880C8768 /* UIImageExtension.swift in Sources */, 1C73688D13E5A804880C8768 /* UIImageExtension.swift in Sources */,
1C73691418724950CCD87C14 /* HeaderCell.swift in Sources */,
1C7368364397315E12E90F05 /* VideoPlayerController.swift in Sources */,
1C736F6A223D4ADB2E1BA733 /* ItemCell.swift in Sources */,
1C7369ABC44CFB530EA71FB6 /* HeaderCell.swift in Sources */,
1C736D24B49451141CD4B64D /* DetailViewController.swift in Sources */,
1C73631EACF56BABD3B2BCFB /* LayoutTools.swift in Sources */,
1C73654C9EA6D255CFC039C5 /* NetworkHelper.swift in Sources */,
1C73640D928DE56D35175D39 /* UploadOperation.swift in Sources */,
1C73646F87B495A47D7943C7 /* NetData.swift in Sources */,
1C736C5DD23466269607E07F /* alamojson.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };

59
kplayer/core/ImageLoadOperation.swift

@ -1,59 +0,0 @@
//
// Created by Marco Schmickler on 21.03.15.
// Copyright (c) 2015 Marco Schmickler. All rights reserved.
//
import Foundation
import Alamofire
import SwiftyJSON
class ImageLoadOperation: NSOperation {
let baseUrl: String
let item: MediaItem
init(baseUrl: String, item: MediaItem) {
self.baseUrl = baseUrl
self.item = item
}
override func main() {
if self.cancelled {
return
}
let path = baseUrl + "/service/download" + item.thumbUrl!
println(path)
Alamofire.request(.GET, path).validate().responseImage( {
(_, _, image, error) in
if error == nil && image != nil {
self.item.image = image
}
else {
println(error)
}
})
}
}
extension Alamofire.Request {
class func imageResponseSerializer() -> Serializer {
return { request, response, data in
if data == nil {
return (nil, nil)
}
let image = UIImage(data: data!) //, scale: UIScreen.mainScreen().scale)
return (image, 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)
})
}
}

7
kplayer/core/MediaItem.swift

@ -37,11 +37,10 @@ class MediaItem : DebugPrintable {
var thumbPath: String { var thumbPath: String {
let len = count("/srv/samba/ren") let len = count("/srv/samba/ren")
let enc = name.stringByReplacingOccurrencesOfString(" ", withString: "+")
let tpath = "/srv/samba/ren/thumb" + (root as NSString).substringFromIndex(len) + "/" + path + "/" + enc
let tpath = "/srv/samba/ren/thumb" + (root as NSString).substringFromIndex(len) + "/" + path + "/" + name
let enc = tpath.stringByReplacingOccurrencesOfString(" ", withString: "+")
return tpath + "/"
return enc + "/"
} }
var thumbUrlAbsolute: String { var thumbUrlAbsolute: String {

4
kplayer/core/NetworkManager.swift

@ -233,13 +233,13 @@ class NetworkManager {
} }
else { else {
let imageData = UIImageJPEGRepresentation(c.image, 1.0); let imageData = UIImageJPEGRepresentation(c.image, 1.0);
let op = UploadOperation(baseUrl: self.baseurl, data: imageData, path: p)
let op = UploadOperation(baseUrl: self.baseurl + "/service/upload", data: imageData, path: p)
self.operationQueue.addOperation(op) self.operationQueue.addOperation(op)
let thumb = c.image!.scaleToSize(14 * 16, height: 14 * 10) let thumb = c.image!.scaleToSize(14 * 16, height: 14 * 10)
let imageDataT = UIImageJPEGRepresentation(thumb, 1.0); let imageDataT = UIImageJPEGRepresentation(thumb, 1.0);
c.image = thumb c.image = thumb
let opT = UploadOperation(baseUrl: self.baseurl, data: imageDataT, path: pt)
let opT = UploadOperation(baseUrl: self.baseurl + "/service/upload", data: imageDataT, path: pt)
self.operationQueue.addOperation(opT) self.operationQueue.addOperation(opT)
c.loaded = true c.loaded = true

37
kplayer/DetailViewController.swift → kplayer/detail/DetailViewController.swift

@ -95,24 +95,29 @@ class DetailViewController: UIViewController, UICollectionViewDelegateFlowLayout
let index = notification.object as! Int let index = notification.object as! Int
if let detail: MediaItem = self.detailItem { if let detail: MediaItem = self.detailItem {
collectionView.performBatchUpdates({
var newItems = [NSIndexPath]()
var j = 0
if count(detail.children) > index {
let path = NSIndexPath(forItem: 0, inSection: index)
self.collectionView.reloadItemsAtIndexPaths([path])
for i in detail.children[index].children {
if j >= 1 {
newItems.append(NSIndexPath(forItem: j, inSection: index))
if (count(detail.children) == 1) {
self.collectionView.reloadData()
}
else {
collectionView.performBatchUpdates({
var newItems = [NSIndexPath]()
var j = 0
if count(detail.children) > index {
let path = NSIndexPath(forItem: 0, inSection: index)
self.collectionView.reloadItemsAtIndexPaths([path])
for i in detail.children[index].children {
if j >= 1 {
newItems.append(NSIndexPath(forItem: j, inSection: index))
}
j++
} }
j++
self.collectionView.insertItemsAtIndexPaths(newItems)
} }
self.collectionView.insertItemsAtIndexPaths(newItems)
}
return
}, completion: nil)
return
}, completion: nil)
}
} }
} }

0
kplayer/HeaderCell.swift → kplayer/detail/HeaderCell.swift

0
kplayer/ItemCell.swift → kplayer/detail/ItemCell.swift

0
kplayer/VideoPlayerController.swift → kplayer/detail/VideoPlayerController.swift

0
kplayer/LayoutTools.swift → kplayer/util/LayoutTools.swift

0
kplayer/core/NetData.swift → kplayer/util/NetData.swift

0
kplayer/core/NetworkHelper.swift → kplayer/util/NetworkHelper.swift

2
kplayer/core/UploadOperation.swift → kplayer/util/UploadOperation.swift

@ -28,7 +28,7 @@ class UploadOperation: NSOperation {
"name": path "name": path
] ]
let urlRequest = urlRequestWithComponents(baseUrl + "/service/upload", parameters)
let urlRequest = urlRequestWithComponents(baseUrl, parameters)
let request = Alamofire.upload(urlRequest) let request = Alamofire.upload(urlRequest)
// success: todo set url to item // success: todo set url to item

0
kplayer/core/alamojson.swift → kplayer/util/alamojson.swift

Loading…
Cancel
Save