     */
     public func hasNext() -> Bool {
         if let enqueuedItems = enqueuedItems, currentItemIndexInQueue = currentItemIndexInQueue {
-            if currentItemIndexInQueue + 1 < enqueuedItems.count {
+            if currentItemIndexInQueue + 1 < enqueuedItems.count || mode & .RepeatAll != .Normal {
                 return true
             }
         }

            let target = ClosureContainer(closure: { [weak self] sender in
                self?.adjustQualityIfNecessary()
                })
            let timer = NSTimer(timeInterval: retryTimeout, target: target, selector: "callSelectorOnTarget:", userInfo: nil, repeats: false)
            NSRunLoop.mainRunLoop().addTimer(timer, forMode: NSRunLoopCommonModes)
            qualityAdjustmentTimer = timer
        }
    }
    
    
    // MARK: Background
    
    /// The backround task identifier if a background task started. Nil if not.
    private var backgroundTaskIdentifier: Int?
    
    /**
    Starts a background task if there isn't already one running.
    */

    Plays previous item in the queue.
    */
    public func previous() {
        //TODO:
    }

    /**
