From 2e10077e54429b4e88933f667a0e131ac9052b2c Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 10 Apr 2023 11:59:01 +0300 Subject: [PATCH 01/13] plugins: add importhistory --- beetsplug/importhistory.py | 161 +++++++++++++++++++++++++++++++++ docs/changelog.rst | 1 + docs/plugins/importhistory.rst | 80 ++++++++++++++++ docs/plugins/index.rst | 1 + 4 files changed, 243 insertions(+) create mode 100644 beetsplug/importhistory.py create mode 100644 docs/plugins/importhistory.rst diff --git a/beetsplug/importhistory.py b/beetsplug/importhistory.py new file mode 100644 index 0000000000..27f5c4f96a --- /dev/null +++ b/beetsplug/importhistory.py @@ -0,0 +1,161 @@ +"""Adds a `source_path` attribute to imported albums indicating from what path +the album was imported from. Also suggests removing that source path in case +you've removed the album from the library. + +""" + +import os +from shutil import rmtree + +from beets import library +from beets.plugins import BeetsPlugin +from beets.ui import colorize as colorize_text +from beets.ui import input_options +from beets.util import syspath + + +class ImportHistPlugin(BeetsPlugin): + """Main plugin class.""" + + def __init__(self): + """Initialize the plugin and read configuration.""" + super(ImportHistPlugin, self).__init__() + self.config.add( + { + "suggest_removal": False, + } + ) + self.import_stages = [self.import_stage] + self.register_listener("item_removed", self.suggest_removal) + # In order to stop suggestions for certain albums in + # self.suggest_removal, we initialize an empty set of `mb_albumid`s + # that these will be ignored in future runs of the suggest_removal. + self.stop_suggestions_for_albums = set() + # In case 'import --library' is used, we will get both the import + # event triggered, and the item_removed event triggered because + # that's how 'import --library' works. Unfortuneatly, but + # naturally, the item_removed event is triggered first, and we need + # to prevent suggesting to remove the source_path because that has + # nothing to do with the import. Hence we use this event, and use + # the self.stop_suggestions_for_albums array + self.register_listener( + "import_task_choice", self.prevent_suggest_removal + ) + + def prevent_suggest_removal(self, session, task): + for item in task.imported_items(): + if "mb_albumid" in item: + self.stop_suggestions_for_albums.add(item.mb_albumid) + + def import_stage(self, _, task): + """Event handler for albums import finished.""" + for item in task.imported_items(): + # If import --library is used, this check prevents changing the + # source_path attribute to the path from the music library - + # something which would make this attribute completely useless. + if "source_path" not in item: + item["source_path"] = item.path + item.try_sync(write=True, move=False) + else: + self._log.info( + "Not changing source_path of item already imported - " + "probably 'import --library' was used" + ) + + def suggest_removal(self, item): + """Prompts the user to delete the original path the item was imported from.""" + if "source_path" not in item: + self._log.warn( + "Item without a source_path was found at:\n{}\n" + "probably was imported before this plugin was used", + item.path.decode("utf-8"), + ) + return + if item.mb_albumid in self.stop_suggestions_for_albums: + return + if not self.config["suggest_removal"]: + return + if not os.path.isfile(syspath(item.source_path)): + self._log.warn( + "Item with a source_path that doesn't exist was found:\n{}", + item.source_path.decode("utf-8"), + ) + return + source_dir = os.path.dirname(syspath(item.source_path)) + if not ( + os.access(syspath(item.source_path), os.W_OK) + and os.access(source_dir, os.W_OK | os.X_OK) + ): + self._log.warn( + "Item with a source_path isn't deletable:\n{}", + item.source_path.decode("utf-8"), + ) + return + # We ask the user whether they'd like to delete the item's source + # directory + print( + "The item:\n{path}\nis originated from:\n{source}\n" + "What would you like to do?".format( + path=colorize_text("text_warning", item.path.decode("utf-8")), + source=colorize_text( + "text_warning", item.source_path.decode("utf-8") + ), + ) + ) + resp = input_options( + [ + "Delete the item's source", + "Recursively delete the source's directory", + "do Nothing", + "do nothing and Stop suggesting to delete items from this album", + ], + require=True, + ) + if resp == "d": + self._log.info( + "Deleting the item's source file: {}", item.source_path + ) + os.remove(syspath(item.source_path)) + elif resp == "r": + self._log.info( + "Searching for other items with a source_path attr containing: {}", + source_dir, + ) + source_dir_query = library.PathQuery( + "source_path", + source_dir, + # The "source_path" attribute may not be present in all + # items of the library, so we avoid errors with this: + fast=False, + ) + print("Doing so will delete the following items' sources as well:") + for searched_item in item._db.items(source_dir_query): + print( + colorize_text( + "text_warning", + searched_item["path"].decode("utf-8"), + ) + ) + print("Would you like to continue?") + continue_resp = input_options( + ["Yes", "delete None", "delete just the File"], + require=False, # Yes is the a default + ) + if continue_resp == "y": + self._log.info( + "Deleting the item's source directory: {}", source_dir + ) + rmtree(source_dir) + elif continue_resp == "n": + self._log.info("doing nothing - aborting hook function") + return + elif continue_resp == "f": + self._log.info( + "removing just the item's original source: {}", + item.source_path, + ) + os.remove(item.source_path) + elif resp == "s": + self.stop_suggestions_for_albums.add(item.mb_albumid) + else: + self._log.info("Doing nothing") diff --git a/docs/changelog.rst b/docs/changelog.rst index 46fa3b64e1..61a34aa624 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -103,6 +103,7 @@ Other changes: New features: +* :doc:`plugins/importhistory`: Added plugin * New template function added: ``%capitalize``. Converts the first letter of the text to uppercase and the rest to lowercase. * Ability to query albums with track db fields and vice-versa, for example diff --git a/docs/plugins/importhistory.rst b/docs/plugins/importhistory.rst new file mode 100644 index 0000000000..f01191756e --- /dev/null +++ b/docs/plugins/importhistory.rst @@ -0,0 +1,80 @@ +ImportHistory Plugin +==================== + +The ``importhistory`` plugin is a simple plugin that adds a `source_path` field +to every item imported to your library. It is useful when you import many +directories in a bulk, and you want to keep track of the directories you +already imported. + +Another feature of the plugin is suggesting the user to delete the source +paths of items you remove from your beets library. This is useful if you keep +backups of your imports in their original source paths by using `beet import +--copy`, and you want to delete their backup when you regret the imports +altogether. + +To use the ``importhistory`` plugin, enable it in your configuration (see +:ref:`using-plugins`). + +`source_path` Usage +------------------- + +The first use case of the `source_path` field is in the following scenario: You +imported all of the directories in your current `$PWD`:: + + beet import --flat --copy */ + +Then, something went wrong, and you need to rerun this command. But, you don't +want to tell beets to read again the already successfully imported directories +again. So, you can view which files were successfully imported, using:: + + beet ls source_path:$PWD --format='$source_path' + +You can of course pipe this command to other standard UNIX utilities:: + + # The following prints the directories without the l + beet ls source_path:$PWD --format='$source_path' | \ + sed "s#$(dirname $PWD)/\([^/]*\)/.*#\1#" | \ + sort -u + +The above will print only the directories you successfully finished importing +with `beet import --flat --copy */`. + +Removal Suggestion Usage +------------------------ + +A second use case of the plugin is described in the following scenario: Imagine +you imported an album using:: + + beet import --copy --flat ~/Desktop/interesting-album-to-check/ + +Then you listened to that album and decided it wasn't good and you want to +delete it from your library, and from your `~/Desktop`, so you run:: + + beet remove --delete source_path:$HOME/Desktop/interesting-album-to-check + +After you'll approve the deletion, this plugin will ask you:: + + The item: + /Interesting Album/01 Interesting Song.flac + is originated from: + /Desktop/interesting-album-to-check/01-interesting-song.flac + What would you like to do? + Delete the item's source, Recursively delete the source's directory, + do Nothing, + do nothing and Stop suggesting to delete items from this album? + +Thus the plugin helps you delete the files from the beets library and from +their source as one. + +Configuration +------------- + +To configure the plugin, make an ``importhistory:`` section in your +configuration file. There are two options available: + +- **suggest_removal**: When deleting items from the library, suggest to remove + the original directories / files from which the items were imported. + Default: ``yes``. + +This behavior can be disabled by the `importhistory.` +config option. diff --git a/docs/plugins/index.rst b/docs/plugins/index.rst index 6705344c9d..98bd643356 100644 --- a/docs/plugins/index.rst +++ b/docs/plugins/index.rst @@ -93,6 +93,7 @@ following to your configuration:: ihate importadded importfeeds + importhistory info inline ipfs From 20a6acd0cd7b7904df300dd19cb9b5795351df63 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 23 Sep 2024 10:37:04 +0200 Subject: [PATCH 02/13] importhistory: Fix deprecated logger syntax --- beetsplug/importhistory.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beetsplug/importhistory.py b/beetsplug/importhistory.py index 27f5c4f96a..12fa8caa22 100644 --- a/beetsplug/importhistory.py +++ b/beetsplug/importhistory.py @@ -65,7 +65,7 @@ def import_stage(self, _, task): def suggest_removal(self, item): """Prompts the user to delete the original path the item was imported from.""" if "source_path" not in item: - self._log.warn( + self._log.warning( "Item without a source_path was found at:\n{}\n" "probably was imported before this plugin was used", item.path.decode("utf-8"), @@ -76,7 +76,7 @@ def suggest_removal(self, item): if not self.config["suggest_removal"]: return if not os.path.isfile(syspath(item.source_path)): - self._log.warn( + self._log.warning( "Item with a source_path that doesn't exist was found:\n{}", item.source_path.decode("utf-8"), ) @@ -86,7 +86,7 @@ def suggest_removal(self, item): os.access(syspath(item.source_path), os.W_OK) and os.access(source_dir, os.W_OK | os.X_OK) ): - self._log.warn( + self._log.warning( "Item with a source_path isn't deletable:\n{}", item.source_path.decode("utf-8"), ) From 0df7d2c0f81beeaafb157e6e9d65eeda6c555ab2 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 23 Sep 2024 16:45:26 +0200 Subject: [PATCH 03/13] importhistory: Shorten log msgs in suggest_removal and keep one log message in one line. --- beetsplug/importhistory.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beetsplug/importhistory.py b/beetsplug/importhistory.py index 12fa8caa22..38f113d49c 100644 --- a/beetsplug/importhistory.py +++ b/beetsplug/importhistory.py @@ -66,8 +66,8 @@ def suggest_removal(self, item): """Prompts the user to delete the original path the item was imported from.""" if "source_path" not in item: self._log.warning( - "Item without a source_path was found at:\n{}\n" - "probably was imported before this plugin was used", + "Item without source_path (probably imported before plugin " + "usage): {}", item.path.decode("utf-8"), ) return @@ -77,7 +77,7 @@ def suggest_removal(self, item): return if not os.path.isfile(syspath(item.source_path)): self._log.warning( - "Item with a source_path that doesn't exist was found:\n{}", + "Item with source_path that doesn't exist: {}", item.source_path.decode("utf-8"), ) return @@ -87,7 +87,7 @@ def suggest_removal(self, item): and os.access(source_dir, os.W_OK | os.X_OK) ): self._log.warning( - "Item with a source_path isn't deletable:\n{}", + "Item with source_path not deletable: {}", item.source_path.decode("utf-8"), ) return From a6f1ecb615a7b91b4a708e35310e77bd5dc9df4e Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 23 Sep 2024 16:49:30 +0200 Subject: [PATCH 04/13] importhistory: Check suggest_removal option first Check the suggest_removal option value first thing. It does not make sense to move any further in this function --- beetsplug/importhistory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beetsplug/importhistory.py b/beetsplug/importhistory.py index 38f113d49c..d9603564e6 100644 --- a/beetsplug/importhistory.py +++ b/beetsplug/importhistory.py @@ -64,6 +64,8 @@ def import_stage(self, _, task): def suggest_removal(self, item): """Prompts the user to delete the original path the item was imported from.""" + if not self.config["suggest_removal"]: + return if "source_path" not in item: self._log.warning( "Item without source_path (probably imported before plugin " @@ -73,8 +75,6 @@ def suggest_removal(self, item): return if item.mb_albumid in self.stop_suggestions_for_albums: return - if not self.config["suggest_removal"]: - return if not os.path.isfile(syspath(item.source_path)): self._log.warning( "Item with source_path that doesn't exist: {}", From 0debf28206e879d81d2ada9c8ec358d279f68e89 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 23 Sep 2024 11:49:57 +0200 Subject: [PATCH 05/13] importhistory: Shorten reimport info log msg and also state item id. --- beetsplug/importhistory.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/beetsplug/importhistory.py b/beetsplug/importhistory.py index d9603564e6..797e238613 100644 --- a/beetsplug/importhistory.py +++ b/beetsplug/importhistory.py @@ -58,8 +58,7 @@ def import_stage(self, _, task): item.try_sync(write=True, move=False) else: self._log.info( - "Not changing source_path of item already imported - " - "probably 'import --library' was used" + "Preserving source_path of reimported item {}", item.id ) def suggest_removal(self, item): From 29f22e60ebd063ee953c1483c22260388f7e3ec5 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 23 Sep 2024 17:24:11 +0200 Subject: [PATCH 06/13] importhistory: Reimport check early continue instead of if/else. --- beetsplug/importhistory.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beetsplug/importhistory.py b/beetsplug/importhistory.py index 797e238613..44ed93fa12 100644 --- a/beetsplug/importhistory.py +++ b/beetsplug/importhistory.py @@ -53,13 +53,13 @@ def import_stage(self, _, task): # If import --library is used, this check prevents changing the # source_path attribute to the path from the music library - # something which would make this attribute completely useless. - if "source_path" not in item: - item["source_path"] = item.path - item.try_sync(write=True, move=False) - else: + if "source_path" in item: self._log.info( "Preserving source_path of reimported item {}", item.id ) + continue + item["source_path"] = item.path + item.try_sync(write=True, move=False) def suggest_removal(self, item): """Prompts the user to delete the original path the item was imported from.""" From ecf1ce19fb7fb6412133d3eb8068c074938a112d Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 23 Sep 2024 18:23:54 +0200 Subject: [PATCH 07/13] importhistory: Use displayable_path utility instead of using the decode utf 8 built-in method. Wrap a couple more things with displayable_path that might have been overseen. --- beetsplug/importhistory.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/beetsplug/importhistory.py b/beetsplug/importhistory.py index 44ed93fa12..6e671f0dd7 100644 --- a/beetsplug/importhistory.py +++ b/beetsplug/importhistory.py @@ -11,7 +11,7 @@ from beets.plugins import BeetsPlugin from beets.ui import colorize as colorize_text from beets.ui import input_options -from beets.util import syspath +from beets.util import syspath, displayable_path class ImportHistPlugin(BeetsPlugin): @@ -69,7 +69,7 @@ def suggest_removal(self, item): self._log.warning( "Item without source_path (probably imported before plugin " "usage): {}", - item.path.decode("utf-8"), + displayable_path(item.path), ) return if item.mb_albumid in self.stop_suggestions_for_albums: @@ -77,7 +77,7 @@ def suggest_removal(self, item): if not os.path.isfile(syspath(item.source_path)): self._log.warning( "Item with source_path that doesn't exist: {}", - item.source_path.decode("utf-8"), + displayable_path(item.source_path), ) return source_dir = os.path.dirname(syspath(item.source_path)) @@ -87,7 +87,7 @@ def suggest_removal(self, item): ): self._log.warning( "Item with source_path not deletable: {}", - item.source_path.decode("utf-8"), + displayable_path(item.source_path), ) return # We ask the user whether they'd like to delete the item's source @@ -95,9 +95,9 @@ def suggest_removal(self, item): print( "The item:\n{path}\nis originated from:\n{source}\n" "What would you like to do?".format( - path=colorize_text("text_warning", item.path.decode("utf-8")), + path=colorize_text("text_warning", displayable_path(item.path)), source=colorize_text( - "text_warning", item.source_path.decode("utf-8") + "text_warning", displayable_path(item.source_path) ), ) ) @@ -112,7 +112,8 @@ def suggest_removal(self, item): ) if resp == "d": self._log.info( - "Deleting the item's source file: {}", item.source_path + "Deleting the item's source file: {}", + displayable_path(item.source_path) ) os.remove(syspath(item.source_path)) elif resp == "r": @@ -132,7 +133,7 @@ def suggest_removal(self, item): print( colorize_text( "text_warning", - searched_item["path"].decode("utf-8"), + displayable_path(searched_item["path"]) ) ) print("Would you like to continue?") @@ -142,7 +143,8 @@ def suggest_removal(self, item): ) if continue_resp == "y": self._log.info( - "Deleting the item's source directory: {}", source_dir + "Deleting the item's source directory: {}", + displayable_path(source_dir) ) rmtree(source_dir) elif continue_resp == "n": @@ -151,7 +153,7 @@ def suggest_removal(self, item): elif continue_resp == "f": self._log.info( "removing just the item's original source: {}", - item.source_path, + displayable_path(item.source_path), ) os.remove(item.source_path) elif resp == "s": From 18224ce81074bf432e434ec04eb9aeb2fb3ce317 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 23 Sep 2024 18:35:33 +0200 Subject: [PATCH 08/13] importhistory: Shorten comment about removal suggesting --- beetsplug/importhistory.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/beetsplug/importhistory.py b/beetsplug/importhistory.py index 6e671f0dd7..54b522be52 100644 --- a/beetsplug/importhistory.py +++ b/beetsplug/importhistory.py @@ -27,9 +27,8 @@ def __init__(self): ) self.import_stages = [self.import_stage] self.register_listener("item_removed", self.suggest_removal) - # In order to stop suggestions for certain albums in - # self.suggest_removal, we initialize an empty set of `mb_albumid`s - # that these will be ignored in future runs of the suggest_removal. + # In order to stop future removal suggestions for an album we keep + # track of `mb_albumid`s in this set. self.stop_suggestions_for_albums = set() # In case 'import --library' is used, we will get both the import # event triggered, and the item_removed event triggered because From 386232d6409c1cf99d71904d556352567334dc1b Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 23 Sep 2024 18:39:11 +0200 Subject: [PATCH 09/13] importhistory: Shorten comment about reimport event firing --- beetsplug/importhistory.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/beetsplug/importhistory.py b/beetsplug/importhistory.py index 54b522be52..9cc36e0d85 100644 --- a/beetsplug/importhistory.py +++ b/beetsplug/importhistory.py @@ -30,13 +30,10 @@ def __init__(self): # In order to stop future removal suggestions for an album we keep # track of `mb_albumid`s in this set. self.stop_suggestions_for_albums = set() - # In case 'import --library' is used, we will get both the import - # event triggered, and the item_removed event triggered because - # that's how 'import --library' works. Unfortuneatly, but - # naturally, the item_removed event is triggered first, and we need - # to prevent suggesting to remove the source_path because that has - # nothing to do with the import. Hence we use this event, and use - # the self.stop_suggestions_for_albums array + # During reimports (import --library) both the import_task_choice and + # the item_removed event are triggered. The item_removed event is + # triggered first. For the import_task_choice event we prevent removal + # suggestions using the existing stop_suggestions_for_album mechanism. self.register_listener( "import_task_choice", self.prevent_suggest_removal ) From 2f4d0dcc1d1a4f429618252dd1ca7961bd213e16 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 23 Sep 2024 18:51:15 +0200 Subject: [PATCH 10/13] importhistory: Shorten comment reimport overwrite --- beetsplug/importhistory.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/beetsplug/importhistory.py b/beetsplug/importhistory.py index 9cc36e0d85..0497f4d4e1 100644 --- a/beetsplug/importhistory.py +++ b/beetsplug/importhistory.py @@ -46,9 +46,8 @@ def prevent_suggest_removal(self, session, task): def import_stage(self, _, task): """Event handler for albums import finished.""" for item in task.imported_items(): - # If import --library is used, this check prevents changing the - # source_path attribute to the path from the music library - - # something which would make this attribute completely useless. + # During reimports (import --library), we prevent overwriting the + # source_path attribute with the path from the music library if "source_path" in item: self._log.info( "Preserving source_path of reimported item {}", item.id From d052a50a58c4e2a398efb7a73ec1f90dc49aa019 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 23 Sep 2024 18:58:37 +0200 Subject: [PATCH 11/13] importhistory: Fix config option docs --- docs/plugins/importhistory.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/plugins/importhistory.rst b/docs/plugins/importhistory.rst index f01191756e..622f389367 100644 --- a/docs/plugins/importhistory.rst +++ b/docs/plugins/importhistory.rst @@ -70,11 +70,10 @@ Configuration ------------- To configure the plugin, make an ``importhistory:`` section in your -configuration file. There are two options available: +configuration file. There is one option available: -- **suggest_removal**: When deleting items from the library, suggest to remove - the original directories / files from which the items were imported. +- **suggest_removal**: By default ``importhistory`` suggests to remove the + original directories / files from which the items were imported whenever + library items (and files) are removed. To disable these prompts set this + option to ``no``. Default: ``yes``. - -This behavior can be disabled by the `importhistory.` -config option. From 6ae73bb740508876f77489def14f68682f915489 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 23 Sep 2024 19:08:36 +0200 Subject: [PATCH 12/13] importhistory: Rewrite docs intro text --- docs/plugins/importhistory.rst | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/plugins/importhistory.rst b/docs/plugins/importhistory.rst index 622f389367..34a2444079 100644 --- a/docs/plugins/importhistory.rst +++ b/docs/plugins/importhistory.rst @@ -1,16 +1,13 @@ ImportHistory Plugin ==================== -The ``importhistory`` plugin is a simple plugin that adds a `source_path` field -to every item imported to your library. It is useful when you import many -directories in a bulk, and you want to keep track of the directories you -already imported. - -Another feature of the plugin is suggesting the user to delete the source -paths of items you remove from your beets library. This is useful if you keep -backups of your imports in their original source paths by using `beet import ---copy`, and you want to delete their backup when you regret the imports -altogether. +The ``importhistory`` plugin adds a `source_path` field to every item imported +to the library which stores the original media files' paths. Using this plugin +makes most sense when the general importing workflow is to use ``beet import +--copy``. + +Another feature of the plugin is suggesting to delete those original source +files as well whenever items are removed from the Beets library. To use the ``importhistory`` plugin, enable it in your configuration (see :ref:`using-plugins`). From 165cd80d24ad2fe7b6638727db5a1203c6eb978b Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 23 Sep 2024 19:19:33 +0200 Subject: [PATCH 13/13] importhistory: Config option docs format fix --- docs/plugins/importhistory.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/plugins/importhistory.rst b/docs/plugins/importhistory.rst index 34a2444079..01067565a1 100644 --- a/docs/plugins/importhistory.rst +++ b/docs/plugins/importhistory.rst @@ -70,7 +70,7 @@ To configure the plugin, make an ``importhistory:`` section in your configuration file. There is one option available: - **suggest_removal**: By default ``importhistory`` suggests to remove the - original directories / files from which the items were imported whenever - library items (and files) are removed. To disable these prompts set this - option to ``no``. + original directories / files from which the items were imported whenever + library items (and files) are removed. To disable these prompts set this + option to ``no``. Default: ``yes``.