                             .then (data) ->
 
                                 # Add filepath to db
-                                movie = data[0]
-                                movie.path = file.path
+                                stuff = data[0]
+                                stuff.path = file.path
 
                                 # Save data to DB
-                                $scope.db.insert movie, (e, item) ->
+                                $scope.db.insert stuff, (e, item) ->
                                     if e then return console.error e
 
                                     # Add data to main grid
-                                    $scope.add_movie movie
+                                    $scope.add_movie stuff
 
                             .catch (e) ->
                                 console.error e

        ###
        $scope.drop = (files) ->

            for file in files

                # Check for ext
                filename = file.name.split(".")
                ext = filename.pop()
                if $scope.allowed.indexOf(ext) is -1
                    return

                # Rejoin filename parts with a space (previously replaced all
                # dots in name)
                filename = filename.join " "

                # Check if movie is already in user's library
                $scope
                    .check_filepath file.path
                    .then () ->

                        # Find movie infos
                        $trakt

         # @param {String} filepath - Wanted filename
         # @return {Object} - $q promise
        ###
        $scope.check_filepath = (file) ->
            q = $q.defer()

            $scope.db.find { path: file.path }, (e, items) ->
                if e then q.reject e
                else if items.length > 0 then q.reject "Movie already in library"
                else q.resolve file

            q.promise

