-
Notifications
You must be signed in to change notification settings - Fork 4
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
ZO-4649: calculate checksum of article body and compare against tts audio before adding audio reference #607
Conversation
…udio before adding audio reference
… a checksum calculate somalia article has no division element and this element is required to calculate a realistic checksum, after checkin the somalia article gets the element therefore we have another checksum after that even though we not changed the article
core/src/zeit/speech/connection.py
Outdated
@@ -110,7 +111,7 @@ def _article(self, speech: IAudio) -> IArticle: | |||
|
|||
def _assert_checksum_matches(self, speech: IAudio) -> IArticle: | |||
article = self._article(speech) | |||
article_checksum = zeit.content.article.interfaces.ISpeechbertChecksum(article) | |||
article_checksum = calculate_checksum(article, None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Man könnte das ausrechnen auf den SpeechbertChecksum
Adapter schieben (anstatt freischwebende Funktion), dann wär der Zusammenhang etwas klarer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auf jeden Fall!
core/src/zeit/speech/connection.py
Outdated
@@ -110,7 +111,7 @@ def _article(self, speech: IAudio) -> IArticle: | |||
|
|||
def _assert_checksum_matches(self, speech: IAudio) -> IArticle: | |||
article = self._article(speech) | |||
article_checksum = zeit.content.article.interfaces.ISpeechbertChecksum(article) | |||
article_checksum = calculate_checksum(article, None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Und ich glaube, wir sollten die frisch berechnete Checksumme hier nicht speichern, oder? Denn sonst ist doch nicht mehr klar, auf welchen Stand sie sich bezieht (denn die sonstige Annahme ist ja, "wird before publish ausgerechnet").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checklist
gif