Skip to content

Draft: Nextcloud sync

nee requested to merge nemuii/podcasts:268-nextcloud-sync into main

Please test and comment.

data

  • json data types for sync
  • store episode_actions in a table
  • store subscription_actions in a table
  • store last sync date in a table
  • store ADD & REMOVE on Source::update_url
  • optimize dbqueries and use joinable!
  • reconsider the feed fetch / sync order. (now fetch feeds -> sync subs (fetches new ones) -> sync eps)

conflicts

  • ignore remote plays that happened before local plays unless they are finished plays
  • ignore remote unsubs that happened before local subs
  • ignore remote subs that happened before local unsubs

login

  • get existing password from goa (gnome online accounts)
  • add a ui to input the server/user/password
  • check if password is app password
  • turn real password into app password, parse response xml
  • browser login flow v2
  • store app password with oo7?
  • delete app password on logout

upload

  • POST subscriptions
  • POST Episode Actions
  • do a first time sync
  • filter out stuff that is already on the server from the initial post
  • do delta posts (only post things that happened since last change)

download

  • GET subscriptions
  • GET Episode Actions
  • do a first time sync
  • do delta GETs (add ?since parameter)

podcasts-gtk

  • do a sync when an update(feed refresh) happens in the ui
  • do a sync when closing
  • do sync when pausing / changing track (add options)
  • make the preferences gui look good
  • show an inapp notification when a sync fails?
  • show an inapp notification when a login fails

test

  • test browser login
  • test password login
  • unit test json parsing
  • unit tests for db sync data types
  • unit tests with mock nextcloud server
  • test initial post
    • Create a new Nextcloud account and sync an existing podcasts-sqlite-db to the new nextcloud account
    • Clear the podcasts-sqlite-db and restore it by logging into nextcloud
  • test play
  • test finish ep
  • test subscribe
  • test unsubscribe
  • test with AntennaPod
    • Did a sync with an existing long runnning AntennaPod DB.
    • played an episode for a few seconds and confimed it was synced (both ways)
    • played an episode to the end and confimed it was synced (both ways)
    • subscribed to a new podcast and confimed it was synced (both ways)
    • unsubscribed from a podcast and confimed it was synced (both ways)
  • test with kasts
    • played an episode for a few seconds and confimed it was synced (both ways)
    • played an episode to the end and confimed it was synced (both ways)
    • subscribed to a new podcast and confimed it was synced (both ways)
    • unsubscribed from a podcast and confimed it was synced (both ways)
  • test a11y
    • None of the new UI shows any Errors in the Inspector a11y overlay
    • All elements are reachable via keyboard
    • Loading update messages get focused, although I'm not sure how well this works when switching between browser and Podcasts for the Login

Would Close #268

Edited by nee

Merge request reports