Kevin 628ed52012 Fix: Tests lint and src folder (#138)
* 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
2022-08-20 17:41:46 +02:00
2022-08-17 01:00:09 +02:00
2022-08-20 17:41:46 +02:00
2017-03-05 00:03:08 +01:00

🌶 seasonedShows

Season your media library with the shows and movies that you and your friends want.

Drone CI

D & DAboutKey featuresInstallationSetupRunningSetup daemonContributing

Demo & Documentation

📺 DEMO
📝 Documentation of the api.
💖 Checkout my fancy vue.js page for interfacing the api.

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.

Key features

Code

  • Uses tmdb 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 to search for torrents
  • Fetch curated lists from tmdb

Installation

Before we can use seasonedShows we need to download node and a package manager. For instructions on how to install yarn or npm package managers refer to 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.

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
  • Type: git clone --recurse-submodules git@github.com:KevinMidboe/seasonedShows.git
  • Type: cd seasonedShows/
  • Install required packages
    • yarn: yarn install
    • npm: npm install
  • Start server:
    • yarn: yarn start
    • npm: npm run start
  • seasonedShows will now be running at http://localhost:31459
  • To have seasonedShows run headless on startup, check out this wiki page to [install as a daemon].

Linux

  • Open terminal
  • Install git
    • Ubuntu/Debian: sudo apt-get install git-core
    • Fedora: sudo yum install git
  • Type: git clone --recurse-submodules git@github.com:KevinMidboe/seasonedShows.git
  • Type: cd seasonedShows/
  • Install required packages
    • yarn: yarn install
    • npm: npm install
  • Start server:
    • yarn: yarn start
    • npm: npm run start
  • seasonedShows will now be running at http://localhost:31459
  • To have seasonedShows run headless on startup, check out this wiki page to [install as a daemon].

-- same -- (install yarn or npm in a different way) After you have installed the required packages you will have a node_modules directory with all the packages required in packages.json.

Requirements

  • Node 7.6 < [wiki page]
  • Plex library

Setup and/ configuration

There is a config file template, what the values mean and how to change them. Also show how to hide file from git if not want to show up as uncommitted file. Also set variables in environment.

Running/using

yarn/npm start. (can also say this above) How to create service on linux. This means that

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 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.

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 api to search for from over 350k movies and 70k tv shows. Using hjone72 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.

Description
seasoned api 🌶 | Season your media library with the shows and movies that you and your friends want
Readme 1.8 MiB
Languages
JavaScript 78.2%
Python 19.9%
HTML 1%
TypeScript 0.4%
SCSS 0.2%
Other 0.3%