Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

Let the metadata 'author' tag overwrite the author name taken from the directory name #3

Closed
IzzySoft opened this issue Mar 17, 2015 · 2 comments

Comments

@IzzySoft
Copy link
Owner

We should have an option for this:

Whenever there's at least one author:: tag present in the books meta .data file, the author name as evaluated from the file system path should be ignored (as we already do with book titles). Due to restrictions/difficulties with some "special characters" in file names, the latter one might be spelled incorrectly – so this would give an option to fix that.

This issue has been raised with ticket:19 in the original tracker – where there's also already a patch available this feature could be based on. Other than with that patch, we should make this optional; though it might be considered having it enabled by default (for new installations).

IzzySoft added a commit that referenced this issue Mar 24, 2015
…rname

- solves: issue #3 (old ticket:19)
- new config var: meta_overrides to control this
@IzzySoft
Copy link
Owner Author

Hopefully solved with 22ad3f9 – the original patch looks like it missed taking care for the complete (global) author list.

This behavior can be controlled by a new configuration setting:

#==========================[ Scan Specials ]===
// when found in .data files, what shall override definitions collected from the
// directory structure? If not named here, it will be "merged". Currently
// supported: author
$data_overrides = array('author');

Above fragment shows the current default, which reflects the new behavior. If for some reason someone only put the "additional authors" into the .data files, and thus requires the "old" (original) behavior, just remove 'author' from that array.

I've only tested it shortly for now – so third-party feedback is welcome 😇

IzzySoft added a commit that referenced this issue Mar 26, 2015
- complements feature request of #3
- permits .name files to be placed on genre/author level to override dirname
- content of the .name file overrides the corresponding name in metadata
- new config var $dotname_overrides switches this on/off
@IzzySoft
Copy link
Owner Author

To make the idea behind it easier to achieve in real-life, 5cdac66 adds the possibility to place a file named .name inside the genre or author directories, to replace the corresponding directory name in the Metadata used. Best explained using an example: If you have many books written by Alexandre Dumas (the elder), and named the directory Alexandre Dumas (pere) – placing a .name file within the same directory, you could have him show up as Alexandre Dumas (père) – without the need to do that in each and every .data file using the author:: keyword.

Idea behind this is to stick with 7-bit ASCII in the file system itself to avoid specific trouble, but still having the full set of characters available for Metadata. If you want to use this, be aware of some minor side-effects:

  • you will need to take care keeping the .name specifications and the tag::/author:: definitions of your *.data files in sync – or our French friend turns up as Alexandre Dumas (pere) for one book, and Alexandre Dumas (père) for others
  • SQLite has limitations with characters outside the 7-bit range as well, e.g. when it comes to sorting or case-insensitive matching (so this might affect the search feature) – and this software uses SQLite as backend.

@IzzySoft IzzySoft closed this as completed Apr 3, 2015
@IzzySoft IzzySoft self-assigned this Apr 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant