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

WIP: auto pronounce from next dictionary #972

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

vedgy
Copy link
Member

@vedgy vedgy commented Mar 15, 2018

These changes seem to fix #970 for me.
My DSL dictionary's links still play the LSA dictionary's pronunciations.
I plan to address several TODOs:

  • Remove all mentions of the no longer necessary gdAudioLinks.first.
  • Distinguish resource search types in ArticleView::saveResource() in the same way as in ArticleView::openLink().
  • Performance improvement: remove duplicates from gdAudioLinks.all before iterating and calling openLink() on its elements.

I don't know if this code handles XDXF resource search type correctly because I don't have any XDXF dictionaries to test.

@Abs62, what do you think about these changes? Do you have any suggestions?

@vedgy
Copy link
Member Author

vedgy commented Mar 16, 2018

Implemented the TODOs in the last 3 commits.

…o wip-auto-pronounce-from-next-dictionary
Before this commit there were no clear criteria for
ArticleView::openLink() and ArticleView::resourceDownloadFinished()
return values. Now there are documented and implemented criteria, which
will hopefully be useful in future uses of these functions.

Right now the dependent code cares about return values only when
an audio resource is requested. ArticleView::openLink() should return
false if the audio resource does not exist or can not be downloaded;
true otherwise: in case of success, asynchronous downloading (to prevent
playing more than one pronunciation) or an audio player failure
(to prevent a long sequence of errors in case of incorrect audio player
configuration or a bug).
…o wip-auto-pronounce-from-next-dictionary
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

Successfully merging this pull request may close these issues.

Auto-pronounce from the next dictionary after failing to download the referenced resource
1 participant