mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-30 23:40:40 +02:00
[Bug]: Remove Continue Listening #1297
Closed
opened 2026-04-24 23:38:48 +02:00 by adam
·
31 comments
No Branch/Tag Specified
master
book_tags_genres_dedupe
episode_download_fallback
Issue-4540-SortBy-StartedDate-and-FinishedDate
episode_meta_tagging
fix_authorize_race_condition
redirect_transcode_requests
progress_updated_sort
fix_ereader_socket_event
fix_change_empty_root_password
fix_podcast_session_track_index
fix_set_token
session_modal_user
localize_durations
fix_oidc_create_user
jwt_auth_refactor
fix_scanner_deleting_single_file_books
fix_mediaprogress_updatedat_2
experimental_next_client
podcast_episode_duration
episode-timestamps-clickable
book_author_secondary_sort_title
podcast_useragents
pathexists_user_access
fix_pathexists_join
book_author_secondary_sort
clean_duplicate_mediaprogress
sanitize_html_description
trix_prevent_attachments
check_path_api_fix
fix_mediaprogress_updatedat
increase_express_json_limit
fix_dockerfile_nunicode
search_episodes
audiobook_tools_update
episode_secondary_sorts
hls_stream_url_update
new_session_track_endpoint
audiobook_tools_enhancements
watcher_rescans_update
player_track_tooltip
fix_exclude_prefixes_crash
socket_item_events
fix_podcast_episode_scanner_promise
new_stats_controller
count_cache_for_userpermissions
parsing-opf-v3
validate_migration_files
fix-quick-match-all-crash
fix-chapter-end-sleep-timer
stringify_sequelize_query
remove-col-ambiguity
fix_next_prev_edit_description
details_trim_whitespace
fix_content_url_basepath
fix_logger_fatal
progress_bar_visibility
batch-edit-populate-map-details
feed_generator_updates
bookmark-modal-updates
migrate-library-item-in-scanner
migrate-new-library-items
migrate-podcasts-new-library-item-2
migrate-podcasts-new-library-item
fix-remove-episode-from-playlist
playback-session-use-new-library-item
refactor-library-item
fix-heatmap-caption
feed-episodes-upsert
share-media-player-media-session-api
remove-old-playlist
remove_old_collection_object
plugin-implementation-demo
feed_migration
refactor-feeds-from-item
fix_remove_authors_no_books
v2.17.3-fk-constraints-migration
migrations-first-upgrade
sqlite_2
feature/nuxt-target-server
waveform
sqlite
play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.4
v1.3.3
v1.3.1
v1.2.8
v1.2.6
v1.2.5
v1.2.4
v1.2.1
v1.1.15
v1.1.14
v1.1.13
v1.1.12
v1.1.11
v1.1.10
v1.1.9
v1.1.8
v1.0.0
0.9.61-beta.0
0.9.61-beta
Labels
Clear labels
authentication
backlog
bug
chapter editor
config-issue
ebooks
encoding/embedding
enhancement
help wanted
listening sessions & progress
planned
possible plugin
progress sync
pull-request
sorting/filtering/searching
unable to reproduce
upload
users & permissions
waiting
Mirrored from GitHub Pull Request
No Label
bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
adam (Adam Melkus)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/audiobookshelf#1297
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Audiobookshelf version
2.3.3
How are you running audiobookshelf?
Docker
@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'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.
@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.
@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.
@jrhedman commented on GitHub (Sep 17, 2023):
Unfortunately I can't test this right now due to the OOM error #2075. Maybe @patrickrobbins would be able to confirm?
@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.
@nichwall commented on GitHub (Oct 26, 2023):
Did you have any of the books which could not be marked as finished downloaded to your iOS device?
@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).
@advplyr commented on GitHub (Oct 26, 2023):
@c-hri-s You may not be on the latest mobile app release
@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.
@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?
@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'
@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:
The books under the "Listen Again" Shelf have only the options that you've mentioned.
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):
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';@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?
Neither of the two books which refuse to vanish are shown in the SQL output:
@jrhedman commented on GitHub (Oct 28, 2023):
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:
Can you also share this error from the log? And did you see any other error about Adding/Removing from the continue listening?
@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'):
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.
@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.
@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
@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):
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.@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
@advplyr commented on GitHub (Oct 28, 2023):
I'm confused about if you are talking about the web client or the mobile app.
@c-hri-s commented on GitHub (Oct 28, 2023):
Both
@advplyr commented on GitHub (Oct 28, 2023):
Does that book also have an ebook file, or all audio files?
@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
@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
mediaItemIdThe media item ids you shared above are
48f81839-f1e7-4c1d-ab09-c92318488d1aand
79c720bb-64ef-4f25-b295-83209c182b37@advplyr commented on GitHub (Oct 28, 2023):
select * from mediaProgresses where mediaItemId="48f81839-f1e7-4c1d-ab09-c92318488d1a"@c-hri-s commented on GitHub (Oct 28, 2023):
@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.@c-hri-s commented on GitHub (Oct 28, 2023):
That did it - thanks very much!