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

Closed
opened 7 years ago by izzy · 2 comments
izzy commented 7 years ago
Owner

Author: @IzzySoft

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).

Author: @IzzySoft 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](http://projects.izzysoft.de/trac/minicalope/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).
Poster
Owner

Author: @IzzySoft

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 😇

Author: @IzzySoft 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: ``` .php #==========================[ 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 :innocent:
Poster
Owner

Author: @IzzySoft

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.
Author: @IzzySoft 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.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.