Skip to content
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

X-Ray is not hideen beyond the point of reading #55

Open
Phobooky opened this issue Jul 30, 2022 · 6 comments
Open

X-Ray is not hideen beyond the point of reading #55

Phobooky opened this issue Jul 30, 2022 · 6 comments

Comments

@Phobooky
Copy link

Phobooky commented Jul 30, 2022

Describe the bug

As you can see in the screenshots (second to the end), X-Ray is hidden beyond the point of reading to protect the appareances of the character in future reading (spoilers). This not happen is your X-Ray files as you can see in the first screenshot. All of the images have been taken having the point of reading in the middle of the book more or less. By the way, with the standard way of working, if you want to go beyond the point of reading, you can do it, as you can see in the other screenshots.
I enclose a correct X-Ray file.

System Information

OS: Windows 11
calibre version: Last one
Phyton version: Python 3.10.5
Plugin version: 3,24.0

Error message

None

Reproduce steps

  1. Tap in a X-Ray word
  2. Go to X-Ray

Screenshots or videos

screenshot_2022_07_30T08_35_37+0100
Captura de pantalla 2022-07-30 094033
screenshot_2022_07_30T08_42_02+0100
screenshot_2022_07_30T08_42_09+0100

Sira - Maria Duenas Vinuesa.zip

@xxyzz
Copy link
Owner

xxyzz commented Jul 30, 2022

I don't know how this feature is enabled, the sqlite file looks exactly the same. There is a show_spoilers_default column in the book_metedata table but set it to 0 doesn't have any effect.

@Phobooky
Copy link
Author

This X-Ray file has been created with the X-Ray Plugin. It was deprecated but I updated it for my use. I didn't published it because yet because it was only in Spanish and then I discovered your that is better. But you can see in this plugin how it is created. I'II try to investigate a little too.

@Phobooky
Copy link
Author

The only strange thing that the "x-ray plugin" does when going through the code quickly, is that it sorts the list of entities. I don't know why it does it:

def fill_entity(self, log):
    '''Writes entity table'''
    entity_data = []
    sortedList = []
    for entity in self._entity_data.keys():
        original_label = self._entity_data[entity]['original_label']
        entity_id = str(self._entity_data[entity]['entity_id'])
        entity_type = str(self._entity_data[entity]['type'])
        count = str(self._entity_data[entity]['mentions'])
        has_info_card = '1' if self._entity_data[entity]['description'] else '0'
        entity_data.append((entity_id, original_label, None, entity_type, count, has_info_card))
        sortedList.append((original_label, self._entity_data[entity]['entity_id'], self._entity_data[entity]['mentions']))

    self._db_writer.insert_into_entity(entity_data)
    log(StatusInfo.F_XRAY_DBWRITER_ENTITIES)
    sortedList = sorted(sortedList, key=lambda entity: entity[2], reverse=True)
    i = 0
    while i < len(sortedList):
        log(StatusInfo.F_XRAY_DBWRITER_ENTITIE_DETAIL.format(sortedList[i][0], 
        sortedList[i][1], sortedList[i][2]))  
        i += 1

@Phobooky
Copy link
Author

Suggestion: In the X-Ray from the other source, the characters with spoiler protection appears as "PERSON". In yours the characters appear as: Source: Kindle Shop or Wikipedia, never as PERSON.

@xxyzz
Copy link
Owner

xxyzz commented Jul 30, 2022

Maybe it requires has_excerpts to be 1. To be frank, I'm not interested in the spoiler and excerpt feature, I don't think they are very helpful for reading books.

The source can only be None, Wikipedia or Fandom, it can't be Kindle Store.

@Phobooky
Copy link
Author

Phobooky commented Jul 30, 2022

Don't worry. If you don't think it could be usefull, it is not a problem for me to close the issue. I only want to help you. Sorry. Perhaps you're right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants