z-huang / InnerTune

A Material 3 YouTube Music client for Android
GNU General Public License v3.0
4.5k stars 276 forks source link

Clearing song cache and refetching songs does not reset formats #1631

Open gechoto opened 3 weeks ago

gechoto commented 3 weeks ago

Checklist

Steps to reproduce the bug

  1. Start with a fresh install of InnerTune
  2. Set audio quality to Low
  3. Play a song
  4. Set audio quality to High
  5. Clear the song cache
  6. Play the same song again

Expected behavior

After tapping on Clear song cache it should really remove everything about the song from the cache and reload it the next time it is played.

Actual behavior

Even after clearing the song cache it does load the song in the old format again. So for example it loads it in Low quality again even if High quality is selected and cache is empty.

Screenshots/Screen recordings

No response

Logs

-

InnerTune version

0.5.10

Android version

Android 14

Additional information

The problem persists when re-installing InnerTune and loading an old backup. So for example when a song is first played in Low quality it will be saved in the backup and if this backup is loaded it will again always play the song in Low quality no matter what you set in the settings.

It does also not help to tap Refetch on the song. It seems to not refetch the formats.

It seems that InnerTune does save the format a song was first played in in the DB and never changes / resets it. But the formats should be reset when refetching a song or clearing the cache.

TyraVex commented 3 weeks ago

I got the same problem here My 150 songs library is stuck at 50-55kbps and now that I realized how low the quality is, I can't enjoy it as much as before. This is a great app, but it would be so much better to be able to enjoy my music in a higher bitrate than 50-55kbps.

gechoto commented 2 days ago

@TyraVex Workaround for now if you are still stuck with low audio quality (and know how to edit a SQLite database):

  1. Export a backup from InnerTune
  2. Rename the backup file (it is just a zip) and change the extension from .backup to .zip
  3. Extract that backup zip
  4. Open the song.db database from the extracted files
  5. Clear the format table & save the db
  6. Package the new database file into a new backup (just zip it and rename the zip file back to a .backup file)
  7. Restore that modified backup in InnerTune
  8. Make sure quality in InnerTune is set to High and never play a song when it is set to anything else
  9. Clear the song cache
  10. Enjoy better quality
TyraVex commented 2 days ago

@TyraVex Workaround for now if you are still stuck with low audio quality (and know how to edit a SQLite database):

1. Export a backup from InnerTune

2. Rename the backup file (it is just a zip) and change the extension from `.backup` to `.zip`

3. Extract that backup zip

4. Open the `song.db` database from the extracted files

5. Clear the `format` table & save the db

6. Package the new database file into a new backup (just zip it and rename the zip file back to a `.backup` file)

7. Restore that modified backup in InnerTune

8. Make sure quality in InnerTune is set to `High` and never play a song when it is set to anything else

9. Clear the song cache

10. Enjoy better qualiy

I have no words I might as well do some sync service that merges songs between devices while we're at it Thank you so much

RGBCube commented 2 days ago

Wow, that is a life saver. IMO, the format should be just reset when you clear the song cache. @z-huang