Releases: KevinMidboe/seasonedShows
Plex authentication and user activity graphs from tautulli
Proposed feature
Want to bring more features and usefullnes to the frontend of seasonedShows. We have a lot of user data that could be interesting for the viewers to see. Don't want to give access to view everyone elses data. The goal is to fetch user data and display it on the profile page of seasoned.
How do we do the access rights to personal user data?
Feature plex authentication #124
- Tatulli great api
- Only save the userid.
- What this means if they aren't in my library or I have removed them?
⚠️ The following is from the resolving Pull Request #124 comment:
Closes issues
#120 Link seasoned account with plex
#122 -User activity
Features
- link and unlink seasoned account with plex account
- NEW! Settings table with:
- plex user_id
- darkmode preference
- emoji preference
- middleware to check if the user has a plex-linked account
- local tautulli support for user -activity and history.
- get graphs and user activity based on the plex_userid linked to your seasoned account
- (endpoints)
TODO list
✅ user should know if they are authenticate or not. (seasoned request settings page should not display authenticate if authenticated, but should have the option to re-authenticate). E.g. /api/user/settings
Misc
Every instance of sqlite now starts with executing pragma foreign_keys = on
. This enables cascading and updating on delete of primary (user).
api/v2 upgrade
Most everything has been refactored or it's structure updated or changed. We have tons of new endpoints and resolved some long-standing issues. Responses and test have also been worked on to be covering more of the codebase.
FROM PR #111 Api/v2
Too much to comment. Everything has been refactored and there might be some bugs or formatting/structure inconsistencies still.
Closing PR even though everything should have been commented and documented, but I want to get on with my life 🌝 Complete refactor will come later.
TMDB
endpoint: Info
- /v2/movie/:id
- /v2/show/:id
- /v2/person/:id
Info for the movie, show & person has been rewritten to each having their own [movie|show|person]Info controller, converter from tmdb and functions that each create class object of class movie, show or person and returns them as json.
endpoint: Search
- /v2/multi?query
- /v2/movie?query
- /v2/show?query
- /v2/person?query
Each search operation has their own endpoint with query params. When searching under multisearch the response is mapped to create movie, show or person class objects.
endpoint: List
- /v2/movie/:listname
- /v2/show/:listname
Listnames available for movies are: now playing, popular, top rated and upcoming; & for shows: now playing, popular and top rated.
class: Types (movie, show & person)
Types movie, show and person added to Types folder in tmdb (src/tmdb/types/)
Plex
endpoint: Plex Search
- /v2/plex/search?query
Searches local plex library defined by plex: ip in conf/development. In the response we are interested in media of type movie, show or episode. If they are found the media responses are converted to class functions of type; movie, show or episode, before returned as json objects.
function: existsInPlex(tmdb)
Based on a tmdb input and searches based on tmdb.title and checks if the response title and type match. If they do a existsInPlex=true object variable is added to the tmdb object.
Request
endpoint: Request
- GET /v2/request : handles query params for sort, filter and query
- POST /v2/request : required body params = {id, type}
Handling of sort, filter and querying has been improved to neatly be handled with modular promise returning functions for (checking if valid) sort, filter and query.
User data transfer handling and JWT
While authenticated before we would return a json object with the
asdf
sdf
asd
now we send the authorization JWT token with body including the token token: JWT_TOKEN
and conditionally if admin user a boolean admin: true
.
User cryptography
()[8a5ab20]
Changed node package for creating a hashed password from bcrypt-nodejs: v0.0.3
to bcrypt: v3.0.6
.
Altered response message for invalid credentials.
When hashing we use 10 saltRounds ()[salt rounds]
Updating request status by searching for existence in plex
Testing and documentation
Added documentation package and yarn commands script commands for generating documentation. [6f9ca9e]
- Upgrade mocha
Tests
Cleaned up formatting and better about how and when we cache or create requests.
Example config file
- Example config create to be copied to development.config and filled out. 4019d63
Updates to deluge and fixes reflecting changes to plex api
Merge pull request #106 from KevinMidboe/remove_verified Remove verified
Added support for show names with numbers when parsing stray episodes
Added support for show names with numbers when parsing stray episodes.
This allows shows like The 100 to be parsed correctly.
Improved test coverage and added paging to requests/all.
Improved test coverage and added paging to requests/all.
Also did some linting improvements to tmdb.js and made it easier to run tests with a test.json config file and better caching before requests are made to tmdb api.
Testing improvements and paging for requested items
Testing improvements and paging for requested items.
Added unit tests for config file.
Tmdb has better docstrings.
Fixed bug where some queries where not filtered by sql
Fix to api/v1/plex/requests/all endpoint where now when adding a status query it also filters the result like when doing a request without a status query.
Start using releases for production deployment
Start using releases for production deployment