-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Regardless of which chapter I choose, the audio starts playing from the beginning every time #987
Comments
I printed out the This is the .M4B files that Cozy can go to the correct chapter:
This is a Chapter inside .Opus file, which the player always start at the beginning of the audiofile:
I am not sure if the EDIT: According to chapter.py the |
I added this few lines and opus chapter works for me. diff --git a/cozy/media/tag_reader.py b/cozy/media/tag_reader.py
index 010e5176..141d43b2 100644
--- a/cozy/media/tag_reader.py
+++ b/cozy/media/tag_reader.py
@@ -231,7 +231,7 @@ class TagReader:
if tag.lower().endswith("name"):
chapter_dict[chapter_num].name = value
elif len(tag) == 10:
- chapter_dict[chapter_num].position = self._vorbis_timestamp_to_secs(value)
+ chapter_dict[chapter_num].position = self._vorbis_timestamp_to_secs(value) * Gst.SECOND
if not chapter_dict:
return self._get_single_file_chapter()
@@ -242,13 +242,11 @@ class TagReader:
return self._get_single_file_chapter()
if prev_chapter:
- prev_chapter.length = chapter.position - prev_chapter.position
+ prev_chapter.length = (chapter.position - prev_chapter.position) / Gst.SECOND
chapter_list.append(chapter)
prev_chapter = chapter
- prev_chapter.length = self._get_length_in_seconds() - prev_chapter.position
-
return chapter_list But I guess the position |
I cloned the repo 7b37cae version and built the flatpak image.
Then I opened the .opus audiobook using cozy. It could read the chapters from the audiobook and display in cozy. However when I click a specific chapter it always play the beginning of the audiobook (maybe the first chapter). In this version all chapter name and chapter time is correct. The only unexpected thing here is cozy would play the beginning of the audiobook when I click other chapters.
The flatpak version using c02e73e with PR #969 works flawlessly so my primary suspect is commit ff983a0. BTW I saved the working flatpak version is here.
Pls don't forget to Scan Library everytime when cozy is started
The text was updated successfully, but these errors were encountered: