belaudiobooks / website

Catalog of belarusian audiobooks
GNU General Public License v3.0
32 stars 6 forks source link

Move Book.preview_url to Narration #112

Closed nbeloglazov closed 8 months ago

nbeloglazov commented 11 months ago

Preview url points at youtube video that contains first chapter of a book. This is a Narration-level field, not Book. Additionally we need to render it it in the corresponding narration section for cases when there are multiple narrations. Example: https://audiobooks.by/books/orden-belai-myshy

frombrest commented 8 months ago

Since, book may has two or more narrations, it is not obvious to which narration preview link belongs. So, as I understand we should:

  1. Create new column in Narration model
  2. Write db migration to move url to narration level for books with single narration.
  3. Rest of the books (with 2 or more narrations) must be handled manually.
  4. Delete old preview field from Book model.

@nbeloglazov Does this plan look right for you?

nbeloglazov commented 8 months ago

Yes, exactly that!

nbeloglazov commented 8 months ago

I think everything is done. Only to update data.json test.

frombrest commented 8 months ago

Seems like we are done. Can we close issue, or anything else?

nbeloglazov commented 8 months ago

Yes. Thank you again!