* Buildable! * Update file names. * Default sort to sort name NOT name. * SessionInfoDto vs SessionInfo * Targetting * Fix many invalid `ItemSortBy` existing. Will need to revisit later to see which can still be used! * ExtraTypes Patch. * Move from Binding to OnChange. Tested and Working. * Update README.md Update README to use 10.10.6. Bumped up from 10.8.13 * Update to Main on https://github.com/jellyfin/jellyfin-sdk-swift.git * Now using https://github.com/jellyfin/jellyfin-sdk-swift.git again! * Paths.getUserViews() userId moved to parameters * Fix ViewModels where -Dto suffixes were removed by https://github.com/jellyfin/Swiftfin/pull/1465 auto-merge. * SupportedCaseIterable * tvOS supportedCases fixes for build issue. * cleanup * update API to 0.5.1 and correct VideoRangeTypes. * Remove deviceProfile.responseProfiles = videoPlayer.responseProfiles * Second to last adjustment: Resolved: // TODO: 10.10 - Filter to only valid SortBy's for each BaseItemKind. Last outstanding item: // TODO: 10.10 - What should authenticationProviderID & passwordResetProviderID be? * Trailers itemID must precede userID * Force User Policy to exist. --------- Co-authored-by: Ethan Pippin <ethanpippin2343@gmail.com>
56 lines
2.0 KiB
Swift
56 lines
2.0 KiB
Swift
//
|
|
// Swiftfin is subject to the terms of the Mozilla Public
|
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
// file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
|
//
|
|
// Copyright (c) 2025 Jellyfin & Jellyfin Contributors
|
|
//
|
|
|
|
import Foundation
|
|
import JellyfinAPI
|
|
|
|
extension TranscodingProfile {
|
|
|
|
init(
|
|
isBreakOnNonKeyFrames: Bool? = nil,
|
|
conditions: [ProfileCondition]? = nil,
|
|
context: EncodingContext? = nil,
|
|
isCopyTimestamps: Bool? = nil,
|
|
enableMpegtsM2TsMode: Bool? = nil,
|
|
enableSubtitlesInManifest: Bool? = nil,
|
|
isEstimateContentLength: Bool? = nil,
|
|
maxAudioChannels: String? = nil,
|
|
minSegments: Int? = nil,
|
|
protocol: MediaStreamProtocol? = nil,
|
|
segmentLength: Int? = nil,
|
|
transcodeSeekInfo: TranscodeSeekInfo? = nil,
|
|
type: DlnaProfileType? = nil,
|
|
@CommaStringBuilder<AudioCodec> audioCodecs: () -> String = { "" },
|
|
@CommaStringBuilder<VideoCodec> videoCodecs: () -> String = { "" },
|
|
@CommaStringBuilder<MediaContainer> containers: () -> String = { "" }
|
|
) {
|
|
let audioCodecs = audioCodecs()
|
|
let videoCodecs = videoCodecs()
|
|
let containers = containers()
|
|
|
|
self.init(
|
|
audioCodec: audioCodecs.isEmpty ? nil : audioCodecs,
|
|
isBreakOnNonKeyFrames: isBreakOnNonKeyFrames,
|
|
conditions: conditions,
|
|
container: containers.isEmpty ? nil : containers,
|
|
context: context,
|
|
isCopyTimestamps: isCopyTimestamps,
|
|
enableMpegtsM2TsMode: enableMpegtsM2TsMode,
|
|
enableSubtitlesInManifest: enableSubtitlesInManifest,
|
|
isEstimateContentLength: isEstimateContentLength,
|
|
maxAudioChannels: maxAudioChannels,
|
|
minSegments: minSegments,
|
|
protocol: `protocol`,
|
|
segmentLength: segmentLength,
|
|
transcodeSeekInfo: transcodeSeekInfo,
|
|
type: type,
|
|
videoCodec: videoCodecs.isEmpty ? nil : videoCodecs
|
|
)
|
|
}
|
|
}
|