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
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
495a3b4838
Merged api/v2 into feature branch
2019-11-04 00:58:43 +01:00
KevinMidboe
6b737b8ab4
Updated all controller responses to return message not error on errors.
2019-11-04 00:57:27 +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
KevinMidboe
f8cc19b510
Added rating and release_date when parsing movies and fixed respective tests
2019-11-03 20:56:46 +01:00
KevinMidboe
b802a7b62b
Moved, renamed, re-did and added a lot of stuff. Getting ready for the v2 upgrade
2019-11-03 20:33:30 +01:00
KevinMidboe
879a02b388
Finished movie credits and release dates
2019-11-03 16:01:19 +01:00
KevinMidboe
bc3d4881bd
New release_dates endpoint for movie
2019-11-03 15:43:35 +01:00
KevinMidboe
ef8d4d90b2
Removed console log
2019-11-03 15:08:42 +01:00
KevinMidboe
d2d396bb7a
Set cache TTL for credits to 1 day
2019-11-03 15:07:11 +01:00
KevinMidboe
500b75eaf6
We know there could be a 401 response so we handle it
2019-11-03 15:04:14 +01:00
KevinMidboe
9308d4ea9b
Credits endpoint for movies
2019-11-03 15:02:45 +01:00
KevinMidboe
6c2c81a1a1
Updated movieInfo controller to also handle requesting release_dates as query parameter
2019-10-04 22:36:39 +02:00
KevinMidboe
90aa4d2485
Rewrote the movie & show list controller to be more abstract and easier to extend later
2019-10-04 21:21:52 +02:00
KevinMidboe
0ca3f81bf8
listController first defines all async functions as constant variables then module exports them all as a dict
2019-10-04 20:55:39 +02:00
KevinMidboe
b9831c6b3d
Forgot to reasing variables after copy-pasting them in convertTmdbToMovie
2019-10-04 20:37:06 +02:00
KevinMidboe
8e23ae5a27
Added babel for ES6 functionality. In this case the new import statements
2019-07-27 01:28:41 +02:00
KevinMidboe
04ba094a14
Throw more errors and cleanup some unmerged code
2019-07-26 21:55:59 +02:00
KevinMidboe
23f9911237
Throw errors when failing to create user
2019-07-26 21:54:13 +02:00
KevinMidboe
3b27af1f83
Error handling for themoviedb api response codes that are not 200. Started with 401 and 404. See issue #116 for info.
2019-07-26 21:52:20 +02:00
KevinMidboe
c42195d242
Removed swap file
2019-07-25 00:53:40 +02:00
KevinMidboe
a5aaf1bfca
Merge branch 'api/v2' of github.com:KevinMidboe/seasonedShows into api/v2
2019-07-25 00:53:16 +02:00
KevinMidboe
af7b1f2424
Script for updating all requested and downloading request status to downloaded if exist in plex
2019-07-25 00:48:16 +02:00
KevinMidboe
6aba9774c6
When requesting all request elements we now also return the page as int not string
2019-07-25 00:47:17 +02:00
KevinMidboe
e19cfb5870
Updated formatting
2019-07-25 00:24:04 +02:00
KevinMidboe
144b27f128
Renamed token variable from user to username
2019-07-25 00:23:32 +02:00
KevinMidboe
12afbf6364
Tokens can also have a admin property. When admin is defined its included in the jwt token.
2019-07-25 00:13:28 +02:00
KevinMidboe
8a5ab204e1
Change node bcrypt package from bcrypt-nodejs to bcrypt. Change response message on invalid username/pass and changed to bcrypt syntax for compare and hash.
2019-07-24 23:02:06 +02:00
KevinMidboe
3f04d9bc56
Update script for updating all plex statuses of requestes.
2019-07-24 23:02:06 +02:00
KevinMidboe
de50805d1e
Handle both status code 301 and 302 from jackett
2019-07-15 18:16:46 +02:00
KevinMidboe
3a9131a022
Removed, commented and added comments
2019-07-02 23:53:26 +02:00
KevinMidboe
77433e8505
Query of plex search is now encoded
2019-07-02 23:53:08 +02:00
KevinMidboe
3845000b3f
Allow filtering for requested items by status
2019-06-28 23:32:11 +02:00
KevinMidboe
071fd54825
Pages for requests are only calulated for items not yet downloaded and use ceil isteadof floor to get last items on a page
2019-06-28 22:51:09 +02:00
KevinMidboe
d3bc854e03
Pirate repository has relative and use virtuale python when running python commands
2019-06-28 22:44:39 +02:00
KevinMidboe
15826a00ba
plexRepo now using class instance plexIp address
2019-06-28 22:42:11 +02:00
KevinMidboe
91dcfaccb9
Rewrote posting request controller to handle body parameters and use new requestsRepository function istead of plexRepository functions
2019-06-28 22:31:52 +02:00