MusicPiped icon indicating copy to clipboard operation
MusicPiped copied to clipboard

Custom instance settings doesn't save (and reset every sessions)

Open kowith337 opened this issue 5 years ago • 2 comments
trafficstars

I think app doesn't save my custom Invidious instance settings, and also reset to default everytime I exit app or force stop and re-launch this app.

I'm use Snopyta's instance because it's set to proxy streams by default and can reduce connections to GoogleVideo domains

Environment

App Version: 2.1.6 Installation Source: F-Droid Device: kane_sprout Android Version: 10 (Security patch 1 March 2020)

Steps to reproduce

  1. Open app
  2. Tap vertical three dots to access settings
  3. Tap Invidious API to open custom instant settings
  4. Fill your custom instant (for example, change to https://invidious.snopyta.org/), then press Apply
  5. Exit app or...
    • Clear app session by swipe out in recent apps screen.
    • Open app settings and then Force stop.
  6. Repeat step 1 to 3

Expected behavior

Custom instance should be saved and show filled custom instance from step 4

Actual behavior

App doesn't save custom instance and revert back to https://invidio.us/

kowith337 avatar Apr 09 '20 12:04 kowith337

I think I found the bug.

In main.dart, starting from line 94:

  invidiosAPI.addListener(() {
    putSetting('invidiosAPI', invidiosAPI.value);
  });

Then, from line 138:

  if ((await ob.getObject('invidiousApi')) == null) {
    ob.put(invidiosAPI.value, 'invidiousApi');
  } else {
    invidiosAPI.value = await ob.getObject("invidiousApi");

@deep-gaurav As you can see, there is a mix usage of invidiousApi and invidiosAPI (without letter u).

SBado avatar Jul 15 '20 09:07 SBado

Bumped for hoping of any activities...

FYI: the main invidio.us will be shutdown soon within this month, consider to fix and change to another instance before that time.

kowith337 avatar Aug 10 '20 11:08 kowith337