music2storage/connection.py
def use_storage_service(self, service_name, custom_path):
        """
        Sets the current storage service to service_name and runs the connect method on the service.

        :param str service_name: Name of the storage service
        :param str custom_path: Custom path where to download tracks for local storage (optional, and must already exist, use absolute paths only)
        """

        try:
            self.current_storage = self.storage_services[service_name]
        except KeyError:
            if service_name == 'google drive':
                self.storage_services['google drive'] = GoogleDrive()
                self.current_storage = self.storage_services['google drive']
                self.current_storage.connect()
            elif service_name == 'dropbox':
                log.error('Dropbox is not supported yet.')
            elif service_name == 'local':
                self.storage_services['local'] = LocalStorage(custom_path=custom_path)
                self.current_storage = self.storage_services['local']
                self.current_storage.connect()
            else:
                log.error('Storage service name is not recognized.')
def use_storage_service(self, service_name, custom_path):
        """
        Sets the current storage service to service_name and runs the connect method on the service.

        :param str service_name: Name of the storage service
        :param str custom_path: Custom path where to download tracks for local storage (optional, and must already exist, use absolute paths only)
        """

        try:
            self.current_storage = self.storage_services[service_name]
        except KeyError:
            if service_name == 'google drive':
                self.storage_services['google drive'] = GoogleDrive()
                self.current_storage = self.storage_services['google drive']
                self.current_storage.connect()
            elif service_name == 'dropbox':
                log.error('Dropbox is not supported yet.')
            elif service_name == 'local':
                self.storage_services['local'] = LocalStorage(custom_path=custom_path)
                self.current_storage = self.storage_services['local']
                self.current_storage.connect()
            else:
                log.error('Storage service name is not recognized.')
Sets the current storage service to service_name and runs the connect method on the service.

        :param str service_name: Name of the storage service
        :param str custom_path: Custom path where to download tracks for local storage (optional, and must already exist, use absolute paths only)