LuteOrg/lute-v3

Change audio file

jamesdeluk opened this issue · 7 comments

Is your feature request related to a problem? Please describe.

Be able to change the audio file after a book has been created.

Describe the solution you'd like

For example, under the Edit side menu, a "Change audio" option.

Describe alternatives you've considered

Changing the audio file directly in the storage, but this can alter the audio player tracking bar (i.e. if you replace a 2min audio clip with a 1min clip, and click 1m30s, it fails - you have to reload the page).

Additional context

If the duration was recalculated based on the audio file found, this could be a workaround.

Thanks @jamesdeluk - I didn't include it initially because

  • a) I didn't need it :-)
  • b) any existing audio bookmarks would potentially be incorrect with a new audio file. I guess that replacing the file would kill all of the old audio bookmarks, we could add a warning to the form.

But yes, this should be added. If you have a different idea for handling the audio bookmarks, let me know -- the only other option I can think of is to leave them all as-is and have the user fix them, but that could be tedious too.

I don't typically use bookmarks, so I hadn't considered that.

I feel that if a user is replacing the audio they should realise bookmarks may not auto-sync, so I feel a warning would suffice?

I have no idea why, but there was a single tag missing in the html template that caused the page to not render correctly -- with that fixed, you can now change the file:

image

This will be in the next launch, thanks.

Is this changing the file before the book is made, or after it is? As this looks like the new book page. I'm pretty sure you can already change the audio before the book is made by simply choosing a different file.

Hey @jamesdeluk - this is changing the file after the book is already made. It does look practically the same as the "new book" page. (When you change the file, all the bookmarks are lost :-P)

Ah! Gotcha, thanks for confirming. And I don't use bookmarks so I don't care about that 😄

Launched in 3.5.6.