Giter VIP home page Giter VIP logo

trakt_vip_stats's Introduction

Trakt All Time Stats

Trakt all-time-stats without Trakt VIP.

Prerequisite

Installation

    1. Clone the repository:
      git clone https://github.com/Ahmedazim7804/trakt_vip_stats
    1. Change to project directory:
      cd trakt_vip_stats
    1. Install the dependencies:
      pip install -r requirements.txt

Usage

Basic Usage:

  • Populate .env file in repo directory.
    username = "your trakt username"
    trakt_client_id = "your trakt client id"
    trakt_client_secret = "your trakt client secret"
    tmdb_api_key = "your tmdb api key"
python main.py run --save

It will authenticate and get all neccessary data from trakt and tmdb api, and then generate all-time-stats.json

Command run

Create database.db with required all data from trakt to database.db.

usage: TraktVipStats run [-h] [--save] [--log-level {ERROR,INFO,DEBUG,WARNING}] [--print-time]

options:
  -h, --help            show this help message and exit
  --save
  --log-level {ERROR,INFO,DEBUG,WARNING}
  --print-time

Command update

Updates specified data from trakt to database.db

usage: TraktVipStats update [-h] [--save] [--log-level {ERROR,INFO,DEBUG,WARNING}] {movies,tv,ratings,lists}

positional arguments:
  {movies,tv,ratings,lists}

options:
  -h, --help            show this help message and exit
  --save
  --log-level {ERROR,INFO,DEBUG,WARNING}

Example: Let's say you tracked some new movie in trakt, now you want to update it here then

python main.py update movies --save

Command save

Generate the all-time-stats.json from existing database.db, equivalent to --save flag.

python main.py save

Command server

Start a basic flask server to serve the all-time-stats via basic http api.
Used for app.

usage: TraktVipStats server [-h] [--port PORT] [--debug]

options:
  -h, --help   show this help message and exit
  --port PORT
  --debug

Available Endpoints are

  • /all_time_stats
  • /first_play
  • /pfp
  • /username
  • /actors
  • /actresses
  • /directors
  • /writers
  • /trakt/most_watched_shows
  • /trakt/most_watched_movies
  • /tv/stats
  • /tv/plays
  • /tv/users_top_10
  • /tv/by_genre
  • /tv/by_country
  • /tv/list_progress
  • /tv/highest_rated
  • /tv/all_ratings
  • /movies/stats
  • /movies/plays
  • /movies/users_top_10
  • /movies/by_genre
  • /movies/by_released_year
  • /movies/by_country
  • /movies/list_progress
  • /movies/highest_rated
  • /movies/all_ratings

Note

This program only generates all-time-stats equivalent data. To see this data in graphical interface use this app.

trakt_vip_stats's People

Contributors

ahmedazim7804 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

en3s0

trakt_vip_stats's Issues

Fail to generate all-time-stats.json

After run

python main.py update movies --save

pop up the errors/warnings as follows:

  • First
image Another error about time zoon conflict was found here. I watched Episode 25 of "Blossoms Shanghai" on Jan 17th 12:03AM, But it showed ["2024-01-16T16:03:07.000Z"]
  • Second
image
  • Third
image

Running os: MasOS 14.3
Python version: 3.9.7

Bug: Sorts December 1 00:00 as January of previous year

I have a lot of films and episodes that I, on the Trakt website, manually entered that I watched on a year and January 1 00:00 (because I could not estimate the date more precisely). It seems the script interprets this as December of the previous year, which messes up my statistics. This is not how Trakt treats these dates on their website.

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.