Repository navigation
Радио после перезапуска и целостность загрузок - #13
Merged
Merged
Conversation
A mix continued only until the app closed, because the saved queue kept tracks but not the radio cursor. Startup now restores that cursor, and bails if the account signed out while the queue was loading. A failed download index no longer leaves the audio file behind. After a failed track the next Play can use a file that is still on disk. Headset Play during loading retries the current track instead of doing nothing. An unauthorized network probe is not reported as a restored connection. Recovering a release no longer requires a notes file that was never written. Co-authored-by: Selena <[email protected]> Co-authored-by: Filosoff <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Зачем
После обычного перезапуска микс переставал пополняться: очередь сохраняла треки, но не курсор радио. Один сбой офлайн-файла после этого заставлял плеер игнорировать уже скачанную копию. Запись индекса загрузки могла оставить файл на диске без записи в индексе.
Что исправлено
restoreRadio, а не как обычная очередь. Если за время загрузки вышли из аккаунта, очередь в движок не отправляется.session_expired, интерфейс всё равно выходит из аккаунта, без необработанного отказа промиса.index.jsonоткатывает и память, и новый аудиофайл.Секреты и ключи подписи не менялись.
Проверка
cargo test -p pm_engine --lib offline::tests::a_failed_index_write_removes_the_new_file_and_keeps_the_old_indexcargo clippy -p pm_engine --all-targets --locked -- -D warningsСборки Windows, macOS и Android здесь не запускались: правки в общем движке и в общем интерфейсе.