KevinMidboe
fce8879994
Searching with adult parameter is now handled and also cached correctly.
2020-04-08 23:08:42 +02:00
KevinMidboe
505b126043
Cleanup, removed comments and logs.
2020-04-08 23:07:09 +02:00
KevinMidboe
589bd7b08d
Better comparison between plex and tmdb. Now also checks if plexTitle starts with tmdbTitle.
2020-04-08 23:05:56 +02:00
KevinMidboe
f0049ffb4e
Merge pull request #129 from KevinMidboe/feat/redis-cache
...
Feat/redis cache
2020-04-08 23:04:06 +02:00
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
KevinMidboe
b23566509f
Merge pull request #128 from KevinMidboe/fix/match-list-plex
...
Fixed issue matching list of plex object to tmdb.
2020-01-16 21:22:34 +01:00
KevinMidboe
341a07621d
Fixed issue matching list of plex object to tmdb.
...
We have a Plex function that allows us to input a tmdb object and a plex
search result too see if the tmdb object has anything similar when
searching in plex.
Fixed an issue where plex returned a list of items. This list is now
mapped over each list element.
2020-01-16 21:21:40 +01:00
KevinMidboe
259ed9b06f
Error. Fixed capitalization of file name.
2019-12-25 21:12:29 +01:00
KevinMidboe
cddf06cbcc
Travis should make a copy of the example development config.
2019-12-23 02:08:20 +01:00
KevinMidboe
318d1e331b
Merge pull request #124 from KevinMidboe/feature/plex-authentication
...
Feature plex authentication
v1.1.1
2019-12-23 01:39:43 +01:00
KevinMidboe
5923cbf051
Incorrect query parameter. Changed from (the not defined) plex_userid to username.
2019-12-22 13:49:16 +01:00
KevinMidboe
291bdf089c
Forget to rename copied link function to unlink
2019-12-22 13:42:13 +01:00
KevinMidboe
8eacde9ccc
Moved tautulli config settings to be fetched from our configuration (either env variable or conf/development.json.
2019-12-22 13:36:13 +01:00
KevinMidboe
f8847c62f2
UserRepository handles updating db settings better.
...
Moved the plex_userid to settings to expanded with functions for
updating and fetching settings, each with its own helper function
towards the database.
Since we had a linkPlexUserId function and we dont want plex_userid to
be updated from the updatesettings function we moved unlinking to a
separate endpoint and class function.
Also a new controller and endpoints for getting and updating settings.
2019-12-22 13:30:18 +01:00
KevinMidboe
ddb7e7379d
Every instance of sqlite database should have foreign_keys constraints on
2019-12-22 13:14:12 +01:00
KevinMidboe
720fb69648
Indentation
2019-12-22 12:45:01 +01:00
KevinMidboe
fedacf498e
Changed input parameter from name from user to username, cause we just get the username string.
2019-12-22 12:44:45 +01:00
KevinMidboe
9022853502
Sql schema now has requested_by as a foreign key for user_name and on delete set null clause.
2019-12-22 12:43:12 +01:00
KevinMidboe
c1b96e17ca
Moved database row plex_userid from user to a new table settings. Currently includes plex_userid, emoji and darkmode with user_name as a foreign key to user.user_name.
2019-12-20 21:45:31 +01:00
KevinMidboe
a5248f0631
TODO comment for login
2019-11-25 23:38:52 +01:00
KevinMidboe
e2d85c6242
Merged into master branch
2019-11-24 19:26:56 +01:00
KevinMidboe
510c014549
Added endpoint for getting plays grouped by days of week.
2019-11-11 17:59:16 +01:00
KevinMidboe
2650497986
Tautulli will serve all the tautulli api calls. Mostly this will be used by user requests for getting stats related to the logged in user. WIP but currently watch time stats, plays by number of days, and view history has been implemented.
...
TODO:
- Error handling if tautulli request fails.
- Filter the responses and/or limit them from tautulli
- Handle parsing variable parameters from request
2019-11-04 23:11:00 +01:00
KevinMidboe
639f0ec17a
Created middleware to check if the user has a plex user linked to seasoned account. If not respond with 403 meaning you did have a authorization key, but this is forbidden; explaining in the response message that no plex account user id was found for this user and to please authenticate their plex account at authenticate endpoint.
2019-11-04 23:04:42 +01:00
KevinMidboe
977d05c6f2
Refactor. Responses should return error string in object key message not error.
2019-11-04 22:58:42 +01:00
KevinMidboe
601fc1d0de
Renamed search_history controller to searchHistory
2019-11-04 22:57:59 +01:00
KevinMidboe
acc26a2f09
Renamed user history to search_history and fixed an issue where search history received the entire user object and not just the username
2019-11-04 20:32:41 +01:00
KevinMidboe
5d3a5dc8a4
Removed unused console log
2019-11-04 18:46:42 +01:00
KevinMidboe
3bb9bd84d9
Merge branch 'master' into feature/plex-authentication
2019-11-04 18:24:19 +01:00
KevinMidboe
ea5bc36956
Merge pull request #111 from KevinMidboe/api/v2
...
Api/v2
1.1.0
2019-11-04 18:01:15 +01:00
KevinMidboe
002e663be1
Merge branch 'api/v2' into feature/plex-authentication
2019-11-04 17:55:27 +01:00
KevinMidboe
fd475265c1
Updated test to reflect changes to all error response objects. (changed from returning message in error key to message.
2019-11-04 17:54:08 +01:00
KevinMidboe
495a3b4838
Merged api/v2 into feature branch
2019-11-04 00:58:43 +01:00
KevinMidboe
b0804f8a08
Merge branch 'api/v2' of github.com:kevinmidboe/seasonedShows into api/v2
2019-11-04 00:57:45 +01:00
KevinMidboe
6b737b8ab4
Updated all controller responses to return message not error on errors.
2019-11-04 00:57:27 +01:00
KevinMidboe
9e2a0101c9
Added new formdata pacakge
2019-11-04 00:44:57 +01:00
KevinMidboe
05b001de2e
Created endpoint for authenticating with plex and linking your plex user to the logged in seasoned user. User database table gets a new plex_userid column. This will be used to fetch tautulli stats for your account.
2019-11-04 00:43:42 +01:00