There is an error in Jellyfin Trakt plugin (issue). First I tried to fix with JS but its relly slow so I create a python script.
Install pacakges via pip.
pip install python-dotenv
First we need .env
file for store Trakt App client ID and Secret. You can copy sample file for create .env
.
cp .env.sample .env
Now we need to create Trakt App to get history and remove history. Create Trakt App Enter any name to app, enter urn:ietf:wg:oauth:2.0:oob
to Redirect uri box and click Save App
button at bottom of page. After create the app you can see Client ID and Secret at webpage, copy these and paste to .env
which is created earlier.
We need extract episode ID and first added episode history id
Here is an example of my problem:
First need to get episodes ID. Go to episode page and click to "VIEW ALL" link:
In my example this is the link of history of episode. So latest number is episode number:
430785
Now go to last page on history, scroll to bottom of page. Click CTRL + SHIFT + C
and select last item of history. Click the exact spot.
Now you can see the HTML element in this element we need to store this data-history-id
tag's value.
Go to episodes_to_delete.json
and edit according to your information. "name", "season", "episode" is unnecessary I just added to remember which episode is which ID.
{ "episodes": [
{
"name": "Archer",
"season": 3,
"episode": 8,
"blacklist_id": 5346779973,
"id": 430785
},
]}
If you need delete more episode just add new episodes to JSON (example in the file you can look it).
Just run python file.
python main.py
If you have any problem with script you can open issue or contact me via Issues tab.