-
Notifications
You must be signed in to change notification settings - Fork 295
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
Field to define the expected syntax of filenames #5
Comments
Of course, I mean that the editable field for the filename syntax should be added in the preferences. To be on the safe side, you should also add a button or link "reset to default", which puts again in the editable field the string "%a - %t", in case the user makes some mistake. Also, you should make the presence of the "%t", the "title" part, mandatory in the validation of the string: all correct filename expression contain one and only one "%t" |
For quick reference, now that I know the Librera code a bit better: Given that I now see that the heuristics in getTitleAuthorByPath() is more complex than just interpreting the path name as "author - title.extension", I can rephrase the proposal as: |
In the list and grid view of the book selection tabs, a heuristic method is used to identify "author (editor, etc.)" and "title (subtitle, etc.)" from the filename, when they are not available as metadata: the space-dash-space, ' - '.
Problem: not all filenames use the "author - title" syntax,
for example 'Book about something, The [Publishing House - Smith, J., 2000]'.
In this case, the "Author" is taken to be 'Book about something, The [Publishing House'
and the "Title" is taken to be 'Smith, J., 2000]'.
Proposal: add a string field with an expression such as
"%a - %t"
The above defaults to what you are doing now. If the user modifies the expression, for example, as
"%t [%a]", then the split would be correct for the example I gave above.
(I mention this issue in another post, but here it is better defined).
The text was updated successfully, but these errors were encountered: