[Bug]: Remove Continue Listening #1297

Closed
opened 2026-04-24 23:38:48 +02:00 by adam · 31 comments
Owner

Originally created by @patrickrobbins on GitHub (Aug 1, 2023).

Describe the issue

on the web app, click 'Remove from Continue Listening' , it will go away, but comes back on next reload.

Steps to reproduce the issue

  1. on the web app, click 'Remove from Continue Listening' , it will go away, but comes back on next reload.

Audiobookshelf version

2.3.3

How are you running audiobookshelf?

Docker

Originally created by @patrickrobbins on GitHub (Aug 1, 2023). ### Describe the issue on the web app, click 'Remove from Continue Listening' , it will go away, but comes back on next reload. ### Steps to reproduce the issue 1. on the web app, click 'Remove from Continue Listening' , it will go away, but comes back on next reload. ### Audiobookshelf version 2.3.3 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:38:48 +02:00
adam closed this issue 2026-04-24 23:38:48 +02:00
Author
Owner

@patrickrobbins commented on GitHub (Aug 1, 2023):

I see that if I remove the media progress altogether, it seems to be resolved. is the 'remove from continue listening' expected to persist?

@patrickrobbins commented on GitHub (Aug 1, 2023): I see that if I remove the media progress altogether, it seems to be resolved. is the 'remove from continue listening' expected to persist?
Author
Owner

@patrickrobbins commented on GitHub (Aug 1, 2023):

I'm still learning this codebase, but maybe in :
static getFromOld(oldUser). seems to map the series remove from continue listening, but not the single book.

@patrickrobbins commented on GitHub (Aug 1, 2023): I'm still learning this codebase, but maybe in : static getFromOld(oldUser). seems to map the series remove from continue listening, but not the single book.
Author
Owner

@jrhedman commented on GitHub (Aug 24, 2023):

I am noticing a similar issue with podcasts.

When I try using "Remove from Continue Listening" it ends up re-populating after some point.

I haven't looked at the code for this but I'm assuming it's probably using the same code under the hood.

@jrhedman commented on GitHub (Aug 24, 2023): I am noticing a similar issue with podcasts. When I try using "Remove from Continue Listening" it ends up re-populating after some point. I haven't looked at the code for this but I'm assuming it's probably using the same code under the hood.
Author
Owner

@advplyr commented on GitHub (Sep 17, 2023):

Is this still happening on the latest server release v2.4.2? I fixed some things around that.

@advplyr commented on GitHub (Sep 17, 2023): Is this still happening on the latest server release v2.4.2? I fixed some things around that.
Author
Owner

@jrhedman commented on GitHub (Sep 17, 2023):

Is this still happening on the latest server release v2.4.2? I fixed some things around that.

Unfortunately I can't test this right now due to the OOM error #2075. Maybe @patrickrobbins would be able to confirm?

@jrhedman commented on GitHub (Sep 17, 2023): > Is this still happening on the latest server release v2.4.2? I fixed some things around that. Unfortunately I can't test this right now due to the OOM error #2075. Maybe @patrickrobbins would be able to confirm?
Author
Owner

@c-hri-s commented on GitHub (Oct 26, 2023):

I'm still seeing this on v2.4.4

I have a couple of books which show up in 'Continue Listening' which I've finished. I can't remove them.
If I select 'Remove from Continue Listening', nothing seems to happen.

The only way I found to remove them is to reset my progress and then remove them. Then it seems to work.

@c-hri-s commented on GitHub (Oct 26, 2023): I'm still seeing this on v2.4.4 I have a couple of books which show up in 'Continue Listening' which I've finished. I can't remove them. If I select 'Remove from Continue Listening', nothing seems to happen. The only way I found to remove them is to reset my progress and then remove them. Then it seems to work.
Author
Owner

@nichwall commented on GitHub (Oct 26, 2023):

I'm still seeing this on v2.4.4

I have a couple of books which show up in 'Continue Listening' which I've finished. I can't remove them.
If I select 'Remove from Continue Listening', nothing seems to happen.

The only way I found to remove them is to reset my progress and then remove them. Then it seems to work.

Did you have any of the books which could not be marked as finished downloaded to your iOS device?

@nichwall commented on GitHub (Oct 26, 2023): > I'm still seeing this on v2.4.4 > > I have a couple of books which show up in 'Continue Listening' which I've finished. I can't remove them. > If I select 'Remove from Continue Listening', nothing seems to happen. > > The only way I found to remove them is to reset my progress and then remove them. Then it seems to work. Did you have any of the books which could not be marked as finished downloaded to your iOS device?
Author
Owner

@c-hri-s commented on GitHub (Oct 26, 2023):

They are marked as finished, but cannot be removed from the 'continue listening' shelf. Yes, both of them were downloaded to an iOS device, although the versions on the mobile device somehow disconnected from the server versions (there was an error in the log indicating this).

@c-hri-s commented on GitHub (Oct 26, 2023): They are marked as finished, but cannot be removed from the 'continue listening' shelf. Yes, both of them were downloaded to an iOS device, although the versions on the mobile device somehow disconnected from the server versions (there was an error in the log indicating this).
Author
Owner

@advplyr commented on GitHub (Oct 26, 2023):

@c-hri-s You may not be on the latest mobile app release

@advplyr commented on GitHub (Oct 26, 2023): @c-hri-s You may not be on the latest mobile app release
Author
Owner

@c-hri-s commented on GitHub (Oct 26, 2023):

I'm on 0.9.66 (23) which seems to be the latest. I've had them downloaded for a while so it's possible some earlier version caused some issues. I've deleted them from the phone, but they still can't be removed from the continue listening shelf.

@c-hri-s commented on GitHub (Oct 26, 2023): I'm on 0.9.66 (23) which seems to be the latest. I've had them downloaded for a while so it's possible some earlier version caused some issues. I've deleted them from the phone, but they still can't be removed from the continue listening shelf.
Author
Owner

@jrhedman commented on GitHub (Oct 27, 2023):

@c-hri-s, Are you seeing these books listed in the continue listening shelf both on the web app and on the phone app?

Have you tried marking them as finished on both?

@jrhedman commented on GitHub (Oct 27, 2023): @c-hri-s, Are you seeing these books listed in the continue listening shelf both on the web app and on the phone app? Have you tried marking them as finished on both?
Author
Owner

@c-hri-s commented on GitHub (Oct 27, 2023):

They're both marked as completed and show with a green line under them.

I'm not sure how to mark as completed on the iOS app, it doesn't come up as an option, just 'discard progress', 'add to playlist', 'open rss feed' and 'more info'

@c-hri-s commented on GitHub (Oct 27, 2023): They're both marked as completed and show with a green line under them. I'm not sure how to mark as completed on the iOS app, it doesn't come up as an option, just 'discard progress', 'add to playlist', 'open rss feed' and 'more info'
Author
Owner

@jrhedman commented on GitHub (Oct 27, 2023):

You should see an option to mark the book as complete under the kebab menu (three dots, next to the play/stream button).

This is a screenshot of a book I have currently downloaded and it's options:

IMG_1515

The books under the "Listen Again" Shelf have only the options that you've mentioned.

Yes, both of them were downloaded to an iOS device, although the versions on the mobile device somehow disconnected from the server versions (there was an error in the log indicating this).

Can you share this error? I'm wondering if it has something to do with the de-sync between the server and local versions.

@jrhedman commented on GitHub (Oct 27, 2023): You should see an option to mark the book as complete under the kebab menu (three dots, next to the play/stream button). This is a screenshot of a book I have currently downloaded and it's options: ![IMG_1515](https://github.com/advplyr/audiobookshelf/assets/17502896/f2e108fe-380c-4b0f-b1e4-aec65a5f764c) The books under the "Listen Again" Shelf have only the options that you've mentioned. > Yes, both of them were downloaded to an iOS device, although the versions on the mobile device somehow disconnected from the server versions (there was an error in the log indicating this). Can you share this error? I'm wondering if it has something to do with the de-sync between the server and local versions.
Author
Owner

@jrhedman commented on GitHub (Oct 27, 2023):

I have a couple of books which show up in 'Continue Listening' which I've finished. I can't remove them.
If I select 'Remove from Continue Listening', nothing seems to happen.

If you are willing to run a few SQL commands on your database (absdatabase.sqlite), can you also check if the books in question are listed in the output?

SELECT mediaProgresses.mediaItemId, books.title, mediaProgresses.isFinished, mediaProgresses.hideFromContinueListening, mediaProgresses.finishedAt FROM mediaProgresses JOIN books ON mediaProgresses.mediaItemId==books.id WHERE mediaItemType=='book' AND mediaProgresses.hideFromContinueListening=='1';

@jrhedman commented on GitHub (Oct 27, 2023): > I have a couple of books which show up in 'Continue Listening' which I've finished. I can't remove them. > If I select 'Remove from Continue Listening', nothing seems to happen. If you are willing to run a few SQL commands on your database (absdatabase.sqlite), can you also check if the books in question are listed in the output? `SELECT mediaProgresses.mediaItemId, books.title, mediaProgresses.isFinished, mediaProgresses.hideFromContinueListening, mediaProgresses.finishedAt FROM mediaProgresses JOIN books ON mediaProgresses.mediaItemId==books.id WHERE mediaItemType=='book' AND mediaProgresses.hideFromContinueListening=='1';`
Author
Owner

@c-hri-s commented on GitHub (Oct 27, 2023):

I don't get the option to mark it as finished, perhaps because it's already marked as such?

IMG_1815

Neither of the two books which refuse to vanish are shown in the SQL output:

sqlite> .open /mnt/public/absdatabase.sqlite

sqlite> SELECT mediaProgresses.mediaItemId, books.title, mediaProgresses.isFinished, mediaProgresses.hideFromContinueListening, mediaProgresses.finishedAt FROM mediaProgresses JOIN books ON mediaProgresses.mediaItemId==books.id WHERE mediaItemType=='book' AND mediaProgresses.hideFromContinueListening=='1';

6ea893dd-7248-4cfe-a916-1036eeeb633d|Me and the Table|0|1|
74d2c252-47da-498d-a28b-a64fceee975f|The True Story of the Most Spectacular Bank Robbery in American History|0|1|
4e1d24cd-7111-473e-9eca-81bafd2f9601|Station Breaker|0|1|
484eaf1d-8d3a-4979-a0a5-c256918f01ee|The Hitchhikers Guide to the Galaxy Fit The Sixth|0|1|
d527eac7-3666-4fee-8172-caf3e97b249f|Spare|0|1|
cdcf38c3-91c4-4d52-b84c-0504907aaa7b|The Disappearing Act The Impossible Case of MH370|0|1|
bbbe12ae-e97a-46f2-bc8b-b9e856aee535|Zero Cool|0|1|
48f81839-f1e7-4c1d-ab09-c92318488d1a|The Bullet That Missed|1|1|2023-10-26 07:53:21.570 +00:00
c226ec21-2764-4a53-9a99-43dd07fc23b6|Reflections|0|1|

sqlite> 
@c-hri-s commented on GitHub (Oct 27, 2023): I don't get the option to mark it as finished, perhaps because it's already marked as such? ![IMG_1815](https://github.com/advplyr/audiobookshelf/assets/13216128/a983de8e-d935-473f-8fb4-a5c2bdace5c4) Neither of the two books which refuse to vanish are shown in the SQL output: ``` sqlite> .open /mnt/public/absdatabase.sqlite sqlite> SELECT mediaProgresses.mediaItemId, books.title, mediaProgresses.isFinished, mediaProgresses.hideFromContinueListening, mediaProgresses.finishedAt FROM mediaProgresses JOIN books ON mediaProgresses.mediaItemId==books.id WHERE mediaItemType=='book' AND mediaProgresses.hideFromContinueListening=='1'; 6ea893dd-7248-4cfe-a916-1036eeeb633d|Me and the Table|0|1| 74d2c252-47da-498d-a28b-a64fceee975f|The True Story of the Most Spectacular Bank Robbery in American History|0|1| 4e1d24cd-7111-473e-9eca-81bafd2f9601|Station Breaker|0|1| 484eaf1d-8d3a-4979-a0a5-c256918f01ee|The Hitchhikers Guide to the Galaxy Fit The Sixth|0|1| d527eac7-3666-4fee-8172-caf3e97b249f|Spare|0|1| cdcf38c3-91c4-4d52-b84c-0504907aaa7b|The Disappearing Act The Impossible Case of MH370|0|1| bbbe12ae-e97a-46f2-bc8b-b9e856aee535|Zero Cool|0|1| 48f81839-f1e7-4c1d-ab09-c92318488d1a|The Bullet That Missed|1|1|2023-10-26 07:53:21.570 +00:00 c226ec21-2764-4a53-9a99-43dd07fc23b6|Reflections|0|1| sqlite> ```
Author
Owner

@jrhedman commented on GitHub (Oct 28, 2023):

I don't get the option to mark it as finished, perhaps because it's already marked as such?

Thanks for sharing the screenshots, I'm thinking the same thing, but then of course, the question is why is it still showing under continue listening shelf.

Do you think you can run this sql as well?

SELECT mediaProgresses.mediaItemId, mediaProgresses.Id, books.title, mediaProgresses.isFinished, mediaProgresses.hideFromContinueListening, mediaProgresses.finishedAt FROM mediaProgresses JOIN books ON mediaProgresses.mediaItemId==books.id WHERE mediaItemType=='book' AND mediaProgresses.isFinished=='1' ORDER BY books.title ASC;

We should at least see the books listed in here and we should be able to see the values for both the local and server records. Hopefully we can see if de-sync has anything to do with it.

I haven't dug into the code for this yet, but want to check current db values first and work backwards from there.

Edit:

They are marked as finished, but cannot be removed from the 'continue listening' shelf. Yes, both of them were downloaded to an iOS device, although the versions on the mobile device somehow disconnected from the server versions (there was an error in the log indicating this).

Can you also share this error from the log? And did you see any other error about Adding/Removing from the continue listening?

@jrhedman commented on GitHub (Oct 28, 2023): > I don't get the option to mark it as finished, perhaps because it's already marked as such? Thanks for sharing the screenshots, I'm thinking the same thing, but then of course, the question is why is it still showing under continue listening shelf. Do you think you can run this sql as well? `SELECT mediaProgresses.mediaItemId, mediaProgresses.Id, books.title, mediaProgresses.isFinished, mediaProgresses.hideFromContinueListening, mediaProgresses.finishedAt FROM mediaProgresses JOIN books ON mediaProgresses.mediaItemId==books.id WHERE mediaItemType=='book' AND mediaProgresses.isFinished=='1' ORDER BY books.title ASC;` We should at least see the books listed in here and we should be able to see the values for both the local and server records. Hopefully we can see if de-sync has anything to do with it. I haven't dug into the code for this yet, but want to check current db values first and work backwards from there. **Edit:** > They are marked as finished, but cannot be removed from the 'continue listening' shelf. Yes, both of them were downloaded to an iOS device, although the versions on the mobile device somehow disconnected from the server versions (there was an error in the log indicating this). Can you also share this error from the log? And did you see any other error about Adding/Removing from the continue listening?
Author
Owner

@c-hri-s commented on GitHub (Oct 28, 2023):

Here's the result of the query (it returned a bunch of books obviously, but these are the two that are 'stuck'):

sqlite> .open /mnt/public/absdatabase.sqlite

sqlite> SELECT mediaProgresses.mediaItemId, mediaProgresses.Id, books.title, mediaProgresses.isFinished, mediaProgresses.hideFromContinueListening, mediaProgresses.finishedAt FROM mediaProgresses JOIN books ON mediaProgresses.mediaItemId==books.id WHERE mediaItemType=='book' AND mediaProgresses.isFinished=='1' ORDER BY books.title ASC;

48f81839-f1e7-4c1d-ab09-c92318488d1a|9575c0be-45a9-4619-921d-f234837e19ec|The Bullet That Missed|1|1|2023-10-26 07:53:21.570 +00:00
79c720bb-64ef-4f25-b295-83209c182b37|1662046d-639d-420e-a515-84696c1bc5f2|Troubled Blood|1|0|2023-10-27 14:45:48.654 +00:00

Here's the part of the logs where I was playing my downloaded copy of the book and it had somehow become disassociated with the server copy. I've since deleted it from the phone.

{"timestamp":"2023-10-24 11:26:58","source":"Logger.js:126","message":"[MeController] syncLocalMediaProgress invalid local media progress object no library item with id \"li_t4ytoqm1lqt470p1nd\" [object Object]","levelName":"ERROR","level":4}
{"timestamp":"2023-10-24 11:26:58","source":"Logger.js:126","message":"[MeController] syncLocalMediaProgress invalid local media progress object no library item with id \"li_bojjdudiullwiiahoa\" [object Object]","levelName":"ERROR","level":4}
{"timestamp":"2023-10-24 11:26:59","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_773D1826-2867-4EE9-875E-F6FC41F8C48B)","levelName":"ERROR","level":4}
{"timestamp":"2023-10-24 11:26:59","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4}
{"timestamp":"2023-10-24 11:27:03","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4}
{"timestamp":"2023-10-24 11:27:26","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4}
{"timestamp":"2023-10-24 11:27:33","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4}
{"timestamp":"2023-10-24 11:29:54","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4}
{"timestamp":"2023-10-24 11:30:17","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4}
{"timestamp":"2023-10-24 11:30:41","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4}
{"timestamp":"2023-10-24 11:30:52","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4}
{"timestamp":"2023-10-24 11:31:22","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4}

@c-hri-s commented on GitHub (Oct 28, 2023): Here's the result of the query (it returned a bunch of books obviously, but these are the two that are 'stuck'): ``` sqlite> .open /mnt/public/absdatabase.sqlite sqlite> SELECT mediaProgresses.mediaItemId, mediaProgresses.Id, books.title, mediaProgresses.isFinished, mediaProgresses.hideFromContinueListening, mediaProgresses.finishedAt FROM mediaProgresses JOIN books ON mediaProgresses.mediaItemId==books.id WHERE mediaItemType=='book' AND mediaProgresses.isFinished=='1' ORDER BY books.title ASC; 48f81839-f1e7-4c1d-ab09-c92318488d1a|9575c0be-45a9-4619-921d-f234837e19ec|The Bullet That Missed|1|1|2023-10-26 07:53:21.570 +00:00 79c720bb-64ef-4f25-b295-83209c182b37|1662046d-639d-420e-a515-84696c1bc5f2|Troubled Blood|1|0|2023-10-27 14:45:48.654 +00:00 ``` Here's the part of the logs where I was playing my downloaded copy of the book and it had somehow become disassociated with the server copy. I've since deleted it from the phone. ``` {"timestamp":"2023-10-24 11:26:58","source":"Logger.js:126","message":"[MeController] syncLocalMediaProgress invalid local media progress object no library item with id \"li_t4ytoqm1lqt470p1nd\" [object Object]","levelName":"ERROR","level":4} {"timestamp":"2023-10-24 11:26:58","source":"Logger.js:126","message":"[MeController] syncLocalMediaProgress invalid local media progress object no library item with id \"li_bojjdudiullwiiahoa\" [object Object]","levelName":"ERROR","level":4} {"timestamp":"2023-10-24 11:26:59","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_773D1826-2867-4EE9-875E-F6FC41F8C48B)","levelName":"ERROR","level":4} {"timestamp":"2023-10-24 11:26:59","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4} {"timestamp":"2023-10-24 11:27:03","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4} {"timestamp":"2023-10-24 11:27:26","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4} {"timestamp":"2023-10-24 11:27:33","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4} {"timestamp":"2023-10-24 11:29:54","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4} {"timestamp":"2023-10-24 11:30:17","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4} {"timestamp":"2023-10-24 11:30:41","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4} {"timestamp":"2023-10-24 11:30:52","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4} {"timestamp":"2023-10-24 11:31:22","source":"Logger.js:126","message":"[PlaybackSessionManager] syncLocalSession: Media item not found for session \"Troubled Blood\" (play_local_C99BCF4F-DFFC-409F-B930-6CC1F9B4BE26)","levelName":"ERROR","level":4} ```
Author
Owner

@jrhedman commented on GitHub (Oct 28, 2023):

Okay so they're both showing that they are marked as finished and have finished at dates so it seems within the database it is correct.

I think we need to look into what Audiobookshelf uses to populate the Continue Listening shelf with. I know @advplyr mentioned some some change in v2.4.2 but I'm not seeing what change he made on this (unless I'm missing it).

Have you tried restarting the server since you had this problem? I'm wondering if there's some caching going on where instead of pulling from the DB, it's pulling from elsewhere.

I don't have much time to check on it today unfortunately.

@jrhedman commented on GitHub (Oct 28, 2023): Okay so they're both showing that they are marked as finished and have finished at dates so it seems within the database it is correct. I think we need to look into what Audiobookshelf uses to populate the Continue Listening shelf with. I know @advplyr mentioned some some change in v2.4.2 but I'm not seeing what change he made on this (unless I'm missing it). Have you tried restarting the server since you had this problem? I'm wondering if there's some caching going on where instead of pulling from the DB, it's pulling from elsewhere. I don't have much time to check on it today unfortunately.
Author
Owner

@c-hri-s commented on GitHub (Oct 28, 2023):

No rush, it's not a real problem .. just an annoyance that they're sort of stuck there.

I think it's possible if I reset the listening history and then tried to remove them they might vanish (worked for another), but I'm happy to leave them there for a while if it helps to squash the bug.

Tried a server restart and they're still showing in the Continue Listening shelf

@c-hri-s commented on GitHub (Oct 28, 2023): No rush, it's not a real problem .. just an annoyance that they're sort of stuck there. I think it's possible if I reset the listening history and then tried to remove them they might vanish (worked for another), but I'm happy to leave them there for a while if it helps to squash the bug. Tried a server restart and they're still showing in the Continue Listening shelf
Author
Owner

@advplyr commented on GitHub (Oct 28, 2023):

I'm not sure what is going on here but if the book gets unlinked from the server then it needs to be removed and downloaded again. I am aware of an iOS bug that resets your progress when you download.

Books can be unlinked from the server if the book had to be scanned in as new again.

Also, the server URL you are using must be the same one you downloaded from. For example, if you download on a local ip address http://192.168.1.1 then you start using a domain https://abs.domain.com it won't sync. I don't think that is your issue though. Your issue is the ID of the book you downloaded no longer matches an ID of a book on the server.

There is a bug here somewhere from what you are describing but I'm not sure where to look.

@advplyr commented on GitHub (Oct 28, 2023): I'm not sure what is going on here but if the book gets unlinked from the server then it needs to be removed and downloaded again. I am aware of an iOS bug that resets your progress when you download. Books can be unlinked from the server if the book had to be scanned in as new again. Also, the server URL you are using must be the same one you downloaded from. For example, if you download on a local ip address http://192.168.1.1 then you start using a domain https://abs.domain.com it won't sync. I don't think that is your issue though. Your issue is the ID of the book you downloaded no longer matches an ID of a book on the server. There is a bug here somewhere from what you are describing but I'm not sure where to look.
Author
Owner

@advplyr commented on GitHub (Oct 28, 2023):

Just looking at your log again and the book was downloaded on server v2.2.23 or below. I can tell by looking at the ID
{"timestamp":"2023-10-24 11:26:58","source":"Logger.js:126","message":"[MeController] syncLocalMediaProgress invalid local media progress object no library item with id \"li_t4ytoqm1lqt470p1nd\" [object Object]","levelName":"ERROR","level":4}

We use UUIDv4 now and your ID is starting with li_. I recommend you remove the books you downloaded on v2.2.23 and download again. Those old IDs are going to cause issues.

@advplyr commented on GitHub (Oct 28, 2023): Just looking at your log again and the book was downloaded on server v2.2.23 or below. I can tell by looking at the ID ```{"timestamp":"2023-10-24 11:26:58","source":"Logger.js:126","message":"[MeController] syncLocalMediaProgress invalid local media progress object no library item with id \"li_t4ytoqm1lqt470p1nd\" [object Object]","levelName":"ERROR","level":4}``` We use UUIDv4 now and your ID is starting with `li_`. I recommend you remove the books you downloaded on v2.2.23 and download again. Those old IDs are going to cause issues.
Author
Owner

@c-hri-s commented on GitHub (Oct 28, 2023):

That could well be it @advplyr - I downloaded them a while ago.
I've since deleted them from the phone, so it's no longer an issue.

My only problem now is the couple of books which seem stuck to the 'continue listening' shelf despite them being marked as finished, and me having selected to hide them from that shelf

@c-hri-s commented on GitHub (Oct 28, 2023): That could well be it @advplyr - I downloaded them a while ago. I've since deleted them from the phone, so it's no longer an issue. My only problem now is the couple of books which seem stuck to the 'continue listening' shelf despite them being marked as finished, and me having selected to hide them from that shelf
Author
Owner

@advplyr commented on GitHub (Oct 28, 2023):

I'm confused about if you are talking about the web client or the mobile app.

@advplyr commented on GitHub (Oct 28, 2023): I'm confused about if you are talking about the web client or the mobile app.
Author
Owner

@c-hri-s commented on GitHub (Oct 28, 2023):

Both

image

Screenshot 2023-10-28 at 17 16 05 jpeg

@c-hri-s commented on GitHub (Oct 28, 2023): Both ![image](https://github.com/advplyr/audiobookshelf/assets/13216128/b359b08f-326a-4f9e-aa7c-761f4a4edf36) ![Screenshot 2023-10-28 at 17 16 05 jpeg](https://github.com/advplyr/audiobookshelf/assets/13216128/2862db00-1419-43d3-89db-3b4374706e14)
Author
Owner

@advplyr commented on GitHub (Oct 28, 2023):

Does that book also have an ebook file, or all audio files?

@advplyr commented on GitHub (Oct 28, 2023): Does that book also have an ebook file, or all audio files?
Author
Owner

@c-hri-s commented on GitHub (Oct 28, 2023):

One of them is only audio files, the other has an epub in the same folder

@c-hri-s commented on GitHub (Oct 28, 2023): One of them is only audio files, the other has an epub in the same folder
Author
Owner

@advplyr commented on GitHub (Oct 28, 2023):

I'm thinking you may have come across a bug when your downloaded copy of the book with the old id was syncing with the server and it created an extra media progress record.

My guess is you have 2 media progress rows in the database for the same media item id. This is the only thing I can think of that would explain all this.

If you can open up the sqlite db and check if you have 2 rows with the same mediaItemId
The media item ids you shared above are
48f81839-f1e7-4c1d-ab09-c92318488d1a
and
79c720bb-64ef-4f25-b295-83209c182b37

@advplyr commented on GitHub (Oct 28, 2023): I'm thinking you may have come across a bug when your downloaded copy of the book with the old id was syncing with the server and it created an extra media progress record. My guess is you have 2 media progress rows in the database for the same media item id. This is the only thing I can think of that would explain all this. If you can open up the sqlite db and check if you have 2 rows with the same `mediaItemId` The media item ids you shared above are `48f81839-f1e7-4c1d-ab09-c92318488d1a` and `79c720bb-64ef-4f25-b295-83209c182b37`
Author
Owner

@advplyr commented on GitHub (Oct 28, 2023):

select * from mediaProgresses where mediaItemId="48f81839-f1e7-4c1d-ab09-c92318488d1a"

@advplyr commented on GitHub (Oct 28, 2023): `select * from mediaProgresses where mediaItemId="48f81839-f1e7-4c1d-ab09-c92318488d1a"`
Author
Owner

@c-hri-s commented on GitHub (Oct 28, 2023):

sqlite> .open /mnt/public/absdatabase.sqlite

sqlite> select * from mediaProgresses where mediaItemId="48f81839-f1e7-4c1d-ab09-c92318488d1a";

9575c0be-45a9-4619-921d-f234837e19ec|48f81839-f1e7-4c1d-ab09-c92318488d1a|book|81278.557268|0.0|1|1|epubcfi(/6/12[id22]!/4[3Q280-21bf0f6720d94bfd9a299e4283298c0f]/2[sec_praise01]/2[bul0000591]/2/1:0)||2023-10-26 07:53:21.570 +00:00|{"libraryItemId":"c5b344d6-9eae-4e33-9a0e-e8113fc3e265","progress":1}|2023-06-15 14:41:01.631 +00:00|2023-10-26 07:53:30.121 +00:00|eaea4587-ff67-4c92-ac82-97c9715e5a2e
local_A97C66A4-0A0A-4D45-9835-309466FA684B|48f81839-f1e7-4c1d-ab09-c92318488d1a|book|81278.557268|40636.62395431|0|0||||{"libraryItemId":"li_t4ytoqm1lqt470p1nd","progress":0.49996733849887076}|2023-06-15 14:41:01.631 +00:00|2023-07-13 20:54:46.001 +00:00|eaea4587-ff67-4c92-ac82-97c9715e5a2e
@c-hri-s commented on GitHub (Oct 28, 2023): ``` sqlite> .open /mnt/public/absdatabase.sqlite sqlite> select * from mediaProgresses where mediaItemId="48f81839-f1e7-4c1d-ab09-c92318488d1a"; 9575c0be-45a9-4619-921d-f234837e19ec|48f81839-f1e7-4c1d-ab09-c92318488d1a|book|81278.557268|0.0|1|1|epubcfi(/6/12[id22]!/4[3Q280-21bf0f6720d94bfd9a299e4283298c0f]/2[sec_praise01]/2[bul0000591]/2/1:0)||2023-10-26 07:53:21.570 +00:00|{"libraryItemId":"c5b344d6-9eae-4e33-9a0e-e8113fc3e265","progress":1}|2023-06-15 14:41:01.631 +00:00|2023-10-26 07:53:30.121 +00:00|eaea4587-ff67-4c92-ac82-97c9715e5a2e local_A97C66A4-0A0A-4D45-9835-309466FA684B|48f81839-f1e7-4c1d-ab09-c92318488d1a|book|81278.557268|40636.62395431|0|0||||{"libraryItemId":"li_t4ytoqm1lqt470p1nd","progress":0.49996733849887076}|2023-06-15 14:41:01.631 +00:00|2023-07-13 20:54:46.001 +00:00|eaea4587-ff67-4c92-ac82-97c9715e5a2e ```
Author
Owner

@advplyr commented on GitHub (Oct 28, 2023):

Thanks, that's it. Delete the one that starts with local_. Then it will no longer appear in continue listening.

@advplyr commented on GitHub (Oct 28, 2023): Thanks, that's it. Delete the one that starts with `local_`. Then it will no longer appear in continue listening.
Author
Owner

@c-hri-s commented on GitHub (Oct 28, 2023):

That did it - thanks very much!

@c-hri-s commented on GitHub (Oct 28, 2023): That did it - thanks very much!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1297