Giter Site home page Giter Site logo

eanzie / sonarr-pogdesign-importer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from madslundt/sonarr-pogdesign-importer

0.0 0.0 0.0 1.31 MB

Scrapes pogdesign and trakt for new tv series and import them to Sonarr

License: MIT License

TypeScript 99.82% JavaScript 0.18%

sonarr-pogdesign-importer's Introduction

About

Scrape tv series from either Pogdesign and/or Trakt and import them into Sonarr based on ratings and genre. Pogdesign rating is how many users have selected the tv show. Trakt rating is the rating from 0-100. When the tv series have been found from Trakt and/or Pogdesign it is being looked up in Sonarr and based on the genre from Sonarr it is imported into Sonarr for later download.

Install

npm i -g sonarr-pogdesign-importer

Run

sonarr-pogdesign-importer --config="[CONFIG PATH]"

or

sonarr-pogdesign-importer -c "[CONFIG PATH]"

Create config

Create a config.json file some where with the following content:

{
    "genresIgnored": ["comedy", "documentary"],
    "networksExactIgnored": ["the cw"],
    "networksContainIgnored": ["kids", "disney", "pbs", "teen", "nick"],
    "sonarr": {
        "url": "http://localhost:8989",
        "apiKey": "abcdef12345",
        "profileId": 1,
        "path": "/tv/",
        "useSeasonFolder": true
    },
    "scrapers": [
        {
            "type": "pogdesign",
            "monthsForward": 3,
            "minimumStars": 5000
        },
        {
            "type": "trakt",
            "apiKey": "abcdef12345",
            "listName": "trending",
            "minimumRating": 70,
            "fromYear": 2018,
            "toYear": 2020,
            "countries": ["us", "ca", "uk"],
            "languages": ["en"],
            "statuses": ["returning series", "in production", "planned"]
        }
    ],
    "verbose": false,
    "test": false
}

genresIgnored: Genres to be ignored. If a series contain one of the genres in the list it is not imported to Sonarr.

networksExactIgnored: Networks to be ignored. If a series exactly contain one of the networks (case insensitive) in the list it is not imported to Sonarr. Example: "disney channel" only matches "Disney Channel" and not others as in below.

networksContainIgnored: Networks to be ignored. If a series contain one of the networks names (case insensitive) in the list it is not imported to Sonarr. Example: "disney" matches ["Disney Channel, Disney Junior, Disney XD, Disney+, etc"].

verbose: If you want to include verbose. Can be ignored.

test: If you want to test it without adding series to Sonarr. Can be ignored

sonarr: Sonarr configurations see Sonarr section

scrapers: A list of scrapers. See scraper section

Sonarr

url: Sonarr url. Has to include http protocol and port.

apiKey: Api key for Sonarr. Can be found in sonarr under Settings > General > Security > API Key

profileId: Profile id in Sonarr. Must be greater than 0. Can be found by running sonarr-pogdesign-importer --config="[CONFIG PATH]" --profiles or sonarr-pogdesign-importer -c "[CONFIG PATH]" --profiles.

path: Where Sonarr should store the series. Can be found by running sonarr-pogdesign-importer --config="[CONFIG PATH]" --paths or sonarr-pogdesign-importer -c "[CONFIG PATH]" --paths.

useSeasonFolder: If sonarr should create season folders for the series.

Scraper

type: Type must always be declared for each scraper. At this time it can be either pogdesign or trakt.

There are no limit on how many scraper configurations you fill in, as long as they match configuration for either pogdesign or trakt. Atleast one scraper is required.

Pogdesign

monthsForward: Lookups up series from current month and X months in the future. 0 means only current month.

minimumStars: Minimum users who has given an interest in the series. Pogdesign writes "Selected by X Users"

Trakt

apiKey: Your own api key for Trakt.

listName: List that you want to crawl from on Trakt. Can be either trending, popular,watched, collected, anticipated or new.

minimumRating: Minimum rating for a show to be imported to Sonarr. Must be between 0 and 100. Minimum rating is ignored when having list name set to new.

fromYear: Start year for a show to be released after. If this is not specified it will look from current year. Start year is ignored when having list name set to new.

endYear End year for a show to be released within. If this is not specified it will be set to 10 years ahead of current year. End year is ignored when having list name set to new.

countries List of country codes you only want to include. Example: ["us", "ca", "gb"].

languages List of languages you only want to include. Example: ["en"].

statuses List of statuses you only want to include. Can be one or more of returning series, in production, planned, canceled or ended.

networks List of networks you only want to include. Example: ["HBO", "NBC", "CBS"].

Trakt Data Lookup

To view all supported counties: (replace client_id with your api key)

curl --include \
     --header "Content-Type: application/json" \
     --header "trakt-api-version: 2" \
     --header "trakt-api-key: [client_id]" \
  'https://api.trakt.tv/countries/shows'

To view all supported languages: (replace client_id with your api key)

curl --include \
     --header "Content-Type: application/json" \
     --header "trakt-api-version: 2" \
     --header "trakt-api-key: [client_id]" \
  'https://api.trakt.tv/languages/shows'

To view all supported networks (replace client_id with your api key)

curl --include \
     --header "Content-Type: application/json" \
     --header "trakt-api-version: 2" \
     --header "trakt-api-key: [client_id]" \
  'https://api.trakt.tv/networks'

Run from source

  1. Clone this repository.
  2. Create config.json file
  3. Change files in /src and transpile them to js by using the command tsc (you need to have tsc installed globally npm i -g typescript)
  4. Go to /dist and run node index --config="[CONFIG PATH]" or node index -c "[CONFIG PATH]"

sonarr-pogdesign-importer's People

Contributors

madslundt avatar dependabot[bot] avatar brandonm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.