Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

excluding external storage folder. #151

Closed
stratege1401 opened this issue Feb 9, 2019 · 5 comments · Fixed by #190
Closed

excluding external storage folder. #151

stratege1401 opened this issue Feb 9, 2019 · 5 comments · Fixed by #190

Comments

@stratege1401
Copy link

stratege1401 commented Feb 9, 2019

Hi.

using Scalways S3 as an external storage for my 15.0.4 server, i notice my server reaction as slowing.

Notice preview generator has started to scan and preview the external storage.

How to avoid it ?
It is slow, useless as s3 is a redundant backup for me and don't need to be scan

sound stupid, can't remember or find the equivalent of .nomedia

@kescherCode
Copy link

I agree.

@koying
Copy link

koying commented Aug 17, 2019

Running NC16, there is "Enable preview" setting on the external storages.
Unfortunately, it looks like the generator ignores it

@hashworks
Copy link
Contributor

Any plans on this? The "enable preview" setting seems like the right way to exclude them.

@hashworks
Copy link
Contributor

I guess we have to do the following:

Load all mounts:

use OCA\Files_External\Service\GlobalStoragesService;

// [...]

	/**
	 * @var GlobalStoragesService
	 */
	protected $globalService;

	public function __construct(GlobalStoragesService $globalService) {
		parent::__construct();
		$this->globalService = $globalService;
	}

// [...]

$mounts = $this->globalService->getStorageForAllUsers();

Then for every mount check the mount path and the preview setting in the options:

$mountPath = $mount->getMountPoint(); ; // String
$mountOptions = $mount->getMountOptions(); // $key => $value

@hashworks
Copy link
Contributor

Until a new version is released (with the above pull request) a workaround is to create a .nomedia file in the external mount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants