Giter Site home page Giter Site logo

tautullibatch2trakt's Introduction


Logo

Tautulli Batch 2 Trakt

Table of Contents

Description:

Powershell script to send Tautulli notificaions for multiple users to Trakt.

Getting Started

Prerequisites

  • Windows
  • PowerShell 3 and higher

Installation

CD "<Enter Install Path>"
Invoke-WebRequest https://raw.githubusercontent.com/frugglehost/TautulliBatch2Trakt/master/TautulliBatch2Trakt.ps1 -OutFile TautulliBatch2Trakt.ps1
ICACLS "TautulliBatch2Trakt.ps1" /grant:r "Everyone:(F)" /C

Script Setup

Create a new application https://trakt.tv/oauth/applications
Add the follow settings:

Name: TautulliBatch2Trakt
Redirect uri: urn:ietf:wg:oauth:2.0:oob
Permissions: /scrobble

Save the Client ID and Client Secret

Run script for initial setup and follow instructions

CD "<Enter Install Path>"
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
# Press "Yes", Once the powershell window is closed the settings will revert back.
.\TautulliBatch2Trakt.ps1 -setup

The script will automaticly copy the code for you to enter into Trakt.

Tautulli

Add Script

  • Settings > Notification Agents > Add a Notification Agent > Script

Script Settings

Configuration

  • Script Folder
    • <script path location>
  • Script File
    • TautulliBatch2Trakt.ps1

Triggers

  • Playback Start
  • Playback Stop
  • Playback Pause
  • Playback Resume
  • Watched

Arguments

  • Playback Start / Playback Resume :
    -m {media_type} -s "{show_name}" -M "{title}" -y "{year}" -t "{thetvdb_id}" -i "{imdb_id}" -S {season_num} -E {episode_num} -P {progress_percent} -a start -PlexUser {username}

  • Playback Stop / Watched :
    -m {media_type} -s "{show_name}" -M "{title}" -y "{year}" -t "{thetvdb_id}" -i "{imdb_id}" -S {season_num} -E {episode_num} -P {progress_percent} -a stop -PlexUser {username}

  • Playback Pause :
    -m {media_type} -s "{show_name}" -M "{title}" -y "{year}" -t "{thetvdb_id}" -i "{imdb_id}" -S {season_num} -E {episode_num} -P {progress_percent} -a pause -PlexUser {username}

Usage

-setup              Setup aplication
-reset              Reset settings and revoke token

-m                  Media type (movie, show, episode)
-a                  Action (start, pause, stop)
-s                  Name of the TV Series
-M                  Name of the Moviename
-y                  Year of the movie/TV Show
-S                  Season number
-E                  Episode number
-t                  TVDB ID
-i                  IMDB ID
-P                  Percentage progress (Ex: 10.0)
-PlexUser           The Plex username
-refreshToken       Refreshes the Trakt token 

FAQ & Troubleshooting

Github All Releases

License

Distributed under the GPL License.

Similar Projects

Bug Squashers!

tautullibatch2trakt's People

Contributors

frugglehost avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

thegeeking

tautullibatch2trakt's Issues

Critical error during setup

Describe the bug
After entering my "Trackt.tv 'Client Secret':", I was getting this empty output before ps1 exiting
image

To Reproduce
Steps to reproduce the behavior:

  1. .\TautulliBatch2Tra22kt.ps1 -setup
  2. enter username, client ID, client secret
  3. See error

Expected behavior
finishing setup process

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Add any other context about the problem here.

I used the Windows PowerShell ISE to find the "StatusCode:" output line and checked what was happening in the try/catch.
I manually reproduced the request with the powershell, before getting an error there $TraktRest=Invoke-WebRequest -Uri $Uri -Method POST -Body $Body
error:

+ $TraktRest=Invoke-WebRequest -Uri $Uri -Method POST -Body $Body
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
    + FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

The error message says that the answer content from the request can't be analysed because internet explorer isn't available or first launch setup isn't completed. The error message also indicate to try to use the parameter -UseBasicParsing.

I added it, $TraktRest=Invoke-WebRequest -Uri $Uri -Method POST -Body $Body -UseBasicParsing and then it worked.
Might be a good idea to add it to the code for stability for any type of configuration.

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.