[spotify] Scan spotify podcast subscriptions into library

This commit is contained in:
chme
2021-05-16 06:10:47 +02:00
parent e63aba61c5
commit 24450bc90a
5 changed files with 153 additions and 1 deletions

View File

@@ -144,3 +144,14 @@ spotify_status_get(struct spotify_status *status)
backend->status_get(status);
}
bool
spotify_podcast_support()
{
struct spotify_backend *backend = backend_set();
if (!backend)
return false;
return backend->has_podcast_support;
}

View File

@@ -21,6 +21,8 @@ struct spotify_backend
int (*relogin)(void);
void (*uri_register)(const char *uri);
void (*status_get)(struct spotify_status *status);
bool has_podcast_support;
};
int
@@ -47,4 +49,7 @@ spotify_uri_register(const char *uri);
void
spotify_status_get(struct spotify_status *status);
bool
spotify_podcast_support();
#endif /* !__SPOTIFY_H__ */

View File

@@ -749,5 +749,7 @@ struct spotify_backend spotify_librespotc =
.logout = logout,
.relogin = relogin,
.status_get = status_get,
.has_podcast_support = true,
};

View File

@@ -129,5 +129,7 @@ struct spotify_backend spotify_libspotify =
.relogin = libspotify_relogin,
.uri_register = libspotify_uri_register,
.status_get = status_get,
.has_podcast_support = false,
};