IgnisDa / ryot

Roll your own tracker!
https://ryot.io
GNU General Public License v3.0
2k stars 55 forks source link

Broken ABS integration? #1049

Closed Artnal closed 1 month ago

Artnal commented 1 month ago

Hi there,

I have been wondering if something had broken a few weeks ago in the audiobookshelf integration. For some reason, even though it tells me that it keeps regularly running, no updates to the audiobooks I'm listening to seem to appear in Ryot.

At first, I thought the issue could have been a specific book, but after the fourth book in a row that does have an audible ASIN, yet does not report to Ryot, I'm starting to wonder if the issue lies somewhere else. I've also tried recreating the integration, to no avail.

Is everything still working on your end?

Cheers

IgnisDa commented 1 month ago

It seems to be working on my end. If possible, can you share credentials to your ABS instance so that I can reproduce the issue?

IgnisDa commented 1 month ago

before you do that, pls try setting env variable RUST_LOG=ryot=debug and try triggering an integration sync from the miscellaneous settings.

Artnal commented 1 month ago

Unfortunately my stuff is all local, none of it is internet facing, but here an excerpt from the log when I ran the integrations with debug:

ryot | [backend] 2024-09-30T18:53:30.601574Z DEBUG ryot: Got response for items in progress Response { library_items: [Item { id: "a9d9122c-21b4-42c4-a38c-4ceb12dd39b2", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "Eichmann in Jerusalem", id: None, asin: Some("B004VMDAHS"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "a0f584ba-7cb2-4625-8862-2b8f82ede3be", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Origins of Totalitarianism", id: None, asin: Some("B002V0QIIU"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "dd3fe009-7733-43b9-9c76-ec4e0240d08e", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "Zog", id: None, asin: Some("B00JPOMZ82"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "b5c1a859-c9d2-47bf-b245-7b4b8d66512d", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Gruffalo", id: None, asin: Some("B0036GPRXU"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "4b1807de-4e70-4382-bb2e-f2a1a90a97f2", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Way of Kings", id: None, asin: Some("B003ZWFO7E"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "6c7447a0-d3b0-4956-ba5f-c3ab25019aff", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Scarecrows' Wedding", id: None, asin: None, isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }] } ryot | [backend] 2024-09-30T18:53:30.611885Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.18305116506652225, is_finished: false, ebook_progress: Some(0) } ryot | [backend] 2024-09-30T18:53:30.622830Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.025701677459878752, is_finished: false, ebook_progress: Some(0) } ryot | [backend] 2024-09-30T18:53:30.637859Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.08955365069906945, is_finished: false, ebook_progress: None } ryot | [backend] 2024-09-30T18:53:30.648713Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.015737413800471892, is_finished: false, ebook_progress: None } ryot | [backend] 2024-09-30T18:53:30.658521Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.4220430953681629, is_finished: false, ebook_progress: None } ryot | [backend] 2024-09-30T18:53:30.658576Z DEBUG ryot: No ASIN, ISBN or iTunes ID found for item Item { ryot | [backend] id: "6c7447a0-d3b0-4956-ba5f-c3ab25019aff", ryot | [backend] name: None, ryot | [backend] media: Some( ryot | [backend] ItemMedia { ryot | [backend] metadata: ItemMetadata { ryot | [backend] title: "The Scarecrows' Wedding", ryot | [backend] id: None, ryot | [backend] asin: None, ryot | [backend] isbn: None, ryot | [backend] itunes_id: None, ryot | [backend] }, ryot | [backend] ebook_format: None, ryot | [backend] episodes: None, ryot | [backend] }, ryot | [backend] ), ryot | [backend] media_type: Some( ryot | [backend] Book, ryot | [backend] ), ryot | [backend] recent_episode: None, ryot | [backend] user_media_progress: None, ryot | [backend] } ryot | [backend] 2024-09-30T18:53:30.661181Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_Q2wZR0J0XVHj", progress: Some(8.95536506990694500), date: Some(2024-09-30), show_season_number: None, show_episode_number: None, podcast_episode_number: None, anime_episode_number: None, manga_chapter_number: None, manga_volume_number: None, change_state: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-09-30T18:53:30.665078Z DEBUG ryot: Progress update action = Update ryot | [backend] 2024-09-30T18:53:30.666167Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_5susb77rLgHg", progress: Some(1.573741380047189200), date: Some(2024-09-30), show_season_number: None, show_episode_number: None, podcast_episode_number: None, anime_episode_number: None, manga_chapter_number: None, manga_volume_number: None, change_state: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-09-30T18:53:30.670248Z DEBUG ryot: Progress update action = Update ryot | [backend] 2024-09-30T18:53:30.671103Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_Db5Q-6ymfyuQ", progress: Some(42.2043095368162900), date: Some(2024-09-30), show_season_number: None, show_episode_number: None, podcast_episode_number: None, anime_episode_number: None, manga_chapter_number: None, manga_volume_number: None, change_state: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-09-30T18:53:30.675554Z DEBUG ryot: Progress update action = Update

This runs but nothing happens on the front end, the books don't seem to update.

IgnisDa commented 1 month ago

The progress percentage says 42. Is that correct for this audiobook?

On Tue, Oct 1, 2024, 12:27 AM Artnal @.***> wrote:

Unfortunately my stuff is all local, none of it is internet facing, but here an excerpt from the log when I ran the integrations with debug:

ryot | [backend] 2024-09-30T18:53:30.601574Z DEBUG ryot: Got response for items in progress Response { library_items: [Item { id: "a9d9122c-21b4-42c4-a38c-4ceb12dd39b2", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "Eichmann in Jerusalem", id: None, asin: Some("B004VMDAHS"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "a0f584ba-7cb2-4625-8862-2b8f82ede3be", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Origins of Totalitarianism", id: None, asin: Some("B002V0QIIU"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "dd3fe009-7733-43b9-9c76-ec4e0240d08e", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "Zog", id: None, asin: Some("B00JPOMZ82"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "b5c1a859-c9d2-47bf-b245-7b4b8d66512d", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Gruffalo", id: None, asin: Some("B0036GPRXU"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "4b1807de-4e70-4382-bb2e-f2a1a90a97f2", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Way of Kings", id: None, asin: Some("B003ZWFO7E"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "6c7447a0-d3b0-4956-ba5f-c3ab25019aff", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Scarecrows' Wedding", id: None, asin: None, isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }] } ryot | [backend] 2024-09-30T18:53:30.611885Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.18305116506652225, is_finished: false, ebook_progress: Some(0) } ryot | [backend] 2024-09-30T18:53:30.622830Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.025701677459878752, is_finished: false, ebook_progress: Some(0) } ryot | [backend] 2024-09-30T18:53:30.637859Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.08955365069906945, is_finished: false, ebook_progress: None } ryot | [backend] 2024-09-30T18:53:30.648713Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.015737413800471892, is_finished: false, ebook_progress: None } ryot | [backend] 2024-09-30T18:53:30.658521Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.4220430953681629, is_finished: false, ebook_progress: None } ryot | [backend] 2024-09-30T18:53:30.658576Z DEBUG ryot: No ASIN, ISBN or iTunes ID found for item Item { ryot | [backend] id: "6c7447a0-d3b0-4956-ba5f-c3ab25019aff", ryot | [backend] name: None, ryot | [backend] media: Some( ryot | [backend] ItemMedia { ryot | [backend] metadata: ItemMetadata { ryot | [backend] title: "The Scarecrows' Wedding", ryot | [backend] id: None, ryot | [backend] asin: None, ryot | [backend] isbn: None, ryot | [backend] itunes_id: None, ryot | [backend] }, ryot | [backend] ebook_format: None, ryot | [backend] episodes: None, ryot | [backend] }, ryot | [backend] ), ryot | [backend] media_type: Some( ryot | [backend] Book, ryot | [backend] ), ryot | [backend] recent_episode: None, ryot | [backend] user_media_progress: None, ryot | [backend] } ryot | [backend] 2024-09-30T18:53:30.661181Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_Q2wZR0J0XVHj", progress: Some(8.95536506990694500), date: Some(2024-09-30), show_season_number: None, show_episode_number: None, podcast_episode_number: None, anime_episode_number: None, manga_chapter_number: None, manga_volume_number: None, change_state: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-09-30T18:53:30.665078Z DEBUG ryot: Progress update action = Update ryot | [backend] 2024-09-30T18:53:30.666167Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_5susb77rLgHg", progress: Some(1.573741380047189200), date: Some(2024-09-30), show_season_number: None, show_episode_number: None, podcast_episode_number: None, anime_episode_number: None, manga_chapter_number: None, manga_volume_number: None, change_state: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-09-30T18:53:30.670248Z DEBUG ryot: Progress update action = Update ryot | [backend] 2024-09-30T18:53:30.671103Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_Db5Q-6ymfyuQ", progress: Some(42.2043095368162900), date: Some(2024-09-30), show_season_number: None, show_episode_number: None, podcast_episode_number: None, anime_episode_number: None, manga_chapter_number: None, manga_volume_number: None, change_state: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-09-30T18:53:30.675554Z DEBUG ryot: Progress update action = Update

This runs but nothing happens on the front end, the books don't seem to update.

— Reply to this email directly, view it on GitHub https://github.com/IgnisDa/ryot/issues/1049#issuecomment-2383938003, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQ5PNDVOWGRLQP2LNL3VQ3ZZGNJPAVCNFSM6AAAAABPB7BI3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBTHEZTQMBQGM . You are receiving this because you commented.Message ID: @.***>

Artnal commented 1 month ago

In this case no, this one I stopped a while back and I don't expect it to be updating at all. The two that should be updating but do not are those at about 18% and 2.5%, respectively. They seem to be identifying as "ebook_progress: Some(0)" in the log.

IgnisDa commented 1 month ago

I think that is the log of the data that is returned by ABS, so it might be possible that your ABS instance is misbehaving. Can you take a look? Maybe update it to the latest version.

Also please force a sync from the miscellaneous settings and then attach the complete logs.

Artnal commented 1 month ago

The ABS container seems to be on the latest version (v2.13.4).

I've rebooted the VM just in case and re-ran the sync,. The ABS container logs don't show anything when I run a sync from Ryot. Is it what you where referring to?

IgnisDa commented 1 month ago

I meant the ryot container logs assuming you have the rust log env variable set to debug.

Artnal commented 1 month ago

Oh then that would be what I sent earlier. Here's the latest version, since I continued an audiobook since then:

ryot | [frontend] POST /settings/miscellaneous.data 200 - - 13.387 ms ryot | [frontend] GET /settings/miscellaneous.data 200 - - 5.301 ms ryot | [backend] 2024-10-01T09:28:22.548440Z DEBUG ryot: Got response for items in progress Response { library_items: [Item { id: "a9d9122c-21b4-42c4-a38c-4ceb12dd39b2", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "Eichmann in Jerusalem", id: None, asin: Some("B004VMDAHS"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "a0f584ba-7cb2-4625-8862-2b8f82ede3be", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Origins of Totalitarianism", id: None, asin: Some("B002V0QIIU"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "dd3fe009-7733-43b9-9c76-ec4e0240d08e", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "Zog", id: None, asin: Some("B00JPOMZ82"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "b5c1a859-c9d2-47bf-b245-7b4b8d66512d", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Gruffalo", id: None, asin: Some("B0036GPRXU"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "4b1807de-4e70-4382-bb2e-f2a1a90a97f2", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Way of Kings", id: None, asin: Some("B003ZWFO7E"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "6c7447a0-d3b0-4956-ba5f-c3ab25019aff", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Scarecrows' Wedding", id: None, asin: None, isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }] } ryot | [backend] 2024-10-01T09:28:22.558613Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.25967402792956895, is_finished: false, ebook_progress: Some(0) } ryot | [backend] 2024-10-01T09:28:22.568723Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.025701677459878752, is_finished: false, ebook_progress: Some(0) } ryot | [backend] 2024-10-01T09:28:22.578615Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.08955365069906945, is_finished: false, ebook_progress: None } ryot | [backend] 2024-10-01T09:28:22.593754Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.015737413800471892, is_finished: false, ebook_progress: None } ryot | [backend] 2024-10-01T09:28:22.607752Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.4220430953681629, is_finished: false, ebook_progress: None } ryot | [backend] 2024-10-01T09:28:22.607799Z DEBUG ryot: No ASIN, ISBN or iTunes ID found for item Item { ryot | [backend] id: "6c7447a0-d3b0-4956-ba5f-c3ab25019aff", ryot | [backend] name: None, ryot | [backend] media: Some( ryot | [backend] ItemMedia { ryot | [backend] metadata: ItemMetadata { ryot | [backend] title: "The Scarecrows' Wedding", ryot | [backend] id: None, ryot | [backend] asin: None, ryot | [backend] isbn: None, ryot | [backend] itunes_id: None, ryot | [backend] }, ryot | [backend] ebook_format: None, ryot | [backend] episodes: None, ryot | [backend] }, ryot | [backend] ), ryot | [backend] media_type: Some( ryot | [backend] Book, ryot | [backend] ), ryot | [backend] recent_episode: None, ryot | [backend] user_media_progress: None, ryot | [backend] } ryot | [backend] 2024-10-01T09:28:22.611036Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_Q2wZR0J0XVHj", progress: Some(8.95536506990694500), date: Some(2024-10-01), show_season_number: None, show_episode_number: None, podcast_episode_number: None, anime_episode_number: None, manga_chapter_number: None, manga_volume_number: None, change_state: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-10-01T09:28:22.616557Z DEBUG ryot: Progress update action = Update ryot | [backend] 2024-10-01T09:28:22.618466Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_5susb77rLgHg", progress: Some(1.573741380047189200), date: Some(2024-10-01), show_season_number: None, show_episode_number: None, podcast_episode_number: None, anime_episode_number: None, manga_chapter_number: None, manga_volume_number: None, change_state: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-10-01T09:28:22.623934Z DEBUG ryot: Progress update action = Update ryot | [backend] 2024-10-01T09:28:22.625246Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_Db5Q-6ymfyuQ", progress: Some(42.2043095368162900), date: Some(2024-10-01), show_season_number: None, show_episode_number: None, podcast_episode_number: None, anime_episode_number: None, manga_chapter_number: None, manga_volume_number: None, change_state: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-10-01T09:28:22.636039Z DEBUG ryot: Progress update action = Update

IgnisDa commented 1 month ago

What is the expected behaviour and what is happenning right now?

Artnal commented 1 month ago

The expected behaviour would be for two books (specifically Item { id: "a9d9122c-21b4-42c4-a38c-4ceb12dd39b2", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "Eichmann in Jerusalem", id: None, asin: Some("B004VMDAHS"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None } and Item { id: "a0f584ba-7cb2-4625-8862-2b8f82ede3be", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Origins of Totalitarianism", id: None, asin: Some("B002V0QIIU"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }) to: a) Appear in my audiobook collection in Ryot b) Get the tag "In progress" c) Get updates on the % progression in the book.

These three elements worked perfectly up until a few weeks ago, but now none of these happen.

IgnisDa commented 1 month ago

I will be releasing a new version soon that contains more logging. Meanwhile can you update to version v7.4 which contains a few changes to the caching mechanism?

Artnal commented 1 month ago

Thanks, I've been running version 7.4 since it was released (ryot is included in my daily Watchtower updates). I believe the log I provided two days ago is already on 7.4.

IgnisDa commented 1 month ago

Please upgrade to v7.5.0 when it is released this weekend and paste the logs here. It has logging about when a progress update is rejected.

IgnisDa commented 1 month ago

@Artnal Released 7.5.0. Please paste the logs here when you trigger a sync from the miscellaneous settings.

Artnal commented 1 month ago

Thank you! Here it is:

ryot | [frontend] POST /settings/miscellaneous.data 200 - - 16.687 ms ryot | [frontend] GET /settings/miscellaneous.data 200 - - 24.666 ms ryot | [backend] 2024-10-06T17:00:18.196726Z DEBUG ryot: Got response for items in progress Response { library_items: [Item { id: "a9d9122c-21b4-42c4-a38c-4ceb12dd39b2", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "Eichmann in Jerusalem", id: None, asin: Some("B004VMDAHS"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "a0f584ba-7cb2-4625-8862-2b8f82ede3be", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Origins of Totalitarianism", id: None, asin: Some("B002V0QIIU"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "dd3fe009-7733-43b9-9c76-ec4e0240d08e", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "Zog", id: None, asin: Some("B00JPOMZ82"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "b5c1a859-c9d2-47bf-b245-7b4b8d66512d", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Gruffalo", id: None, asin: Some("B0036GPRXU"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "4b1807de-4e70-4382-bb2e-f2a1a90a97f2", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Way of Kings", id: None, asin: Some("B003ZWFO7E"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "6c7447a0-d3b0-4956-ba5f-c3ab25019aff", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Scarecrows' Wedding", id: None, asin: None, isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }] } ryot | [backend] 2024-10-06T17:00:18.208125Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.8361299216980816, is_finished: false, ebook_progress: Some(0) } ryot | [backend] 2024-10-06T17:00:18.218065Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.025701677459878752, is_finished: false, ebook_progress: Some(0) } ryot | [backend] 2024-10-06T17:00:18.227693Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.08955365069906945, is_finished: false, ebook_progress: None } ryot | [backend] 2024-10-06T17:00:18.238376Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.015737413800471892, is_finished: false, ebook_progress: None } ryot | [backend] 2024-10-06T17:00:18.248741Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.4220430953681629, is_finished: false, ebook_progress: None } ryot | [backend] 2024-10-06T17:00:18.248797Z DEBUG ryot: No ASIN, ISBN or iTunes ID found for item Item { id: "6c7447a0-d3b0-4956-ba5f-c3ab25019aff", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Scarecrows' Wedding", id: None, asin: None, isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None } ryot | [backend] 2024-10-06T17:00:18.254104Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_Q2wZR0J0XVHj", date: Some(2024-10-06), progress: Some(8.95536506990694500), change_state: None, show_season_number: None, show_episode_number: None, manga_volume_number: None, anime_episode_number: None, podcast_episode_number: None, manga_chapter_number: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-10-06T17:00:18.259214Z DEBUG ryot: Progress update action = Update ryot | [backend] 2024-10-06T17:00:18.259532Z DEBUG ryot: No progress update required ryot | [backend] 2024-10-06T17:00:18.262475Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_5susb77rLgHg", date: Some(2024-10-06), progress: Some(1.573741380047189200), change_state: None, show_season_number: None, show_episode_number: None, manga_volume_number: None, anime_episode_number: None, podcast_episode_number: None, manga_chapter_number: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-10-06T17:00:18.268138Z DEBUG ryot: Progress update action = Update ryot | [backend] 2024-10-06T17:00:18.269052Z DEBUG ryot: No progress update required ryot | [backend] 2024-10-06T17:00:18.271254Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_Db5Q-6ymfyuQ", date: Some(2024-10-06), progress: Some(42.2043095368162900), change_state: None, show_season_number: None, show_episode_number: None, manga_volume_number: None, anime_episode_number: None, podcast_episode_number: None, manga_chapter_number: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-10-06T17:00:18.278201Z DEBUG ryot: Progress update action = Update ryot | [backend] 2024-10-06T17:00:18.279134Z DEBUG ryot: No progress update required

IgnisDa commented 1 month ago

No progress update required

This happens when the progress is already updated (https://github.com/IgnisDa/ryot/blob/8a2297a500a4bb77f79872d2cba8dbcd7d851967/crates/services/miscellaneous/src/lib.rs#L1203).

Are you sure the updates are not working? Can you attach a screenshot of history tab of https://ryot-your-instance.com/media/item/met_Db5Q-6ymfyuQ?

Artnal commented 1 month ago

image

Here it is. But this one is not a book for which I am expecting updates. I started and stopped it months ago, so it should remain at this percentage, there is no issue.

The issue is specifically with the first two books here, that is "Eichmann in Jerusalem" and "The Origins of Totalitarianism". But your points makes me notice that there is no "met_...." reference in the log for these two books. It might tie into the fact that they did not appear in "My Audio Books" in Ryot when I started playing them (contrary to how it worked before this issue started).

IgnisDa commented 1 month ago

What is the progress of these 2 audiobooks in ABS?

Artnal commented 1 month ago

Here the latest log:

ryot | [frontend] POST /settings/miscellaneous.data 200 - - 15.787 ms ryot | [frontend] GET /settings/miscellaneous.data 200 - - 7.435 ms ryot | [backend] 2024-10-07T17:34:44.837641Z DEBUG ryot: Got response for items in progress Response { library_items: [Item { id: "a9d9122c-21b4-42c4-a38c-4ceb12dd39b2", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "Eichmann in Jerusalem", id: None, asin: Some("B004VMDAHS"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "a0f584ba-7cb2-4625-8862-2b8f82ede3be", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Origins of Totalitarianism", id: None, asin: Some("B002V0QIIU"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "dd3fe009-7733-43b9-9c76-ec4e0240d08e", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "Zog", id: None, asin: Some("B00JPOMZ82"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "b5c1a859-c9d2-47bf-b245-7b4b8d66512d", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Gruffalo", id: None, asin: Some("B0036GPRXU"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "4b1807de-4e70-4382-bb2e-f2a1a90a97f2", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Way of Kings", id: None, asin: Some("B003ZWFO7E"), isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }, Item { id: "6c7447a0-d3b0-4956-ba5f-c3ab25019aff", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Scarecrows' Wedding", id: None, asin: None, isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None }] } ryot | [backend] 2024-10-07T17:34:44.847197Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.9806321100365096, is_finished: false, ebook_progress: Some(0) } ryot | [backend] 2024-10-07T17:34:44.855398Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.025701677459878752, is_finished: false, ebook_progress: Some(0) } ryot | [backend] 2024-10-07T17:34:44.864588Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.08955365069906945, is_finished: false, ebook_progress: None } ryot | [backend] 2024-10-07T17:34:44.874235Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.015737413800471892, is_finished: false, ebook_progress: None } ryot | [backend] 2024-10-07T17:34:44.883653Z DEBUG ryot: Got response for individual item progress ItemProgress { progress: 0.4220430953681629, is_finished: false, ebook_progress: None } ryot | [backend] 2024-10-07T17:34:44.883707Z DEBUG ryot: No ASIN, ISBN or iTunes ID found for item Item { id: "6c7447a0-d3b0-4956-ba5f-c3ab25019aff", name: None, media: Some(ItemMedia { metadata: ItemMetadata { title: "The Scarecrows' Wedding", id: None, asin: None, isbn: None, itunes_id: None }, ebook_format: None, episodes: None }), media_type: Some(Book), recent_episode: None, user_media_progress: None } ryot | [backend] 2024-10-07T17:34:44.886666Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_Q2wZR0J0XVHj", date: Some(2024-10-07), progress: Some(8.95536506990694500), change_state: None, show_season_number: None, show_episode_number: None, manga_volume_number: None, anime_episode_number: None, podcast_episode_number: None, manga_chapter_number: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-10-07T17:34:44.891874Z DEBUG ryot: Progress update action = Update ryot | [backend] 2024-10-07T17:34:44.891922Z DEBUG ryot: No progress update required ryot | [backend] 2024-10-07T17:34:44.894442Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_5susb77rLgHg", date: Some(2024-10-07), progress: Some(1.573741380047189200), change_state: None, show_season_number: None, show_episode_number: None, manga_volume_number: None, anime_episode_number: None, podcast_episode_number: None, manga_chapter_number: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-10-07T17:34:44.900593Z DEBUG ryot: Progress update action = Update ryot | [backend] 2024-10-07T17:34:44.900645Z DEBUG ryot: No progress update required ryot | [backend] 2024-10-07T17:34:44.904070Z DEBUG ryot: Input for progress_update = ProgressUpdateInput { metadata_id: "met_Db5Q-6ymfyuQ", date: Some(2024-10-07), progress: Some(42.2043095368162900), change_state: None, show_season_number: None, show_episode_number: None, manga_volume_number: None, anime_episode_number: None, podcast_episode_number: None, manga_chapter_number: None, provider_watched_on: Some("Audiobookshelf") } ryot | [backend] 2024-10-07T17:34:44.911481Z DEBUG ryot: Progress update action = Update ryot | [backend] 2024-10-07T17:34:44.911538Z DEBUG ryot: No progress update required

Progress in ABS is 98% for Eichmann in Jerusalem and 3% for The Origins of Totalitarianism (which appears to match (with rounding) what is reported in the Ryot log.

IgnisDa commented 1 month ago

Can you share your docker compose? Make sure you redact secrets/

IgnisDa commented 1 month ago

Also run this SQL: select * from integration. Make sure you redact the credentials.

Artnal commented 1 month ago

Here is the docker-compose:

services:
  ryot-db:
    image: postgres:16-alpine
    restart: unless-stopped
    volumes:
      - ./volumes/postgres_storage:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=[redacted]
      - POSTGRES_USER=[redacted]
      - POSTGRES_DB=[redacted]
    container_name: ryot-db
  ryot:
    image: ghcr.io/ignisda/ryot:latest
    environment:
      - DATABASE_URL=[redacted]
      - FRONTEND_INSECURE_COOKIES=true # if running on HTTP
      - TZ=Europe/Berlin
      - DISABLE_TELEMETRY=true # Whether to disable telemetry.
      - SERVER_PROGRESS_UPDATE_THRESHOLD=24 # The hours in which a media can be marked as seen again for a user. This is used so that the same media can not be used marked as started when >
      - MEDIA_MONITORING_REMOVE_AFTER_DAYS=1000
      - RUST_LOG=ryot=debug
    ports:
      - [Port]:8000
    pull_policy: always
    container_name: ryot
    restart: unless-stopped

Could you detail the SQL aspect, I'm not exactly sure where I should run it. I ran it inside the postgresql db in bash, but since nothing happened I'm guessing that wasn't it.

IgnisDa commented 1 month ago

You can run the SQL using docker exec -u postgres -it ryot-db psql and then pasting the sql i sent above.

In your docker compose, you can get rid of FRONTEND_INSECURE_COOKIES. It is no longer used.

Artnal commented 1 month ago

Thanks for the heads up on FRONTEND_INSECURE_COOKIES, I removed it.

On the sql command, I ran it as you suggested, with the same result as when I tried yesterday, that is: no output.

postgres=# select * from integration
postgres-# 
IgnisDa commented 1 month ago

Please add a semicolon at the end

Artnal commented 1 month ago

Gotcha, there it is:

        id        | lot  |    provider    |          created_on           |       last_triggered_on       |                                                                                                                                 provider_specifics                                                                                                                                 |     user_id      | minimum_progress | maximum_progress | is_disabled | sync_to_owned_collection
------------------+------+----------------+-------------------------------+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+------------------+------------------+-------------+--------------------------
 int_QVqMRWfRtDHC | sink | jellyfin       | 2024-06-26 06:54:15.537684+00 | 2024-10-07 20:31:06.590321+00 |                                                                                                                                                                                                                                                                                    | usr_[1] |                5 |               90 |             |
 int_-PxeIVa0HtDB | yank | audiobookshelf | 2024-06-26 06:56:26.136755+00 | 2024-10-08 06:35:00.175895+00 | {"audiobookshelf_token": "[redacted]", "audiobookshelf_base_url": "http://[redacted]"}   | usr_[2] |                1 |               99 |             |
 int_t9DMJvmLTRKG | yank | audiobookshelf | 2024-08-09 10:00:14.027879+00 | 2024-10-08 06:35:00.252403+00 | {"audiobookshelf_token": "[redacted]", "audiobookshelf_base_url": "http://[redacted]"} | usr_[1] |                1 |               99 |             |
 int_uwm2NvZRmS3c | sink | jellyfin       | 2024-06-26 06:50:56.085569+00 | 2024-10-07 19:21:35.384055+00 |                                                                                                                                                                                                                                                                                    | usr_[2] |                5 |               90 |             |
 int_S2RQBf52U9KF | sink | jellyfin       | 2024-06-26 06:54:34.195509+00 | 2024-10-07 19:21:35.401164+00 |                                                                                                                                                                                                                                                                                    | usr_[1] |                5 |               90 |             |
 int_p1qe6wv7QB7A | sink | jellyfin       | 2024-06-26 06:51:21.837675+00 | 2024-10-03 10:51:41.281299+00 |                                                                                                                                                                                                                                                                                    | usr_[2] |                5 |               90 |             |
(6 rows)
IgnisDa commented 1 month ago

Ah so this is a configuration mistake. As you can see, you have set the minimum_progress to 1 and maximum_progress to 90. Anything outside these ranges will not be synced. Please edit your integration for your usecase.

This is done because some movies, audiobooks etc end before 100% and users don't always complete 100%.

Closing since everything is working as expected.

Artnal commented 1 month ago

I'm not sure I follow. This was on purpose because I wanted a different setting for audiobooks specifically, that is: as soon as I reach 1% in the audiobook, it considers it started and syncs it to Ryot, and waits until 99% listened to consider it as finished in Ryot. The standard 5/90 from videos was too restrictive, because at 90% I might still be more than an hour away from the end of the audiobook. So I am not sure how this impacts the fact that it is not syncing to Ryot at all. Am I missing something?

IgnisDa commented 1 month ago

You are right. Can you join the discord? I will need to debug this on my end.

IgnisDa commented 1 month ago

Closing since this is proving impossible to debug. Feel free to ping me here with updates.