Skip to content

Stop Baloo backend from failing when Baloo indexes non-existing folder

Jack Hill requested to merge jackh/elisa:better-baloo-listing into master

Reason for the change

Currently:

  1. The Baloo backend does not get activated when Baloo is told to index a non-existing directory.

  2. The Baloo backend does not get activated when Baloo is set to index a sub-directory of a directory that is explicitly set to not be indexed.

  3. The Baloo indexer is activated when Baloo is set to not index a sub-directory of a music source. For example, if we set /home/music as a source, and tell Baloo to stop indexing /home/music/album then Elisa will not find any files in this directory.. If the Baloo backend is disabled (from the config dialogue) then Elisa does find the files.

This MR fixes all of these issues.

Test plan

Test 1

  1. Make a folder ~/elisatest1 and tell Baloo to not index it
  2. Delete the folder ~/elisatest1
  3. Start Elisa

Before:

  • The Baloo backend for Elisa would not be activated

Now:

  • The Baloo backend for Elisa is activated

Test 2

  1. Make the folder ~/elisatest2 and tell Baloo to not index it
  2. Make a sub folder ~/elisatest2/music and tell Baloo to index it
  3. Tell Elisa to use ~/elisatest2/music as a music source

Before:

  • The Baloo backend for Elisa would not be activated

Now:

  • The Baloo backend for Elisa works is activated

Test 3

  1. Tell Baloo to index ~/elisatest3 and tell Baloo to stop indexing it
  2. Make the sub-folder ~/elisatest3/music and place a music file in it
  3. Tell Elisa to use ~/elisatest3 as a source

Before:

  • The Baloo backend for Elisa is activated
  • Elisa does not find the file in ~/elisatest3/music

Now:

  • The Baloo backend for Elisa is not activated
  • Elisa finds the file in ~/elisatest3/music
Edited by Jack Hill

Merge request reports