Coder Social home page Coder Social logo

bdjessup / trakt-tv-duplicates-removal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anthony-foulfoin/trakt-tv-duplicates-removal

0.0 0.0 0.0 5 KB

This script allows you to remove all the duplicate or additionnal plays for your trakt.tv movies or episodes

Python 100.00%

trakt-tv-duplicates-removal's Introduction

Trakt.tv duplicate / additionnal plays bulk removal

This script allows you to remove all the duplicate or additionnal plays for your trakt.tv movies or episodes, and just keep one play per movie / episode (the oldest one).

For instance if you have 3 plays for the movie Guardians of the Galaxy at these dates:

  • 2014-08-01T20:00:00.000Z
  • 2017-05-05T22:00:00.000Z
  • 2018-02-05T21:00:00.000Z

The script will keep the oldest play (2014-08-01T20:00:00.000Z) and remove all the others. If there are no duplicates the script do nothing. The script backup your data in local json files (movies.json and episodes.json) before doing anything.

Getting Started

Trakt.tv

Go register a new api app. And fill the form with theses informations:

Name: trakt-duplicates-removal  
Redirect uri: urn:ietf:wg:oauth:2.0:oob  

You don't really care about the others fields.

Next, go to your api applications and click on the one named trakt-duplicates-removal

You will need the Client ID and the Client Secret from that page.

The script

You will need python3 and pip installed and in your path

  1. Start by doing a pip3 install -r requirements.txt at the root of the project
  2. Edit the script to set the client_id and client_secret variables with the ones you obtained on your trakt.tv api application
  3. Edit the script to set the usernamevariable with your trakt.tv username (you can find it in your settings: https://trakt.tv/settings)
  4. Optionally you can modify the types variable to run the script only for movies or episodes
  5. Optionally you can keep one entry per day (per show/movie) by setting the keep_per_day variable to True
  6. Launch the script:
python3 trakt-duplicates-removal.py  

Follow the script instructions

Credits

Based on https://gist.github.com/blaulan/50d462696bce5da9225b8d596a8c6fb4

trakt-tv-duplicates-removal's People

Contributors

anthony-foulfoin avatar superritchman avatar cbm-afoulfoin 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.