Skip to content

Commit

Permalink
nit picks
Browse files Browse the repository at this point in the history
ulukaya committed Apr 14, 2017
1 parent cfd81bb commit 63235ae
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CastVideos-swift/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -254,7 +254,7 @@ extension AppDelegate: GCKSessionManagerListener {
Toast.displayMessage("Session ended", for: 3, in: view)
}
} else {
let message = "Session ended unexpectedly:\n\(error?.localizedDescription)"
let message = "Session ended unexpectedly:\n\(error?.localizedDescription ?? "")"
showAlert(withTitle: "Session error", message: message)
}
}
4 changes: 2 additions & 2 deletions CastVideos-swift/MediaQueueViewController.swift
Original file line number Diff line number Diff line change
@@ -118,7 +118,7 @@ class MediaQueueViewController: UIViewController, UITableViewDataSource, UITable
if artist == nil {
artist = item?.mediaInformation.metadata?.string(forKey: kGCKMetadataKeyStudio)
}
let detail: String? = "(\(GCKUIUtils.timeInterval(asString: (item?.mediaInformation.streamDuration)!))) \(artist)"
let detail: String? = "(\(GCKUIUtils.timeInterval(asString: (item?.mediaInformation.streamDuration)!))) \(artist ?? "")"
let mediaTitle: UILabel? = (cell?.viewWithTag(1) as? UILabel)
mediaTitle?.text = title
let mediaOwner: UILabel? = (cell?.viewWithTag(2) as? UILabel)
@@ -210,7 +210,7 @@ class MediaQueueViewController: UIViewController, UITableViewDataSource, UITable
}
// MARK: - GCKRemoteMediaClientListener

func remoteMediaClient(_ client: GCKRemoteMediaClient, didUpdate mediaStatus: GCKMediaStatus) {
func remoteMediaClient(_ client: GCKRemoteMediaClient, didUpdate mediaStatus: GCKMediaStatus?) {
self._tableView.reloadData()
}

4 changes: 2 additions & 2 deletions CastVideos-swift/MediaViewController.swift
Original file line number Diff line number Diff line change
@@ -304,8 +304,8 @@ class MediaViewController: UIViewController, GCKSessionManagerListener,
}
// MARK: - GCKRemoteMediaClientListener

func remoteMediaClient(_ player: GCKRemoteMediaClient, didUpdate mediaStatus: GCKMediaStatus) {
self.mediaInfo = mediaStatus.mediaInformation
func remoteMediaClient(_ player: GCKRemoteMediaClient, didUpdate mediaStatus: GCKMediaStatus?) {
self.mediaInfo = mediaStatus?.mediaInformation
}
// MARK: - LocalPlayerViewDelegate
/* Signal the requested style for the view. */
2 changes: 1 addition & 1 deletion Classes/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
#import "AppDelegate.h"

#import <AVFoundation/AVFoundation.h>
#import <GoogleCast/Googlecast.h>
#import <GoogleCast/GoogleCast.h>

#import "MediaViewController.h"
#import "RootContainerViewController.h"

0 comments on commit 63235ae

Please sign in to comment.