Commit Graph

83 Commits

Author SHA1 Message Date
6b737b8ab4 Updated all controller responses to return message not error on errors. 2019-11-04 00:57:27 +01:00
f8cc19b510 Added rating and release_date when parsing movies and fixed respective tests 2019-11-03 20:56:46 +01:00
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
879a02b388 Finished movie credits and release dates 2019-11-03 16:01:19 +01:00
bc3d4881bd New release_dates endpoint for movie 2019-11-03 15:43:35 +01:00
9308d4ea9b Credits endpoint for movies 2019-11-03 15:02:45 +01:00
6c2c81a1a1 Updated movieInfo controller to also handle requesting release_dates as query parameter 2019-10-04 22:36:39 +02:00
90aa4d2485 Rewrote the movie & show list controller to be more abstract and easier to extend later 2019-10-04 21:21:52 +02:00
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
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
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
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
162d20ae52 Submitting requests now use requests repository 2019-06-28 21:51:11 +02:00
9f1badc1b1 Get a request item by id and type 2019-06-28 19:21:54 +02:00
127db88ded Renamed function name and comment to make for sense. Also deconstruct page from query 2019-06-28 18:45:53 +02:00
4b07434615 Imported configuration with incorrect name 2019-06-05 00:05:54 +02:00
476a34fb69 Changed the order of execution between getting tmdb movie and searching plex for it. Now we await tmdb movie and then check if exists in plex. This is better when we miss plex request 2019-06-04 23:47:10 +02:00
e3ed08e8dd Now a plex ip address is dynamically passed into the plexrepository, fetched from the config 2019-06-04 23:45:22 +02:00
99bab3fb73 Movie and show can also return credits for a item. Enabled by query parameter credits=true 2019-06-04 23:32:38 +02:00
7cb55ce054 Fetchall uses promises smarter. Now the utils functions also return promises to be able to nicely chain the steps a request needs to go through. Promise all lets us wait for all items return in the map function. Without the map function would return immidiately and resolve before the map operation completed. 2018-11-10 20:26:28 +01:00
840816c930 request returns all requested items. Optional sort, query and filter params. 2018-11-10 01:50:24 +01:00
91d238de7c Request id is now passed as body param. Database default timestamp value changed to epoch time. 2018-11-09 22:13:00 +01:00
22e57c03de Controller for movie and shows. Each have multiple small export functions; one for each list search type 2018-11-01 00:16:56 +01:00
4250b1bd17 request endpoint finds type by body not query. Better error handling on what goes wrong if incorrect type or missing body parameter. 2018-10-30 20:34:26 +01:00
5a48158f07 Request now happens at /request with id parameter and query for type selection. Only allows movie or show type and is static set in the controller. AddRequest adds tmdb item to database with time of request. 2018-10-30 19:20:52 +01:00
161a466ab7 Rewrote how local plex library is indexed and what it returns. After searching plex the response is separated into three classes by types (movie, show & episode). Plex also has a function for inputing a (tmdb)movie object and searching for matches of name & type in plex. If a match the object matchedInPlex variable is set to true. 2018-10-29 21:01:16 +01:00
5d8869e042 Rewrote every function for searching and looking up items from tmdb library. Now there are separate functions for the four categories of search and three for info (multi, movie, show & person). Each function now has its own endpoint and matching controller. Converting tmdb results into a class has been alterted from using three classes; movie, show & person, and each have each their own convertTmdbTo function. Now the structure of the three types are more structured and no longer a single "seasoned" class object. 2018-10-29 20:55:18 +01:00
41d6bba743 v2 endpoints added for clearer intent in endpoints. Two new controller categories; info and search. 2018-10-28 12:21:47 +01:00
a29bca7361 Controller now expects three parameters for posting to addMagnet; magnet, name and tmdb_id. 2018-08-12 23:59:26 +02:00
ed07c77b13 Updated files with tripple === and some linting issues. 2018-05-06 18:23:29 +02:00
18359f442c Mapped results in tmdb now returns the complete json object so not needed to be created before sent. When getting all requested movies and shows it is now possible to only get one page at a time. 2018-03-20 21:17:41 +01:00
996295b1fe Removed the id parameter, not used. 2018-03-20 20:14:44 +01:00
8fbd0eb9d8 Also unpacks the value of username before passing it to searchHistory. 2018-03-08 10:33:04 +01:00
127db8b2fe Errors when we have a user that was not signed in. Fixed to unpack the username value first, then pass it to the function. 2018-03-08 10:32:19 +01:00
1a4aefda14 Get the user variable from req not req.headers 2018-03-07 18:12:21 +01:00
453727db1b Fixed issue where the user was not being saved alongside the request. Also fixed what the list of requests are sorted by. 2018-03-07 15:35:55 +01:00
ab2d3c6756 Renamed function name and now returns 500 error when a problem is found. 2018-03-07 14:57:18 +01:00
ba96e27c43 Alongside the token the value of admin state is also sent. 2018-03-07 01:35:40 +01:00
fac9e0e425 Added a endpoint to fetch a random emoji. 2018-03-06 22:02:32 +01:00
02c36d041a Removed console.log and fixed docstring comment. 2018-03-06 19:30:11 +01:00
7c4aeb48ab When registering a token is also returned so we dont need to sign in after registration. 2018-03-06 19:26:28 +01:00
ca146d77bc Fixed error message 2018-03-06 19:25:33 +01:00
cede376349 Was not using the registered loggedInUser variable, but one passed by client 2018-03-06 19:24:58 +01:00
e11dfc7712 Renamed class name. 2018-03-06 19:23:11 +01:00
1a693ef92f Our new controller for getting a users requested items. 2018-03-06 19:21:55 +01:00
08b373cba0 Response results are now saved in the object results instead of torrents 2018-02-26 19:58:54 +01:00
ec0923f1c0 Can now filter the response by status. 2018-02-26 17:17:37 +01:00
34982c14fe Linted all controllers 2018-02-07 13:51:57 +01:00
af64a4e28a Removed and clean up function and formatting. 2018-02-05 22:48:41 +01:00
cefbb5e41c Added length of elements in return statement as total_results in api response. 2018-02-05 13:44:13 +01:00