* Python packages should be installed as modules, and not use source files
* Use child_process spawn to call command and return data
* Consistent error rejection & resolve around spawn calls.
* Updated README to remove submodule ref & added how to install pip pcks.
* Resovled linting issue
* Removed python-shell package
* Disable stray functionality, unused & has dep to python-shell
* Uncommented/disabled python-shell dependency in strayRepository.
* All file imports change from commonjs to es-module
* Improved plex error responses back from api
* Converted viewHistory to es module
* Es-module requires file extension, updated all imports
* Fix esmodule not having __dirname defined in scope
* Replace dynamic-require with fs readFileSync
* Short message service module function is exported as default
* Resolved lint issues & ignore import/extension rule until typescript
* All tests file imports changed from commonjs to es-module
* Import json fixtures with new helper
* Automaticly fixable eslint issues, mostly 3 -> 2 space indentation
* fix: updated plex_userid to camelcase
* Linted and some consistency refactor on middleware
* eslint uses ecmaversion 2020 & allow empty catch rule
* Started linting source files
* Fixed eslint errors & improved a lot of error handling
* Set 2 eslint rules as warning temporarly
* Updated all import statements to be relative
* Updated mocha & nyc, resolved all lint issues in tests/
* Updated mocha & nyc. Removed production config. Updated gitignore
* Updated test commands to omit system tests, no exit code
* Updated test configuration w/ missing keys
* Chai modules defined in package.json & resolved linting errors
* Dockerfile copies development.example -> production.json. Simplified commands
* All api calls from tests use same chaiHttp implementation
Removes a list of fetch alternatives after being replaced by chaiHttp:
- request
- request-promise
- supertest
- supertest-as-promised
* Tests should use redis (mock) cache, not tmdb sqlite cache
* Disabled test asADeveloperIWantTheServerToStart
* Re-enable tests/system
* Use chaiHttp in asAUserIWantToRequestAMovie.
* Fixed redis expire & mock implmentation
* Replaced all fetch alternatives from source code and package.json
* Pass error from tmdb api back to client as errorMessage
* Updated authentication middleware to handle checks consitenctly
* Prevent assert error when checking request status, returns success 200
* Resolved merge conflicts
* Only build and publish docker container when branch master
- 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).
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.
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.
TODO:
- Error handling if tautulli request fails.
- Filter the responses and/or limit them from tautulli
- Handle parsing variable parameters from request
💖 Checkout my [fancy vue.js page](https://github.com/KevinMidboe/seasonedRequest) for interfacing the api.
💖 Checkout my [fancy vue.js page](https://github.com/KevinMidboe/seasoned) for interfacing the api.
## <a name="about"></a> About
This is the backend api for [seasoned request] that allows for uesrs to request movies and shows by fetching movies from themoviedb api and checks them with your plex library to identify if a movie is already present or not. This api allows to search my query, get themoviedb movie lists like popular and now playing, all while checking if the item is already in your plex library. Your friends can create users to see what movies or shows they have requested and searched for.
The api also uses torrent_search to search for matching torrents and returns results from any site or service available from torrent_search. As a admin of the site you can query torrent_search and return a magnet link that can be added to a autoadd folder of your favorite torrent client.
## <a name="key-features"></a> Key features
### Code
- Uses [tmdb api](https://www.themoviedb.org/documentation/api) with over 350k movies and 70k tv shows
- Written asynchronously
- Uses caching for external requests
- Test coverage
- CI and dependency integrated
- Use either config file or env_variables
### Functionality
- Queries plex library to check if items exists
- Create admin and normal user accounts
- [torrent_search](https://github.com/KevinMidboe/torrent_search) to search for torrents
- Fetch curated lists from tmdb
## <a name="installation"></a> Installation
Before we can use seasonedShows we need to download node and a package manager. For instructions on how to install [yarn](https://yarnpkg.com/en/) or [npm](https://www.npmjs.com) package managers refer to [wiki: install package manager](https://github.com/KevinMidboe/seasonedShows/wiki/Install-package-manager). This api is written with express using node.js as the JavaScript runtime engine. To download node.js head over the the official [node.js download page](https://nodejs.org/en/download/).
### Install seasonedShows
After you have downloaded a package manager and node.js javascript engine, the following will guide you through how to download, install and run seasonedShows.
### macOS
- Open terminal
- Install git. This can be done by running `xcode-select --install` in your favorite terminal.
- Install a package manager, refer to this [wiki page] for yarn or [wiki page] for npm
Most important values to change here is adding [TMDB api key](https://developers.themoviedb.org/3/getting-started/introduction) and plex server IP.
### Optional setup
To allow authenticated or admin users add items [delugeClient](https://github.com/kevinmidboe/delugeClient) & [torrentSearch](https://github.com/KevinMidboe/torrent_search) can be setup to fetch and add magnet files. Both require python version >= 3.8 and can be downloaded using following pip command:
```bash
pip3 install delugeClient_kevin torrent_search
```
Both of these need to be configured, view their separate README's or find configuration files under `$HOME/.config/`.
## <a name="running"></a> Running/using
yarn/npm start. (can also say this above)
How to create service on linux. This means that
## <a name="daemon"></a> Setup a daemon
The next step is to setup seasonedShows api to run in the background as a daemon. I have written a [wiki page](https://github.com/KevinMidboe/seasonedShows/wiki/Install-as-a-daemon) on how to create a daemon on several unix distors and macOS.
*Please don't hesitate to add your own system if you get it running on something that is not yet lists on the formentioned wiki page.*
_Please don't hesitate to add your own system if you get it running on something that is not yet lists on the formentioned wiki page._
## <a name="contributing"></a> Contributing
- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request
## Api documentation
The goal of this project is to create a full custom stack that can to everything surround downloading, organizing and notifiyng of new media. From the top down we have a website using [tmdb](https://www.themoviedb.com) api to search for from over 350k movies and 70k tv shows. Using [hjone72](https://github.com/hjone72/PlexAuth) great PHP reverse proxy we can have a secure way of allowing users to login with their plex credentials which limits request capabilites to only users that are authenticated to use your plex library.
seasonedShows is a intelligent organizer for your tv show episodes. It is made to automate and simplify to process of renaming and moving newly downloaded tv show episodes following Plex file naming and placement.
So this is a multipart system that lets your plex users request movies, and then from the admin page the owner can.
## Installation
There are two main ways of
## Architecture
The flow of the system will first check for new folders in your tv shows directory, if a new file is found it's contents are analyzed, stored and tweets suggested changes to it's contents to use_admin.
Then there is a script for looking for replies on twitter by user_admin, if caanges are needed, it handles the changes specified and updates dtabbase.
After approval by user the files are modified and moved to folders in resptected area. If error occours, pasteee link if log is sent to user.
#### External
+ Seasoned: request, discover and manage.
+ Stray: Overview of downloaded episodes before they are organized.
+ (+) Admin Panel: Overview of all stray episodes/movies.
#### Api
+ All communication between public website to server.
+ Plex: All querying to what is localy available in your plex library.
+ Stray (seasoned) -> also calls services (moveStray) through api.
+ Tmdb: Requesting information from tmdb.
+ (+) Admin Panel: Use secure login and session tokens to handle logged in viewer.
#### Services
+ Parse directories for new content.
+ Extract and save in db information about stray item.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.