Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MusicPlayer/APIController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class APIController {
func get(path: String) {
let url = NSURL(string: path)
let session = NSURLSession.sharedSession()
let task = session.dataTaskWithURL(url, completionHandler: {data, response, error -> Void in
let task = session.dataTaskWithURL(url!, completionHandler: {data, response, error -> Void in
println("Task completed")
if(error != nil) {
// If there is an error in the web request, print it to the console
Expand Down
2 changes: 1 addition & 1 deletion MusicPlayer/Album.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Album {
var nf: NSNumberFormatter = NSNumberFormatter()
nf.maximumFractionDigits = 2
if priceFloat != nil {
price = "$"+nf.stringFromNumber(priceFloat!)
price = "$"+nf.stringFromNumber(priceFloat!)!
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion MusicPlayer/DetailsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DetailsViewController: UIViewController, APIControllerProtocol, UITableVie
override func viewDidLoad() {
super.viewDidLoad()
titleLabel.text = self.album?.title
albumCover.image = UIImage(data: NSData(contentsOfURL: NSURL(string: self.album!.largeImageURL)))
albumCover.image = UIImage(data: NSData(contentsOfURL: NSURL(string: self.album!.largeImageURL)!)!)

if self.album != nil {
api.lookupAlbum(self.album!.collectionId)
Expand Down
2 changes: 1 addition & 1 deletion MusicPlayer/SearchResultsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class SearchResultsViewController: UIViewController, UITableViewDataSource, UITa

if( image == nil ) {
// If the image does not exist, we need to download it
var imgURL: NSURL = NSURL(string: urlString)
var imgURL: NSURL = NSURL(string: urlString)!

// Download an NSData representation of the image at the URL
let request: NSURLRequest = NSURLRequest(URL: imgURL)
Expand Down