Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Pietro Caselani committed Jan 1, 2020
1 parent 29bab70 commit 9c47c89
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CouchTrackerCore/Core/Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import TraktSwift

public enum Defaults {
public static let showsSyncOptions = WatchedShowEntitiesSyncOptions(extended: .full,
hiddingSpecials: false,
hidingSpecials: false,
seasonExtended: [.full, .episodes])
public static let appState = AppState(userSettings: nil, hideSpecials: false)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public final class ShowEpisodeAPIRepository: ShowEpisodeRepository {
let options = WatchedShowEntitySyncOptions(showIds: showIds,
episodeExtended: .full,
seasonOptions: .yes(number: season, extended: [.full, .episodes]),
hiddingSpecials: strongSelf.hideSpecials)
hidingSpecials: strongSelf.hideSpecials)

return strongSelf.synchronizer.syncWatchedShow(using: options)
}
Expand Down
2 changes: 1 addition & 1 deletion CouchTrackerCore/Synchronizer/CentralSynchronizer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public final class CentralSynchronizer {

private static func syncOptionsFor(appState: AppState) -> WatchedShowEntitiesSyncOptions {
let defaultOptions = Defaults.showsSyncOptions
return WatchedShowEntitiesSyncOptions(extended: defaultOptions.extended, hiddingSpecials: appState.hideSpecials, seasonExtended: [.full, .episodes])
return WatchedShowEntitiesSyncOptions(extended: defaultOptions.extended, hidingSpecials: appState.hideSpecials, seasonExtended: [.full, .episodes])
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public final class DefaultWatchedShowEntitiesDownloader: WatchedShowEntitiesDown
let showOptions = WatchedShowEntitySyncOptions(showIds: show.ids,
episodeExtended: options.extended,
seasonOptions: .yes(number: nil, extended: options.seasonExtended),
hiddingSpecials: options.hiddingSpecials)
hidingSpecials: options.hidingSpecials)

return showSynchronizer.syncWatchedShowEntitiy(using: showOptions).map { builder in
builder.set(detailShow: detailShow)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ public final class DefaultWatchedShowEntityDownloader: WatchedShowEntityDownload

private func fetchProgressFromAPI(options: WatchedShowEntitySyncOptions) -> Single<BaseShow> {
let target = Shows.watchedProgress(showId: options.showIds.realId,
hidden: !options.hiddingSpecials,
specials: !options.hiddingSpecials,
countSpecials: !options.hiddingSpecials)
hidden: !options.hidingSpecials,
specials: !options.hidingSpecials,
countSpecials: !options.hidingSpecials)

return trakt.shows.rx.request(target)
.filterSuccessfulStatusAndRedirectCodes()
Expand Down
12 changes: 6 additions & 6 deletions CouchTrackerCore/Synchronizer/SyncOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ public enum SeasonSyncOptions {
public struct WatchedShowEntitySyncOptions {
public let episodeExtended: Extended
public let seasonOptions: SeasonSyncOptions
public let hiddingSpecials: Bool
public let hidingSpecials: Bool
public let showIds: ShowIds

public init(showIds: ShowIds, episodeExtended: Extended, seasonOptions: SeasonSyncOptions, hiddingSpecials: Bool) {
public init(showIds: ShowIds, episodeExtended: Extended, seasonOptions: SeasonSyncOptions, hidingSpecials: Bool) {
self.showIds = showIds
self.episodeExtended = episodeExtended
self.seasonOptions = seasonOptions
self.hiddingSpecials = hiddingSpecials
self.hidingSpecials = hidingSpecials
}
}

public struct WatchedShowEntitiesSyncOptions {
public let extended: Extended
public let hiddingSpecials: Bool
public let hidingSpecials: Bool
public let seasonExtended: [Extended]

public init(extended: Extended, hiddingSpecials: Bool, seasonExtended: [Extended]) {
public init(extended: Extended, hidingSpecials: Bool, seasonExtended: [Extended]) {
self.extended = extended
self.hiddingSpecials = hiddingSpecials
self.hidingSpecials = hidingSpecials
self.seasonExtended = seasonExtended
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ final class ShowEpisodeAPIRepositoryTest: XCTestCase {
}

// Then
XCTAssertFalse(synchronizer.lastOptionsParameter?.hiddingSpecials ?? true)
XCTAssertFalse(synchronizer.lastOptionsParameter?.hidingSpecials ?? true)
}

func testShowEpisodeAPIRepository_addToHistorSuccess_emitsSyncResultWithShow() {
Expand Down

0 comments on commit 9c47c89

Please sign in to comment.