Floatplane channel plugin for Jellyfin 10.10.x: browse, HLS proxy, cookie session, CI release
Some checks failed
release / build-release (push) Has been cancelled
Some checks failed
release / build-release (push) Has been cancelled
- IChannel: creators -> sub-channels -> video posts (public listing API, search mapped) - IRequiresMediaInfoCallback -> signed proxy URLs; stream controller rewrites HLS so the AES-128 key is fetched server-side with the session cookie, segments stay on the CDN - delivery/info cached per token lifetime and throttled (~2/min) - config page: paste sails.sid + validate, extra creators, quality, search test - scripts/package.sh -> plugin folder + zip + md5 + manifest.json; Gitea release workflow - research docs, HAR analysis (HAR itself gitignored), install-pi5.sh Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
89
doc/research/reference-sources/wf_CreatorOrChannel.swift
Normal file
89
doc/research/reference-sources/wf_CreatorOrChannel.swift
Normal file
@@ -0,0 +1,89 @@
|
||||
import Foundation
|
||||
import FloatplaneAPIClient
|
||||
|
||||
protocol CreatorOrChannel {
|
||||
var id: String { get }
|
||||
var title: String { get }
|
||||
var about: String { get }
|
||||
var cover: ImageModel? { get }
|
||||
var icon: ImageModel { get }
|
||||
|
||||
var creatorId: String { get }
|
||||
var channelId: String? { get }
|
||||
var aboutFixed: String { get }
|
||||
var liveStream: LiveStreamModel? { get }
|
||||
}
|
||||
|
||||
extension CreatorModelV3: CreatorOrChannel {
|
||||
var creatorId: String {
|
||||
id
|
||||
}
|
||||
|
||||
var channelId: String? {
|
||||
nil
|
||||
}
|
||||
|
||||
var aboutFixed: String {
|
||||
about.replacingOccurrences(of: "\n\n", with: " ")
|
||||
}
|
||||
}
|
||||
|
||||
extension ChannelModel: CreatorOrChannel {
|
||||
var creatorId: String {
|
||||
creator
|
||||
}
|
||||
|
||||
var channelId: String? {
|
||||
id
|
||||
}
|
||||
|
||||
var aboutFixed: String {
|
||||
about.replacingOccurrences(of: "\n\n", with: " ")
|
||||
}
|
||||
|
||||
var liveStream: LiveStreamModel? {
|
||||
nil
|
||||
}
|
||||
}
|
||||
|
||||
struct AnyCreatorOrChannel: CreatorOrChannel, Hashable {
|
||||
private let creatorOrChannel: CreatorOrChannel
|
||||
|
||||
var id: String { creatorOrChannel.id }
|
||||
var title: String { creatorOrChannel.title }
|
||||
var about: String { creatorOrChannel.about }
|
||||
var cover: ImageModel? { creatorOrChannel.cover }
|
||||
var icon: ImageModel { creatorOrChannel.icon }
|
||||
var creatorId: String { creatorOrChannel.creatorId }
|
||||
var channelId: String? { creatorOrChannel.channelId }
|
||||
var aboutFixed: String { creatorOrChannel.aboutFixed }
|
||||
var liveStream: LiveStreamModel? { creatorOrChannel.liveStream }
|
||||
|
||||
init(_ creatorOrChannel: CreatorOrChannel) {
|
||||
self.creatorOrChannel = creatorOrChannel
|
||||
}
|
||||
|
||||
static func == (lhs: AnyCreatorOrChannel, rhs: AnyCreatorOrChannel) -> Bool {
|
||||
return lhs.id == rhs.id &&
|
||||
lhs.title == rhs.title &&
|
||||
lhs.about == rhs.about &&
|
||||
lhs.cover == rhs.cover &&
|
||||
lhs.icon == rhs.icon &&
|
||||
lhs.creatorId == rhs.creatorId &&
|
||||
lhs.channelId == rhs.channelId &&
|
||||
lhs.aboutFixed == rhs.aboutFixed &&
|
||||
lhs.liveStream == rhs.liveStream
|
||||
}
|
||||
|
||||
func hash(into hasher: inout Hasher) {
|
||||
hasher.combine(id)
|
||||
hasher.combine(title)
|
||||
hasher.combine(about)
|
||||
hasher.combine(cover)
|
||||
hasher.combine(icon)
|
||||
hasher.combine(creatorId)
|
||||
hasher.combine(channelId)
|
||||
hasher.combine(aboutFixed)
|
||||
hasher.combine(liveStream)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user