FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Don't make requests when importing subscriptions

Open ChunkyProgrammer opened this issue 1 year ago • 6 comments

Don't make requests when importing subscriptions

Pull Request Type

  • [x] Bugfix

Related issue

  • Avoids rate limit when importing subscriptions
  • closes https://github.com/FreeTubeApp/FreeTube/issues/3943
  • closes https://github.com/FreeTubeApp/FreeTube/issues/5594 (last comment mentions the errors that this pull request fixes)
  • closes https://github.com/FreeTubeApp/FreeTube/issues/4388

Description

A simplified version of https://github.com/FreeTubeApp/FreeTube/pull/4340 that doesnt worry about having a lot of logic for fetching thumbnails if it's missing, the thumbnails can be fetched from other places (visiting the channel, refreshing subscriptions with local api + no rss)

Screenshots

Testing

See: https://github.com/FreeTubeApp/FreeTube/issues/3735#issuecomment-1642286050 & https://github.com/FreeTubeApp/FreeTube/pull/4340

Change file extension .txt to .db

(Notice how much faster importing subscriptions is)

Desktop

  • OS: Linux Mint
  • OS Version: 22
  • FreeTube version: latest nightly

ChunkyProgrammer avatar Aug 27 '24 21:08 ChunkyProgrammer

Hi error~ image

PikachuEXE avatar Aug 28 '24 00:08 PikachuEXE

Oops more errors image image

PikachuEXE avatar Aug 29 '24 00:08 PikachuEXE

@PikachuEXE found the issue, interestingly, this error could happen when not using this PR

ChunkyProgrammer avatar Aug 29 '24 01:08 ChunkyProgrammer

Duplicate keys detected: 'UC59AcfHD5jOGqTxb-zAsahw'. This may cause an update error. image

PikachuEXE avatar Aug 29 '24 03:08 PikachuEXE

@PikachuEXE you're somehow subscribed to the same channel multiple times, not sure how that happened

ChunkyProgrammer avatar Aug 29 '24 03:08 ChunkyProgrammer

I think the double subscribe issue should be fixed here: https://github.com/FreeTubeApp/FreeTube/pull/5617/commits/60a11d39290d9280f58a7636ec3eeb692142eb38 (you'll need to unsubscribe from the duplicate manually)

ChunkyProgrammer avatar Aug 29 '24 04:08 ChunkyProgrammer