Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronization Api missing #16

Closed
peterpepo opened this issue Oct 20, 2023 · 7 comments
Closed

Synchronization Api missing #16

peterpepo opened this issue Oct 20, 2023 · 7 comments

Comments

@peterpepo
Copy link

peterpepo commented Oct 20, 2023

Is synchronization api implemented?
I spinned up a docker image of gpodder2go (https://github.com/owenvoke/gpodder2go-docker), set up two devices under one account, now I would like to sync those two devices.

When I run http://192.168.2.40:8081/api/2/sync-devices/gp2goadmin.json -> I get 404 page not found

How are you supposed to sync two clients (Antennapod on Android installations) without sync api?

If I understand it correctly, you set up and list synchronizations using this: https://gpoddernet.readthedocs.io/en/latest/api/reference/sync.html

My understanding of devices under one account is coming from here: https://antennapod.org/documentation/general/synchronization

@oxtyped
Copy link
Owner

oxtyped commented Dec 26, 2023

Thanks for this! There isn't synchronization yet but it shouldn't be too hard to implement it.

Let me try and work on this, this week! In the meantime, leaving this open to make sure we don't lose track of this issue!

@oxtyped
Copy link
Owner

oxtyped commented Dec 26, 2023

@peterpepo

Just to understand this a little better, synchronization appears to be a one-time effort where once synchronized, new subscriptions or deletions on one device will always affect the other device?

Does this expect episode actions (eg. playing till a certain timestamp) on one device to also be synced?

@oxtyped
Copy link
Owner

oxtyped commented Dec 28, 2023

Just for my own reference, gpodder/mygpo seem to treat the first value of the device in the synchronize request body as the main device to have other devices synchronize to.

https://github.com/gpodder/mygpo/blob/master/mygpo/api/advanced/sync.py#L75-L81

And it would appear that sync does not handle deletion, instead it propagate all new podcast subscriptions on any of the devices to the other devices in its sync group

https://github.com/gpodder/mygpo/blob/80c41dc0c9a58dc0e85f6ef56662cdfd0d6e3b16/mygpo/users/models.py#L188-L212

@peterpepo
Copy link
Author

peterpepo commented Jan 2, 2024

@peterpepo

Just to understand this a little better, synchronization appears to be a one-time effort where once synchronized, new subscriptions or deletions on one device will always affect the other device?

Does this expect episode actions (eg. playing till a certain timestamp) on one device to also be synced?

My understanding and expected use is any changes (new, removed subscriptions, played status, playback position, etc..) to be always reflected on all devices. So if I play on device A, then jump onto device B, sync, and everything is mirrored.

Sorry for late reply, it has been a while, since I listened to podcasts on separate device, and forgot about this feature request. I wanted to look and get into topic, before replying your question. :)

@oxtyped
Copy link
Owner

oxtyped commented Jan 3, 2024

No worries at all! Thanks for the reply!

Been busy working on this feature. Hoping I can get it out by next week 🤞

Sorry that its taking a while, there's quite a bit of other work commitments lately.

@oxtyped
Copy link
Owner

oxtyped commented Apr 8, 2024

Hey all, just some updates, I've pushed out v0.2.0 release which contains the sync endpoint function that was just merged into main.

This release adds support for the 2 /sync-device endpoints.

Right now you'll have to manually call the API endpoints to sync the devices (ref: https://gpoddernet.readthedocs.io/en/latest/api/reference/sync.html) but I will be working on adding a wrapper to the endpoints as a cli command soon. (if anyone wants to take a stab at that, please don't let me stop you).

Do let me know if you run into any issues! 🙏

@oxtyped
Copy link
Owner

oxtyped commented Apr 16, 2024

Closing this issue. Please feel free to reopen if there's any other sync-related issues, or open a new one.

@oxtyped oxtyped closed this as completed Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants