Skip to content

Commit

Permalink
Upgraded NPOKit and handle optional programs for live schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
4np committed Apr 26, 2018
1 parent 8e8b20d commit 54df851
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ abstract_target 'TVGemistAbstract' do
#pod 'NPOKit', :path => '../NPOKit'
#pod 'GHKit', :path => '../GHKit'

pod 'NPOKit', :git => 'https://github.com/4np/NPOKit.git', :tag => '0.0.7'
pod 'NPOKit', :git => 'https://github.com/4np/NPOKit.git', :tag => '0.0.8'
pod 'GHKit', :git => 'https://github.com/4np/GHKit.git', :tag => '0.0.3'
end

Expand Down
12 changes: 6 additions & 6 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PODS:
- GHKit (0.0.3):
- GHKit/Core (= 0.0.3)
- GHKit/Core (0.0.3)
- NPOKit (0.0.7)
- NPOKit (0.0.8)
- ObjcExceptionBridging (1.0.1):
- ObjcExceptionBridging/ObjcExceptionBridging (= 1.0.1)
- ObjcExceptionBridging/ObjcExceptionBridging (1.0.1)
Expand All @@ -14,7 +14,7 @@ PODS:

DEPENDENCIES:
- GHKit (from `https://github.com/4np/GHKit.git`, tag `0.0.3`)
- NPOKit (from `https://github.com/4np/NPOKit.git`, tag `0.0.7`)
- NPOKit (from `https://github.com/4np/NPOKit.git`, tag `0.0.8`)
- SwiftLint
- XCGLogger

Expand All @@ -30,23 +30,23 @@ EXTERNAL SOURCES:
:tag: 0.0.3
NPOKit:
:git: https://github.com/4np/NPOKit.git
:tag: 0.0.7
:tag: 0.0.8

CHECKOUT OPTIONS:
GHKit:
:git: https://github.com/4np/GHKit.git
:tag: 0.0.3
NPOKit:
:git: https://github.com/4np/NPOKit.git
:tag: 0.0.7
:tag: 0.0.8

SPEC CHECKSUMS:
GHKit: 581d518e05fdae0a10ea296cb5ff2dd90649da17
NPOKit: a60c0dfc55fda6a84806a7f423701a1a625f6234
NPOKit: 40e35548b398834a9f2c917acda06666c4cf25eb
ObjcExceptionBridging: c30e00eb3700467e695faeea30e26e18bd445001
SwiftLint: e14651157288e9e01d6e1a71db7014fb5744a8ea
XCGLogger: c9601cae9a8912de34a58666ba931ed3d624dd31

PODFILE CHECKSUM: 7ed5e6df90a4e34e8ac545b50dac9af4cbf6e5ac
PODFILE CHECKSUM: af36cb393c51b47eaef0d649540cb3f62889c0b8

COCOAPODS: 1.5.0.beta.1
4 changes: 2 additions & 2 deletions Pods/Local Podspecs/NPOKit.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Pods/NPOKit/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Pods/Target Support Files/NPOKit/Info.plist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://travis-ci.org/4np/TVGemist.svg?branch=master)](https://travis-ci.org/4np/TVGemist)
[![Release](https://img.shields.io/github/release/4np/TVGemist.svg)](https://github.com/4np/TVGemist/releases/latest)
[![Commits Since](https://img.shields.io/github/commits-since/4np/TVGemist/0.0.4.svg?maxAge=3600)](https://github.com/4np/TVGemist/commits/master)
[![Commits Since](https://img.shields.io/github/commits-since/4np/TVGemist/0.0.5.svg?maxAge=3600)](https://github.com/4np/TVGemist/commits/master)
[![Platform](https://img.shields.io/badge/platform-tvOS%2011.3-green.svg?maxAge=3600)](https://developer.apple.com/tvos/)
[![Swift](https://img.shields.io/badge/language-Swift-ed523f.svg?maxAge=3600)](https://swift.org)
[![codebeat badge](https://codebeat.co/badges/bf954277-cb4b-40d9-8cc2-94aff9568634)](https://codebeat.co/projects/github-com-4np-tvgemist-master)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
4 changes: 2 additions & 2 deletions TVGemist/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.4</string>
<string>0.0.5</string>
<key>CFBundleVersion</key>
<string>4</string>
<string>5</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
Expand Down
8 changes: 5 additions & 3 deletions TVGemist/Live/LiveBroadcastCollectionViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ class LiveBroadcastCollectionViewCell: UICollectionViewCell {

func configure(with broadcast: LiveBroadcast) {
// program title
nameLabel.text = broadcast.currentSchedule?.program.title.localizedCapitalized
nameLabel.text = broadcast.currentSchedule?.program?.title.localizedCapitalized ?? ""

// next program
if let nextSchedule = broadcast.nextSchedule {
if let nextSchedule = broadcast.nextSchedule, let nextProgram = nextSchedule.program {
let nextFormat = "Next: %@ - %@".localized(withComment: "Next: [time] - [program title]")
nextLabel.text = String.localizedStringWithFormat(nextFormat, nextSchedule.startTime, nextSchedule.program.title)
nextLabel.text = String.localizedStringWithFormat(nextFormat, nextSchedule.startTime, nextProgram.title)
} else {
nextLabel.text = ""
}

// get the image for the current program
Expand Down
2 changes: 1 addition & 1 deletion TVGemist/Player/PlayerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ extension PlayerViewController {
shouldUpdateMetadata = false
schedule = currentSchedule

let program = currentSchedule.program
guard let program = currentSchedule.program else { return }

// construct metadata
var metadata: [AVMetadataKey: Any?] = [
Expand Down

0 comments on commit 54df851

Please sign in to comment.