Browse Source

Tags

master
marcoschmickler 3 years ago
parent
commit
1a53ddcc8f
  1. 10
      hints.md
  2. 16
      kplayer.xcodeproj/project.pbxproj
  3. 16
      kplayer/core/Cached+CoreDataClass.swift
  4. 31
      kplayer/core/Cached+CoreDataProperties.swift
  5. 10
      kplayer/core/KTag+CoreDataProperties.swift
  6. 2
      kplayer/kplayer.xcdatamodeld/.xccurrentversion
  7. 42
      kplayer/kplayer.xcdatamodeld/kplayer 4.xcdatamodel/contents
  8. 3
      kplayer/video/SEmbeddedVideo.swift

10
hints.md

@ -0,0 +1,10 @@
https://www.informit.com/articles/article.aspx?p=2469048
1. Select kplayer.xcdatamodel
2. Click Editor > Add Model Version....
3. Click Finish to accept Model 2 as the version name.
Codegen ausschalten

16
kplayer.xcodeproj/project.pbxproj

@ -70,6 +70,7 @@
1C736E21B246C0BE7E123FD3 /* MediaModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736B41C6AC33F3FA592C63 /* MediaModel.swift */; }; 1C736E21B246C0BE7E123FD3 /* MediaModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736B41C6AC33F3FA592C63 /* MediaModel.swift */; };
1C736EB38B780CA47B50772F /* SEmbeddedVideo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7367B39F09CCD1760A345A /* SEmbeddedVideo.swift */; }; 1C736EB38B780CA47B50772F /* SEmbeddedVideo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7367B39F09CCD1760A345A /* SEmbeddedVideo.swift */; };
1C736EC45EE7DA5F7FCE63DA /* LocalManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73659CC9B523B957E58DC6 /* LocalManager.swift */; }; 1C736EC45EE7DA5F7FCE63DA /* LocalManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73659CC9B523B957E58DC6 /* LocalManager.swift */; };
1C736EFF1E09988625FF770C /* hints.md in Sources */ = {isa = PBXBuildFile; fileRef = 1C736BF48D5CE855B6E75BE6 /* hints.md */; };
1C736F2334FE0F946FD7CABE /* ImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736E32C8574BFE3536F1C2 /* ImageCache.swift */; }; 1C736F2334FE0F946FD7CABE /* ImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736E32C8574BFE3536F1C2 /* ImageCache.swift */; };
1C736F6A223D4ADB2E1BA733 /* ItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736069C214E9522BB1BD97 /* ItemCell.swift */; }; 1C736F6A223D4ADB2E1BA733 /* ItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736069C214E9522BB1BD97 /* ItemCell.swift */; };
1C736F7D29B76C7037CEF778 /* DatabaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73647019E6C2E822127BA3 /* DatabaseManager.swift */; }; 1C736F7D29B76C7037CEF778 /* DatabaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73647019E6C2E822127BA3 /* DatabaseManager.swift */; };
@ -88,6 +89,8 @@
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 */; };
C98AF5F01B124D6A00D196CC /* kplayerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C98AF5EF1B124D6A00D196CC /* kplayerTests.swift */; }; C98AF5F01B124D6A00D196CC /* kplayerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C98AF5EF1B124D6A00D196CC /* kplayerTests.swift */; };
C9D67650291E73A00060179C /* Cached+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9D6764E291E73A00060179C /* Cached+CoreDataClass.swift */; };
C9D67651291E73A00060179C /* Cached+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9D6764F291E73A00060179C /* Cached+CoreDataProperties.swift */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
@ -153,6 +156,7 @@
1C736B41C6AC33F3FA592C63 /* MediaModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaModel.swift; sourceTree = "<group>"; }; 1C736B41C6AC33F3FA592C63 /* MediaModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaModel.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>"; };
1C736BF48D5CE855B6E75BE6 /* hints.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = hints.md; sourceTree = "<group>"; };
1C736C17C40DAE162AF8DDE3 /* WebViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewModel.swift; sourceTree = "<group>"; }; 1C736C17C40DAE162AF8DDE3 /* WebViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewModel.swift; sourceTree = "<group>"; };
1C736C72CDF8902484856B3B /* SelfSizingHostingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelfSizingHostingController.swift; sourceTree = "<group>"; }; 1C736C72CDF8902484856B3B /* SelfSizingHostingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelfSizingHostingController.swift; sourceTree = "<group>"; };
1C736C94157754DE1C808173 /* KSettingsModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KSettingsModel.swift; sourceTree = "<group>"; }; 1C736C94157754DE1C808173 /* KSettingsModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KSettingsModel.swift; sourceTree = "<group>"; };
@ -188,6 +192,9 @@
C98AF5EE1B124D6A00D196CC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; C98AF5EE1B124D6A00D196CC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C98AF5EF1B124D6A00D196CC /* kplayerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = kplayerTests.swift; sourceTree = "<group>"; }; C98AF5EF1B124D6A00D196CC /* kplayerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = kplayerTests.swift; sourceTree = "<group>"; };
C9B052432905C56F002F65C0 /* kplayer 3.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "kplayer 3.xcdatamodel"; sourceTree = "<group>"; }; C9B052432905C56F002F65C0 /* kplayer 3.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "kplayer 3.xcdatamodel"; sourceTree = "<group>"; };
C9D67649291E6E680060179C /* kplayer 4.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "kplayer 4.xcdatamodel"; sourceTree = "<group>"; };
C9D6764E291E73A00060179C /* Cached+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Cached+CoreDataClass.swift"; sourceTree = "<group>"; };
C9D6764F291E73A00060179C /* Cached+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Cached+CoreDataProperties.swift"; sourceTree = "<group>"; };
DF1DF76780D9CDC55209D1CE /* Pods-kplayer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-kplayer.release.xcconfig"; path = "Pods/Target Support Files/Pods-kplayer/Pods-kplayer.release.xcconfig"; sourceTree = "<group>"; }; DF1DF76780D9CDC55209D1CE /* Pods-kplayer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-kplayer.release.xcconfig"; path = "Pods/Target Support Files/Pods-kplayer/Pods-kplayer.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
@ -291,6 +298,8 @@
1C736DC8C3AFB991541A2079 /* core */ = { 1C736DC8C3AFB991541A2079 /* core */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
C9D6764E291E73A00060179C /* Cached+CoreDataClass.swift */,
C9D6764F291E73A00060179C /* Cached+CoreDataProperties.swift */,
C91E05832795AC5C0003AB79 /* KTag+CoreDataClass.swift */, C91E05832795AC5C0003AB79 /* KTag+CoreDataClass.swift */,
C91E05842795AC5C0003AB79 /* KTag+CoreDataProperties.swift */, C91E05842795AC5C0003AB79 /* KTag+CoreDataProperties.swift */,
C91E05852795AC5C0003AB79 /* KItem+CoreDataClass.swift */, C91E05852795AC5C0003AB79 /* KItem+CoreDataClass.swift */,
@ -366,6 +375,7 @@
1C73685B4BBFDAFBF08C032C /* readme.md */, 1C73685B4BBFDAFBF08C032C /* readme.md */,
1C7369BED02028D8564E82D5 /* pathfinder.scpt */, 1C7369BED02028D8564E82D5 /* pathfinder.scpt */,
1C7360F9649E40B7C2EAB581 /* kplayer.txt */, 1C7360F9649E40B7C2EAB581 /* kplayer.txt */,
1C736BF48D5CE855B6E75BE6 /* hints.md */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -619,6 +629,7 @@
1C7368242038C0FF6C9631E7 /* VideoHelper.swift in Sources */, 1C7368242038C0FF6C9631E7 /* VideoHelper.swift in Sources */,
1C736A06A2AD75B8C14EEBBE /* HtmlParser.swift in Sources */, 1C736A06A2AD75B8C14EEBBE /* HtmlParser.swift in Sources */,
1C736048BFA120F5C7D36874 /* readme.md in Sources */, 1C736048BFA120F5C7D36874 /* readme.md in Sources */,
C9D67650291E73A00060179C /* Cached+CoreDataClass.swift in Sources */,
1C736771C503FB0D52AEB8F7 /* kplayer.js in Sources */, 1C736771C503FB0D52AEB8F7 /* kplayer.js in Sources */,
C91E058D2795AC5C0003AB79 /* KSnapshot+CoreDataClass.swift in Sources */, C91E058D2795AC5C0003AB79 /* KSnapshot+CoreDataClass.swift in Sources */,
1C7361B3AF46CEB30D3F4FA0 /* KSettings.swift in Sources */, 1C7361B3AF46CEB30D3F4FA0 /* KSettings.swift in Sources */,
@ -628,6 +639,7 @@
C91E058A2795AC5C0003AB79 /* KTag+CoreDataProperties.swift in Sources */, C91E058A2795AC5C0003AB79 /* KTag+CoreDataProperties.swift in Sources */,
C91E058B2795AC5C0003AB79 /* KItem+CoreDataClass.swift in Sources */, C91E058B2795AC5C0003AB79 /* KItem+CoreDataClass.swift in Sources */,
1C736A622876405F3EE2D043 /* EditItemView.swift in Sources */, 1C736A622876405F3EE2D043 /* EditItemView.swift in Sources */,
C9D67651291E73A00060179C /* Cached+CoreDataProperties.swift in Sources */,
1C73613562EB375F53A0BD03 /* ServerDownloadDelegate.swift in Sources */, 1C73613562EB375F53A0BD03 /* ServerDownloadDelegate.swift in Sources */,
1C736EC45EE7DA5F7FCE63DA /* LocalManager.swift in Sources */, 1C736EC45EE7DA5F7FCE63DA /* LocalManager.swift in Sources */,
1C736DFD076D9CC30F0B9D58 /* Utility.swift in Sources */, 1C736DFD076D9CC30F0B9D58 /* Utility.swift in Sources */,
@ -659,6 +671,7 @@
1C736EB38B780CA47B50772F /* SEmbeddedVideo.swift in Sources */, 1C736EB38B780CA47B50772F /* SEmbeddedVideo.swift in Sources */,
1C736F2334FE0F946FD7CABE /* ImageCache.swift in Sources */, 1C736F2334FE0F946FD7CABE /* ImageCache.swift in Sources */,
1C7366BEA68D6E4CEE43417E /* ImageLoader.swift in Sources */, 1C7366BEA68D6E4CEE43417E /* ImageLoader.swift in Sources */,
1C736EFF1E09988625FF770C /* hints.md in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -921,10 +934,11 @@
C98AF5D61B124D6A00D196CC /* kplayer.xcdatamodeld */ = { C98AF5D61B124D6A00D196CC /* kplayer.xcdatamodeld */ = {
isa = XCVersionGroup; isa = XCVersionGroup;
children = ( children = (
C9D67649291E6E680060179C /* kplayer 4.xcdatamodel */,
C9B052432905C56F002F65C0 /* kplayer 3.xcdatamodel */, C9B052432905C56F002F65C0 /* kplayer 3.xcdatamodel */,
C98AF5D71B124D6A00D196CC /* kplayer.xcdatamodel */, C98AF5D71B124D6A00D196CC /* kplayer.xcdatamodel */,
); );
currentVersion = C9B052432905C56F002F65C0 /* kplayer 3.xcdatamodel */;
currentVersion = C9D67649291E6E680060179C /* kplayer 4.xcdatamodel */;
path = kplayer.xcdatamodeld; path = kplayer.xcdatamodeld;
sourceTree = "<group>"; sourceTree = "<group>";
versionGroupType = wrapper.xcdatamodel; versionGroupType = wrapper.xcdatamodel;

16
kplayer/core/Cached+CoreDataClass.swift

@ -0,0 +1,16 @@
//
// Cached+CoreDataClass.swift
// kplayer
//
// Created by Marco Schmickler on 11.11.22.
// Copyright © 2022 Marco Schmickler. All rights reserved.
//
//
import Foundation
import CoreData
@objc(Cached)
public class Cached: NSManagedObject {
}

31
kplayer/core/Cached+CoreDataProperties.swift

@ -0,0 +1,31 @@
//
// Cached+CoreDataProperties.swift
// kplayer
//
// Created by Marco Schmickler on 11.11.22.
// Copyright © 2022 Marco Schmickler. All rights reserved.
//
//
import Foundation
import CoreData
extension Cached {
@nonobjc public class func fetchRequest() -> NSFetchRequest<Cached> {
return NSFetchRequest<Cached>(entityName: "Cached")
}
@NSManaged public var url: String?
@NSManaged public var cached: String?
@NSManaged public var used: Date?
@NSManaged public var times: Int16
@NSManaged public var preferred: Int16
@NSManaged public var options: String?
}
extension Cached : Identifiable {
}

10
kplayer/core/KTag+CoreDataProperties.swift

@ -1,9 +1,8 @@
// //
// KTag+CoreDataProperties.swift // KTag+CoreDataProperties.swift
// kplayer
//
// //
// Created by Marco Schmickler on 17.01.22.
// Copyright © 2022 Marco Schmickler. All rights reserved.
// Created by Marco Schmickler on 11.11.22.
// //
// //
@ -18,6 +17,7 @@ extension KTag {
} }
@NSManaged public var name: String? @NSManaged public var name: String?
@NSManaged public var path: String?
@NSManaged public var tagged: NSSet? @NSManaged public var tagged: NSSet?
} }
@ -38,7 +38,3 @@ extension KTag {
@NSManaged public func removeFromTagged(_ values: NSSet) @NSManaged public func removeFromTagged(_ values: NSSet)
} }
extension KTag : Identifiable {
}

2
kplayer/kplayer.xcdatamodeld/.xccurrentversion

@ -3,6 +3,6 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>_XCCurrentVersionName</key> <key>_XCCurrentVersionName</key>
<string>kplayer 3.xcdatamodel</string>
<string>kplayer 4.xcdatamodel</string>
</dict> </dict>
</plist> </plist>

42
kplayer/kplayer.xcdatamodeld/kplayer 4.xcdatamodel/contents

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="21512" systemVersion="21G217" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="Cached" representedClassName=".Cached" syncable="YES">
<attribute name="cached" optional="YES" attributeType="String"/>
<attribute name="options" optional="YES" attributeType="String"/>
<attribute name="preferred" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="times" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="url" optional="YES" attributeType="String"/>
<attribute name="used" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
</entity>
<entity name="KItem" representedClassName=".KItem" syncable="YES">
<attribute name="favorite" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="local" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="name" optional="YES" attributeType="String"/>
<attribute name="path" optional="YES" attributeType="String"/>
<attribute name="root" optional="YES" attributeType="String"/>
<attribute name="type" optional="YES" attributeType="String"/>
<relationship name="snapshots" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="KSnapshot" inverseName="item" inverseEntity="KSnapshot"/>
</entity>
<entity name="KSnapshot" representedClassName=".KSnapshot" syncable="YES">
<attribute name="index" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="length" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
<attribute name="loop" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="offx" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="offy" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="options" optional="YES" attributeType="String"/>
<attribute name="rating" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="scale" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
<attribute name="sizex" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="sizey" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="thumb" optional="YES" attributeType="String"/>
<attribute name="time" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
<attribute name="timeStamp" optional="YES" attributeType="Date"/>
<relationship name="item" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="KItem" inverseName="snapshots" inverseEntity="KItem"/>
<relationship name="tags" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="KTag" inverseName="tagged" inverseEntity="KTag"/>
</entity>
<entity name="KTag" representedClassName=".KTag" syncable="YES">
<attribute name="name" optional="YES" attributeType="String"/>
<attribute name="path" optional="YES" attributeType="String"/>
<relationship name="tagged" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="KSnapshot" inverseName="tags" inverseEntity="KSnapshot"/>
</entity>
</model>

3
kplayer/video/SEmbeddedVideo.swift

@ -29,7 +29,7 @@ struct SEmbeddedVideo: View {
} }
var body: some View { var body: some View {
VStack {
ZStack {
VideoPlayerView(model: model, player: player).onAppear{ VideoPlayerView(model: model, player: player).onAppear{
// if let url = LocalManager.sharedInstance.settings.embeddedVideoUrl { // if let url = LocalManager.sharedInstance.settings.embeddedVideoUrl {
// playUrl(url: url) // playUrl(url: url)
@ -74,6 +74,7 @@ struct SEmbeddedVideo: View {
controls = !controls controls = !controls
}.contentShape(Rectangle()) }.contentShape(Rectangle())
let c = VStack { let c = VStack {
Spacer()
VideoPlayerControlsView(model: model, player: player) VideoPlayerControlsView(model: model, player: player)
HStack { HStack {
Button(action: { Button(action: {

Loading…
Cancel
Save