Giter Club home page Giter Club logo

nextcloud-gpodder's Introduction

nextcloud-gpodder

Nextcloud app that replicates basic gpodder.net api to sync podcast consumer apps (podcatchers) like AntennaPod.

Clients supporting sync

client support status
AntennaPod Initial purpose for this project, as a synchronization endpoint for this client.
Support is available as of version 2.5.1.
KDE Kasts Supported since version 21.12
Podcast Merlin Full sync support podcast client for Windows
RePod Nextcloud app for playing and managing podcasts with sync support
Garmin Podcasts Repository archived, app is no longer available

Installation

Either from the official Nextcloud app store (link to app page) or by downloading the latest release and extracting it into your Nextcloud apps/ directory.

API

subscription

  • get subscription changes: GET /index.php/apps/gpoddersync/subscriptions
    • (optional) GET parameter since (UNIX time)
  • upload subscription changes : POST /index.php/apps/gpoddersync/subscription_change/create
    • returns JSON with current timestamp

The API replicates this: https://gpoddernet.readthedocs.io/en/latest/api/reference/subscriptions.html

Example requests:

GET /index.php/apps/gpoddersync/subscriptions?since=1633240761

{
  "add": [
    "https://example.com/feed.xml",
    "https://example.org/feed/"
  ],
  "remove": [
    "https://example.net/feed.rss"
  ],
  "timestamp": 1663540502
}
POST /index.php/apps/gpoddersync/subscription_change/create

{
  "add": [
    "https://example.com/feed.xml",
    "https://example.org/feed/"
  ],
  "remove": [
    "https://example.net/feed.rss"
  ]
}

episode action

  • get episode actions: GET /index.php/apps/gpoddersync/episode_action
    • (optional) GET parameter since (UNIX time)
    • fields: podcast, episode, guid, action, timestamp, position, started, total
  • create episode actions: POST /index.php/apps/gpoddersync/episode_action/create
    • fields: podcast, episode, guid, action, timestamp, position, started, total
    • position, started and total are optional, default value is -1
    • guid is also optional, but should be sent if available
    • identification is done by guid, or episode if guid is missing
    • returns JSON with current timestamp

The API replicates this: https://gpoddernet.readthedocs.io/en/latest/api/reference/events.html

Example requests:

GET /index.php/apps/gpoddersync/episode_action?since=1633240761

{
    "actions": [
      {
       "podcast": "http://example.com/feed.rss",
       "episode": "http://example.com/files/s01e20.mp3",
       "guid": "s01e20-example-org",
       "action": "PLAY",
       "timestamp": "2009-12-12T09:00:00",
       "started": 15,
       "position": 120,
       "total":  500
      },
      {
       "podcast": "http://example.com/feed.rss",
       "episode": "http://example.com/files/s01e20.mp3",
       "guid": "s01e20-example-org",
       "action": "DOWNLOAD",
       "timestamp": "2009-12-12T09:00:00",
       "started": -1,
       "position": -1,
       "total":  -1
      },
    ],
    "timestamp": 12345
}
POST /index.php/apps/gpoddersync/episode_action/create

[
  {
   "podcast": "http://example.com/feed.rss",
   "episode": "http://example.com/files/s01e20.mp3",
   "guid": "s01e20-example-org",
   "action": "play",
   "timestamp": "2009-12-12T09:00:00",
   "started": 15,
   "position": 120,
   "total":  500
  },
  {
   "podcast": "http://example.org/podcast.php",
   "episode": "http://ftp.example.org/foo.ogg",
   "guid": "foo-bar-123",
   "action": "DOWNLOAD",
   "timestamp": "2009-12-12T09:05:21",
  }
]

Development

Testing

  • mount project into apps-extra of nextcloud environment (https://github.com/juliushaertl/nextcloud-docker-dev)
  • docker-compose exec nextcloud occ app:enable gpoddersync enable app so we have database tables
  • docker-compose exec nextcloud phpunit9 -c apps-extra/nextcloud-gpodder/tests/phpunit.xml

nextcloud-gpodder's People

Contributors

applejag avatar dependabot[bot] avatar jonofus avatar linagkar avatar linkinsoldier avatar mattsches avatar michaelprager avatar pbek avatar sunjam avatar thrillfall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nextcloud-gpodder's Issues

Error 302 when trying to upload subscriptions from gPodder app on Kubuntu

Hi,

I have subscriptions in my gPodder app and tried to upload them to my newly installed gpodder-sync on my Nextcloud server but it reported 'Error during upload. 302'.

Info on my setup:
I have my nextcloud server running behind the firewall of my router with a port forward from 4433 external to 433 internal. I have 2FA enabled in nextcloud and created an app password for gPodder. I think it connects OK because when looking for new podcasts I can populate the 'gpodder.net - Top 50' list.

Hope you can help.

Gpoddersync only processes first EpisodeAction

episode_action/create only deals with the first EpisodeAction it finds inside the data string.

public function create($data) {
$episodeAction = $this->episodeActionReader->fromString($data);
$episodeActionEntity = new EpisodeActionEntity();

Nevertheless, AntennaPod clearly sends a list of possibly multiple EpisodeActions:
String body = createBody(queuedEpisodeActions.toString());

This could be a problem when synchronizing AntennaPod for the first time, because then only the first EpisodeAction will be stored.

Can you confirm that this could lead to problems? I am not sure about it, it seems like a too obvious bug, Could be on the wrong track here.

Update repository to v2.0.0

The repository seems to be out-of-date, since in the Nextcloud app store the app already reached v2.0.0.

Branch process-optional-guid needs to be merged into main. I haven't created a PR, because @thrillfall probably has a mergeable v2.0.0 branch? It seems like it just isn't uploaded yet, since v2.0.0 is online.

Update 3.3.0 to 3.4.0 impossible

Hi,
First, thanks for this wonderfull app !

My nextcloud is 24.0.1 under Debian 11.
Impossible to update GPodder from 3.3.0 to 3.4.0.
Update is visible in App menu with update button ... I click on it and update message disappear as it was updatted but no ... it appears again soon after !
Any help welcome ;o)
Cr9c

parameter 'since' doesn't appear to be optional

According the documentation 'since' is optional but that doesn't appear to be the case.

curl --user "user:password" https://domain/apps/gpoddersync/episode_action returns the following error while the same command with an appended ?since=0 works just fine. Haven't tested the other API endpoints.

Exception: OCA\GPodderSync\Controller\EpisodeActionController::list(): Argument #1 ($since) must be of type int, null given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 225 in file '/var/www/html/custom_apps/gpoddersync/lib/Controller/EpisodeActionController.php' line 56

Download link broken

error

Nextcloud 21 with latest PHP installed and all necessary modules.

Error:
Client error: GET https://github.com/thrillfall/nextcloud-gpodder/raw/main/releases/gpoddersync-1.0.4.tar.gz resulted in a 404 Not Found response: (truncated...)

Error on sync

I've installed new (2.5.0) version of AntennaPod and nextcloud-gpodder (Nextcloud version 20.0.14). I was able to sign in and authorize app, but whenever I try to sync, I get "attempt to invoke virtual method 'java.lang.String okhttp3.HttpUrl.host()' on a null object reference". Don't know how to debug further.

Feature Request: Support syncing the queue

It would be really nice if synchronization here would also synchronize the queue between devices. I'm not sure that that's actually in the scope of this project, or the AntennaPod sync service, but it would be super useful

provide changelogs

Hey. Great idea and great work so far.
Can you please provide changelogs for each new version?
For me as admin it is important to know what has changed in an update.
Again. Thanks for your work! ๐Ÿš€

Trust anchor for certification path not found

Hi,

I am trying to link my AntennaPod to nextcloud-gpodder. When I start AntennaPod, then go to

Settings > Synchronize > Chose Provider for Sync (or similar; my language is set to German

I get to log in.

For Hostname, I put https://<my-ip>:2443 (2443 being the port docker exposes to the nextcloud container's port 443). When I then click Login, I get

java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

I thought, perhaps this was related to the fact that I use nginx-reverse-proxy to use a local domain for https://<my-ip>:2443, so that I can just access nextcloud through https://nextcloud.internal (without any port) and it will forward any requests to that IP:port. This internal domain has a self-signed certificate. However, this certificate is only used when accessing it through the reverse proxy; when I open https://<ip>:2443 in my browser, it uses whatever the nextcloud docker container uses by default as the certificate.

  • NextCloud Version 23.0.2
  • Gpodder Sync Version 3.4.0
  • AntennaPod Version 2.6.1 (50eee8848)

I now updated to NextCloud Version 23.0.6, which seems to not make any difference.

Do I need to change / add any configuration and / or use a different URL? I tried https://<ip>:2443/index.php/apps/gpoddersync as well, no difference.

Can you please help me fix this? Thank you in advance for your support :)

Errors when trying to log in from AntennaPod

I am trying to sync AntennaPod with the GPodderSync nextcloud app but have various errors.

Nextcloud version: 23.0.2
GPodder Sync version: 3.2.0
AntennaPod version: 2.5.0 from F-Droid
Nextcloud Android app version: 3.19.0 from F-Droid

My nextcloud instance is located at https://mydomain.tld/nextcloud/ and is set up with 2FA. My Android nextcloud app is logged in and works fine.

I go to AntennaPod Settings -> Synchroniszation -> Choose synchronization provider and I select the Nextcloud option.

I am asked to enter the hostname.

  • If I enter mydomain.tld, I get "Return code 404"
  • If I enter https://mydomain.tld, I get "Return code 404"
  • If I enter mydomain.tld/nextcloud, I get "Return code 404"
  • If I enter https://mydomain.tld/nextcloud, I get "Return code 404"
  • If I enter mydomain.tld/nextcloud/ (note trailing slash), I get "Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject"
  • If I enter https://mydomain.tld/nextcloud/ (note trailing slash), I get "Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject"

How can I log in from AntennaPod?

Thanks in advance!

How do I use this?

I have Nextcloud 23 running and installed this app. On Android, I have AntennaPod 2.4.1 from 28 Nov 2021.

When I select to sync with gpodder and choose another server, entering my Nextcloud details, I get the error

Value <!DOCTYPE of type java.lang.String cannot be converted to JSONArray

I'm sure, I miss something simple here?

Fix split scenario with 1.0.8 release

Version 1.0.8 doesn't have a real release in the app store (it still says 1.0.7) but the upstream tarball URLs have changed to https://github.com/thrillfall/nextcloud-gpodder/raw/main/releases/gpoddersync-1.0.8.tar.gz.

This means that for new Nextcloud instances you get version 1.0.8 but old Nextcloud instances will not get updated and stay at version 1.0.7.

Upgrade PHPUnit version

The Nextcloud docs say

Nextcloud uses PHPUnit >= 4.8 for unit testing.

Right now, the current PHPUnit version is 9, and there have been some bigger changes with regard to class names/namespaces, e.g. PHPUnit_Framework_TestCase was replaced with \PHPUnit\Framework\TestCase. Also, the NC docs recommend extending from \Test\TestCase which in turn extends \PHPUnit\Framework\TestCase.

To make testing easier for more recent versions of NC, I would like to propose to use a more current version of PHPUnit for testing and to adapt the test cases accordingly.

Error on installing 3.0.0 from app store

See below for the error log. It seems to fail on TimestampMigration.php#45.
I don't know whether this might be the cause, but I'm running nextcloud 22 on PHP8.

I can GET and POST subscriptions just fine, but EpisodeAction POSTs don't seem to do anything. There's a timestamp response to the POST, but it looks like nothing is added to the database.

NB: Again, I don't know if it's related, but GET /index.php/apps/gpoddersync/episode_action fails without a since query. If I add any value for since then it works just fine.
Nevermind these remarks, I got it running.

{"reqId":"oer6QFcVkZBPWCmzZtHI","level":3,"time":"2021-10-12T18:47:27+00:00","remoteAddr":"xx.xx.xx.xx","user":"xxx","app":"PHP","method":"POST","url":"/index.php/settings/apps/enable","message":"Undefined variable $result at /var/lib/nextcloud/apps/gpoddersync/lib/Migration/TimestampMigration.php#45","userAgent":"xxx","version":"22.2.0.2","exception":{"Exception":"Error","Message":"Undefined variable $result at /var/lib/nextcloud/apps/gpoddersync/lib/Migration/TimestampMigration.php#45","Code":0,"Trace":[{"file":"/var/lib/nextcloud/apps/gpoddersync/lib/Migration/TimestampMigration.php","line":45,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/usr/share/webapps/nextcloud/lib/private/Repair.php","line":123,"function":"run","class":"OCA\\GPodderSync\\Migration\\TimestampMigration","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/legacy/OC_App.php","line":1059,"function":"run","class":"OC\\Repair","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/Installer.php","line":157,"function":"executeRepairSteps","class":"OC_App","type":"::"},{"file":"/usr/share/webapps/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":447,"function":"installApp","class":"OC\\Installer","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/Route/Router.php","line":301,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/usr/share/webapps/nextcloud/lib/base.php","line":1000,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/usr/share/webapps/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/share/webapps/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"6165d85432919"}

Call to undefined method Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException::getReason()

on posting episode action we get Call to undefined method Doctrine\DBAL\Exception\UniqueConstraintViolationException::getReason()

trace:

{"Exception":"Error","Message":"Call to undefined method Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException::getReason()","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"create","class":"OCA\\GPodderSync\\Controller\\EpisodeActionController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/gpoddersync/lib/Controller/EpisodeActionController.php","Line":71},"CustomMessage":"--"},"userAgent":"AntennaPod/2.3.1","version":"21.0.4.1"}

Signing into Kasts to Nextloud 23 fails

I installed Kasts 22.02 (the latest) and Nextcloud 23.0.2 with Goppdersync 3.2 and I haven't been able to sign in. I'm getting this error looking at the Nextcloud logs:

[index] Error: Typed property OCA\GPodderSync\Controller\SubscriptionChangeController::$userId must be string, null used

GET /index.php/apps/gpoddersync/subscriptions?since=0
from xx.xxx.xx.xxx at 2022-03-20T10:27:20+01:00

It seems the SubscriptionChangeController class is expecting the $userId to be a string, which it is:

class SubscriptionChangeController extends Controller {

	private SubscriptionChangeSaver $subscriptionChangeSaver;
	private SubscriptionChangeRepository $subscriptionChangeRepository;
	private string $userId;

	public function __construct(
		string $AppName,
		IRequest $request,
		$UserId,
		SubscriptionChangeSaver $subscriptionChangeSaver,
		SubscriptionChangeRepository $subscriptionChangeRepository

	) {
		parent::__construct($AppName, $request);
		$this->subscriptionChangeSaver = $subscriptionChangeSaver;
		$this->subscriptionChangeRepository = $subscriptionChangeRepository;
		$this->userId = $UserId;
	}

Screenshot 2022-03-20 at 10 38 03

Is this a known bug?
Thanks.

Add sync status page

Hello! I'd really like a status page to understand if the synced podcasts are actually synced.

I've already started implementing this and I am preparing a PR. I'm making this issue so that other don't accidentally do the same work. I dibs this task :)

@thrillfall any comments on how you'd see this implemented in particular? I'm currently implementing a very simple Vue page in the personal settings section. Also, would you even accept such a feature (considering there is no such status page already)? :)

[Feature Request] Sync with news app

I find the nextcloud news app (https://github.com/nextcloud/news) to be a good way to manage RSS feeds. Unfortunately its not ideal for a podcast client (I'd rather use something like AntennaPod).

Unfortunately it seems like nextcloud-gpodder an antennapod keep seperate databases for RSS feeds. It'd be nice if gpodder could use a podcast folder in news, or news could have a folder for gpoddersync if installed.

I'm also going to open a duplicate of this feature request in the news app.

The "unique" column option is not supported

When I try to enable app, got error:

An error occured during the request. Unable to proceed.
The "unique" column option is not supported.

Probably this is because I use PostgreSQL?

Feature request: add minimal API documentation

I'm currently looking into adding gpodder sync support into Kasts (KDE convergent podcast player). It would be nice to also offer self-hosted options, especially if the API is (near) identical.

Assuming that your API is almost identical to gpodder's, could you please add some (minimal) documentation? E.g. what's the base URL for making GET and POST requests? What are the differences wrt gpodder.net API? Etc.

Currently, people would have to dive into the source code to find out.

Question: What is the VersionController for?

Just out of interest: VersionController returns a hardcoded version 0.1 - is this supposed to be the version of the app, or the version of the API?

Will clients use it at some point to detect available features?

No episode changes synchronization when using MySQL

Episode changes cannot be inserted into MySQL DB. Instead, the table stays empty and they don't get synchronized.

Expected Behavior

Episode changes should be inserted into oc_gpodder_episode_action table.

Current Behavior

When using MySQL, episode changes are not inserted into the table.
The sql command produces an error: ERROR 1292 (22007): Incorrect datetime value: 'Wed Jul 21 23:16:48 GMT+02:00 2021' for column nctest.oc_gpodder_episode_action.timestamp at row 1.

Possible Solution

Change Datetime format when using MySQL databases, because they do not support abstract datetimes like 'Wed Jul 21, GMT+02:00'.

Steps to Reproduce

  1. Activate MySQL general_log
  2. Install gpoddersync app on Nextcloud, install AntennaPod debug, connect to nextcloud account, play/pause episodes
  3. Find sql command in log that looks like:
  • INSERT INTO 'oc_gpodder_episode_action' ('podcast', 'episode', 'action', 'position', 'started', 'total', 'timestamp', 'user_id') VALUES('https://example.com/feed.xml', 'https://example.com/episode.mp3', 'PLAY', '144', '141', '200', 'Wed Jul 21 23:16:48 GMT+02:00 2021', 'user');
  1. Run SQL command through MySQL CLI or phpmyadmin => an error is produced

Context (Environment)

Using MariaDB 10.3, php8.0, Nextcloud 22, gpoddersync 1.0.7, Raspberry Pi OS 64bit, nginx 1.14.2

Detailed Description

I am a bloody beginner, but reading documentation I think the problem is that MySQL does not support datetime strings like the given one. PostgreSQL does, though.

Looked into the code and I think the problem could be in EpisodeActionEntity.php:

'timestamp' => (new \DateTime($this->timestamp))->format("Y-m-d\TH:i:s"),

There the format for datetime is specifically defined, but in the SQL command is a completely different datetime format (Wed Jul 21 23:16:48 GMT+02:00 2021).

Could it therefore be an error in EpisodeActionEntity.php in the interaction between jsonSerialize() and the datetime setter from Entity.php?
https://github.com/nextcloud/server/blob/769f84f31dafb4e0739d2a7b03242c53b66a896d/lib/public/AppFramework/Db/Entity.php#L119
grafik

"OpenPodcastSync"? New API specification

The name "gpodder" could also be a bit misleading, since you cannot simply connect clients that only support gpodder (different authentication). How about specifying this as a new API called something like "OpenPodcastSync"? That API specification could then state that:

  • gpodder.net supports a subset of the API
  • your nextcloud plugin supports the entire API
  • there can be different authentication methods in front, but the API itself is the same
  • there is a way to discover, for a given server, which capabilities it has

Maybe this could even be a joined work with the people from PodcastIndex (if they agree to keep the API as generic as it is now, without relying on PodcastIndex-specific IDs). In the best case, collaborating with PodcastIndex could convince even proprietary services to implement the protocol, so syncing works seamlessly across different clients.

Originally posted by @ByteHamster in AntennaPod/AntennaPod#6036 (comment)

Return server timestamp after uploading subscription changes

I first want to say that I love your work on nextcloud-gpodder. It's an enormous improvement over gpodder.net and it's absolutely trivial to set up self-hosting.

The gpodder API returns timestamps for all GET and POST actions on subscriptions and episode actions.
Nextcloud-gpodder is also returning server timestamps for all requests except POST /index.php/apps/gpoddersync/subscription_change/create

Could you also have nextcloud-gpodder return a server timestamp in order to be fully compatible with the gpodder API?

opml subscriptions file

I'm trying to sync my podcast subscriptions into gPodder but apparently it expects an opml file from a url like /subscriptions/username.opml in the nextcloud server.

Is this not implemented in this app?

Potential issue with full synchronization 'since' timestamp

On full synchronization, since timestamp is set to 0 and so only episode and subscription changes from within the last week will be synchronized.

Expected Behavior

Full synchronization after first synchronization

Current Behavior

Only episode actions and subscriptions from within last week will be synchronized

Possible Solution

If not intended, repair since-parameter or correct createDateTimeFromTimestamp to be able to deal with since=0

Steps to Reproduce

  1. Install AntennaPod debug with current build 3edd01e (12-08-2021) & Install gpoddersync 1.0.9.
  2. Do some subscription changes and create some episode actions
  3. Wait >1 week
  4. Delete app data, re-synchronize everything

Context (Environment)

Using MariaDB 10.3, php8.0, Nextcloud 22, gpoddersync 1.0.9, Raspberry Pi OS 64bit, nginx 1.14.2

Detailed Description

I recognized that after deleting AntennaPod app data and re-synchronizing subscriptions and episode changes, some episode changes won't synchronize.
After some digging I found out that the full synchronization feature calls /subscription_change/list with since=0 and therefore createDateTimeFromTimestamp will always return a timestamp from a week ago (because 0 is false).

The problem with this is that episode changes and subscriptions that are older than one week won't get synchronized.

Is this behaviour intended?

/**
* @param int|null $since
*
* @return DateTime
*/
private function createDateTimeFromTimestamp(?int $since): DateTime {
return ($since)
? (new \DateTime)->setTimestamp($since)
: (new \DateTime('-1 week'));
}

If not intended, I could PR a fix, already found one.

Auto skip at end of episode does not mark as played

As the title says if you auto skip some time at the end of episodes they won't get marked as played and when synchronizing on another device are shown as not played but played until close to the end.
I realize this should probably be fixed in AntennaPod, but since you also created the PR for the nextcloud gpodder AntennaPod stuff I thought I'd post this here.

Column "oc_gpodder_subscriptions"."subscribed" is type Bool and also NotNull

As mentioned here before by @arsenty, NC22+ (I'm on the latest master) throws an error when trying to enable the app:

Column "oc_gpodder_subscriptions"."subscribed" is type Bool and also NotNull, so it can not store "false".

This is due to some extra checks introduced in the MigrationService, it seems.
A solution could be:

$table->addColumn('subscribed', Types::BOOLEAN, [
	'notnull' => false,
]);

404 Error with AntennaPod

Hi I run a self hosted Nextcloud on debian server from official snap repository. I installed GPodderApp from nextcloud store as admin.

I setup my HTTPS://URL.IRL on AntennaPod with login (secondary user) and app-password.

Antenna Pod return : Bas Response Code : 404

Thank you !

Release for Nextcloud 23

Nextcloud 23 has been released as stable last week. Please release this app for Nextcloud 23.

Thanks in advance. Also a huge thank you for this app in general!

Only one entry in database for episodes with same download URL, but different guid

I'm debugging the syncing state of a few curious feeds with Kasts. There seem to be a few feeds which have duplicate entries of the same episode. These episodes have the same title, enclosure URL, description, but a different GUID. Those are probably some leftovers from the past in which they've accidentally added the same episode twice.

Anyway, when I'm marking all episodes of such a podcast on one device, then sync it across to another device using nextcloud-gpodder, then it turns out that only one of the duplicate episodes is marked as played on the second device. I've also checked the nextcloud-gpodder db table, and I can only see one entry.

If I then manually mark the second episode as played, and sync the state across, then the entry for the first episode disappears in the db table and gets replaced by an entry for the second.

I'm assuming that nextcloud-gpodder is still using the episode download URL as a "unique" column, even though you also have the guid in the table? Is that correct?

If so, are there any plans to change this in the near future? Or do you want to keep it that way to stay aligned with the original gpodder API? I'm just asking so I know how to deal with this on Kasts' end. I'm fine with either approach.

Failure when enabling app for Nextcloud 19

When using occ app:enable on Nextcloud 19, you'll get the following error:

Error: Class 'Doctrine\DBAL\Types\Types' not found in .../apps/gpoddersync/lib/Migration/Version0001Date20210520063113.php:39
Stack trace:
#0 .../lib/private/DB/MigrationService.php(478): OCA\GPodderSync\Migration\Version0001Date20210520063113->changeSchema(Object(OC\Migration\SimpleOutput), Object(Closure), Array)
#1 .../lib/private/DB/MigrationService.php(414): OC\DB\MigrationService->executeStep('0001Date2021052...', false)
#2 .../lib/private/Installer.php(157): OC\DB\MigrationService->migrate()
#3 .../core/Command/App/Enable.php(122): OC\Installer->installApp('gpoddersync', false)
#4 .../core/Command/App/Enable.php(92): OC\Core\Command\App\Enable->enableApp('gpoddersync', Array, false, Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 .../3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\App\Enable->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 .../3rdparty/symfony/console/Application.php(1012): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 .../3rdparty/symfony/console/Application.php(272): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\App\Enable), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 .../3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 .../lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 .../console.php(85): OC\Console\Application->run()
#11 .../occ(11): require_once('...

This has been found as part of an automated test. I do not run Nextcloud 19 anywhere, so I can't provide more information other than the full test log and its source code.

Since the app is rather new, I'd suggest to just remove support for Nextcloud 19, since NC19 has already reached its end of life.

run timestamp migration only on unmigrated data

The migration will be executed on every app update.
Since we deleted the (faulty) check for timestamp_epoch === 0 we will always override timestamp_epoch with old data from timestamp.

Todo: assert running migration won't change already migrated data.

Sync does not sync "done episodes"

I use this app with antennapod (current version from f-droid). It synced my Podcasts and the current playing status of the episodes i was currently not finished listening. However it does NOT sync whether an episode is already listened (completed).

Is this a known bug? this would be very helpful for me!

Error when attempting install from appstore

NextcloudPi arm64 21.0.4 release. When attempting to download and install from appstore:

Client error: `GET https://github.com/thrillfall/nextcloud-gpodder/raw/main/releases/gpoddersync-1.0.4.tar.gz` resulted in a `404 Not Found` response: <!DOCTYPE html> <html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark"> <head> (truncated...) 

Other clients than AntennaPod

Thanks for this syncing app!

Is it possible to sync other clients as well? I tried the official gpodder app but it could not connect to my instance.

Add LICENSE

Hey @thrillfall,

thanks for implementing this great app. I thought about helping to implement support for syncing to the Nextcloud Music app, and I might want to reuse (parts of) your code to implement that, depending on what makes sense (syncing the two databases of owncloud/music and this app or combining both to a single one a.k.a. implementing the API into the music app as well). However, your code is missing a license which makes it illegal to use your code without asking for permission before. So hereby I wanna ask you to add a license to this repository to make using/forking your code legal. If you don't know what license you want to use, you can either look into this comparison set up by GitHub or just use the AGPL 3.0 used by many other OwnCloud/Nextcloud apps as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.