KevinMidboe
2b25397253
Misc updates to caching from plex and tmdb.
2020-04-08 23:01:33 +02:00
KevinMidboe
776f83553a
Changed more instances of tmdb to new TMDB constructor not needing cache instance anymore.
2020-04-08 22:59:23 +02:00
KevinMidboe
815aaedffb
Changed tmdb constructor to have apiKey as first parameter. If cache is not defined we use redis.
2020-04-08 22:54:19 +02:00
KevinMidboe
578eff30fb
Id of request has been incorrectly saved as string, this has dictated the returntype to the frontend. Now set from string to int.
2020-04-08 21:58:37 +02:00
KevinMidboe
943cbe5cb8
Return rejected promise and don't set cache if key or value is null.
2020-04-08 21:57:49 +02:00
KevinMidboe
f89db46bf2
findPlexItemByTitleAndYear returns a promise so we await its response.
2020-02-21 23:09:42 +01:00
KevinMidboe
085fb76e11
Cache pirate respons for 3 hours in redis.
2020-02-21 22:09:42 +01:00
KevinMidboe
aa4a1c2a57
Registed route watch-link, by title & year
...
Fetch watch link for plex item matching query parameters title and year.
2020-02-21 21:53:51 +01:00
KevinMidboe
74340afd16
Full re-write. Refactored, cache and watchlink.
...
- Now the api calls to plex are cached.
- Search function has been refactored.
- Exists in plex has been re-written to use findPlexItemByTitleAndYear
if anything is found we return true. findPlexItemByTitleAndYear is then
also used for our new endpoint to get direct watch link for plex item.
Function parameters are title and year. Title is used when querying plex
and year is used with title to match correct plex search result. The
direct link includes the machine identifier so a function was added to
get system information from plex (read: 'PLEX_URL/' e.g. base path).
2020-02-21 21:53:19 +01:00
KevinMidboe
2672266908
Simplified every function towards tmdb by having the shared functionality separated into a function.
2020-02-21 21:47:00 +01:00
KevinMidboe
f37786aa76
Redis cache script with get and set functions.
...
This replaces old way of caching to sqlite. Still have same
functionality, so users of old cache functions just need to rename their
import.
2020-02-21 18:11:39 +01:00
KevinMidboe
91f64e5cfb
Redis new dependency
2020-02-21 18:09:04 +01:00
KevinMidboe
a4d3123910
Stricter check for plex search results.
2020-01-16 21:25:45 +01:00
KevinMidboe
bc6fe3ed48
Encode search query before searching plex.
2020-01-16 21:25:13 +01:00