Giter Site home page Giter Site logo

Comments (21)

Generator avatar Generator commented on May 29, 2024

With system are you running?
and what says the command which bash

from tautulli2trakt.

macstainless avatar macstainless commented on May 29, 2024

With system are you running?
and what says the command which bash

Running macOS Catalina (10.15) and when I type 'which bash' in Terminal, I get "/bin/bash" as the return.

from tautulli2trakt.

Generator avatar Generator commented on May 29, 2024

OK try this on a bash shell to see what works (just type bash then copy paste the code)

examples(){
# Example 1
if [ 999 -le 1000 ]; then
echo "Example 1 works"
fi 

# Example 2
number="999"
if [[ "$number" -le 1000 ]]; then
echo "Example 2 works"
fi 

# Example 3
number="999"
if (( "$number" <= 1000 )); then
echo "Example 3 works"
fi
}

examples
unset examples

This will create a function called examples, which one will send a message if it's working, at the end will execute the function and unset function

from tautulli2trakt.

macstainless avatar macstainless commented on May 29, 2024

Terminal output below after pasting in the code from your prior comment:

bash-3.2$ examples
Example 1 works
Example 2 works
Example 3 works
bash-3.2$ unset examples
bash-3.2$ 

OK try this on a bash shell to see what works (just type bash then copy paste the code)

examples(){
# Example 1
if [ 999 -le 1000 ]; then
echo "Example 1 works"
fi 

# Example 2
number="999"
if [[ "$number" -le 1000 ]]; then
echo "Example 2 works"
fi 

# Example 3
number="999"
if (( "$number" <= 1000 )); then
echo "Example 3 works"
fi
}

examples
unset examples

This will create a function called examples, which one will send a message if it's working, at the end will execute the function and unset function

from tautulli2trakt.

Generator avatar Generator commented on May 29, 2024

Try this version

Same Install with this URL

wget -O tautulli2trakt.sh https://raw.githubusercontent.com/Generator/tautulli2trakt/macOS/tautulli2trakt.sh  
chmod +x tautulli2trakt.sh

from tautulli2trakt.

macstainless avatar macstainless commented on May 29, 2024

I've performed a WGET to get the URL you provided and overwrote my older tautulli2trakt.sh file, then performed the chmod as indicated. I sent a test of the script using the following parameters:

-m show -s “Last Week Tonight with John Oliver” -M “Episode 176” -y “2019” -t “278518” -i "tt3530232" -S 06 -E 27 -P 100 -a stop

The Tautulli logs return the following error:

Tautulli Notifiers :: Script error: 
    usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
                            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format] 
    usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
                            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format] 
    /Applications/Tautulli/scripts/tautulli2trakt.sh: line 283: e9b7e2dd0a21405f99ef2a995906622493bcac762ca7dcaa889774d62fb553e4: command not found

from tautulli2trakt.

Generator avatar Generator commented on May 29, 2024

what's the version of date
date --version

from tautulli2trakt.

macstainless avatar macstainless commented on May 29, 2024

I'll need more info on what you're looking for. I'm getting errors when trying to run that command in Terminal.

from tautulli2trakt.

Generator avatar Generator commented on May 29, 2024

Find the version of date command.

Something like this

$ date --version
date (GNU coreutils) 8.31
Copyright (©) 2019 Free Software Foundation, Inc.
Licença GPLv3+: GNU GPL versão 3 ou posterior <http://gnu.org/licenses/gpl.html>
Este é um programa grátis: pode alterá-lo e redistribuí-lo.
Não há QUALQUER GARANTIA, até ao limite da Lei.

Escrito por David MacKenzie.

from tautulli2trakt.

macstainless avatar macstainless commented on May 29, 2024

Okay. So the issue is on I'm on a Mac and date --version is a Linux command, not a Unix command. I installed coreutils via homebrew and then ran gdate --version which gave me the following output:

date (GNU coreutils) 8.31
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.

Just to make sure that wasn't the issue, I re-ran the script test with the exact same parameters as last time and still got the error in the Tautulli logs.

Tautulli Notifiers :: Script error: 
    usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
                            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format] 
    usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
                            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format] 
    /Applications/Tautulli/scripts/tautulli2trakt.sh: line 283: c85ad7154eb9858bc5659189fe12e3e0bc8af43b3558d6f3dfffa4794fc4b428: command not found

from tautulli2trakt.

Generator avatar Generator commented on May 29, 2024

That can be solved, just confirm this, type echo $OSTYPE if the output is darwin or similar

Even with gnu-date installed, the script still tries to use date from macOS, just need to detect the system first to call the proper date command.

from tautulli2trakt.

Generator avatar Generator commented on May 29, 2024

Try this

wget -O tautulli2trakt.sh https://raw.githubusercontent.com/Generator/tautulli2trakt/macOS/tautulli2trakt.sh  
chmod +x tautulli2trakt.sh

You can try it directly from command line:
./tautulli2trakt.sh -m episode -s "Chernobyl" -M "Chernobyl - 1:23:45" -y "2019" -t "360893" -i "tt7366338" -S 1 -E 1 -P 25 -a start

And check your trakt.tv profile to confirm if its scrobbling https://trakt.tv/users/<username>

To stop progress:
./tautulli2trakt.sh -m episode -s "Chernobyl" -M "Chernobyl - 1:23:45" -y "2019" -t "360893" -i "tt7366338" -S 1 -E 1 -P 25 -a stop

from tautulli2trakt.

macstainless avatar macstainless commented on May 29, 2024

Okay, so I did the wget and chmod and then ran the script directly from Terminal. Chernobyl showed as Currently Watching on Trakt's website. The stop command worked too to stop the playback.

Also, when I type echo $0STYPE the return in Terminal is -zshSTYPE.

from tautulli2trakt.

macstainless avatar macstainless commented on May 29, 2024

I see you close this bug, but the error still exists in Tautulli. I just ran a test in Tautulli once more with the same "Last Week Tonight" parameters in my previous comment and received the following error in the logs:

    /Applications/Tautulli/scripts/tautulli2trakt.sh: line 37: gdate: command not found 
    /Applications/Tautulli/scripts/tautulli2trakt.sh: line 38: gdate: command not found 
    /Applications/Tautulli/scripts/tautulli2trakt.sh: line 283: gdate: command not found 
    /Applications/Tautulli/scripts/tautulli2trakt.sh: line 286: 29979205108bcbee35679c629588e7180264f6c22a8a54c68bf4900e4497ea4b: command not found

from tautulli2trakt.

Generator avatar Generator commented on May 29, 2024

But this works from command line right?
#8 (comment)

from tautulli2trakt.

macstainless avatar macstainless commented on May 29, 2024

Yes, from the command line as instructed with the ./tautulli2trakt.sh -m episode -s "Chernobyl" -M "Chernobyl - 1:23:45" -y "2019" -t "360893" -i "tt7366338" -S 1 -E 1 -P 25 -a start command, I did get progress indicators on Trakt's site.

Adding in my John Oliver parameters once again, just in case it helps. From the CLI, THIS does not give me any results on Trakt and in CLI just gives me a list of parameters I can use with the script: -m show -s “Last Week Tonight with John Oliver” -M “Episode 176” -y “2019” -t “278518” -i "tt3530232" -S 06 -E 27 -P 100 -a stop

from tautulli2trakt.

macstainless avatar macstainless commented on May 29, 2024

Adding an additional comment with the Terminal output when I send ./tautulli2trakt.sh -m show -s “Last Week Tonight with John Oliver” -M “Episode 176” -y “2019” -t “278518” -i "tt3530232" -S 06 -E 27 -P 100 -a stop

--setup             Setup aplication
--reset             Reset settings and revoke token

-m | --media        Media type (movie, show, episode)
-a | --action       Action (start, pause, stop)
-s | --showname     Name of the TV Series
-M | --Moviename    Name of the Moviename
-y | --year         Year of the movie/TV Show
-S | --season       Season number
-E | --Episode      Episode number
-t | --TVDB         TVDB ID
-i | --IMDB         IMDB ID
-P | --progress     Percentage progress (Ex: 10.0)
-h | --help         This help

--setup             Setup aplication
--reset             Reset settings and revoke token

-m | --media        Media type (movie, show, episode)
-a | --action       Action (start, pause, stop)
-s | --showname     Name of the TV Series
-M | --Moviename    Name of the Moviename
-y | --year         Year of the movie/TV Show
-S | --season       Season number
-E | --Episode      Episode number
-t | --TVDB         TVDB ID
-i | --IMDB         IMDB ID
-P | --progress     Percentage progress (Ex: 10.0)
-h | --help         This help

--setup             Setup aplication
--reset             Reset settings and revoke token

-m | --media        Media type (movie, show, episode)
-a | --action       Action (start, pause, stop)
-s | --showname     Name of the TV Series
-M | --Moviename    Name of the Moviename
-y | --year         Year of the movie/TV Show
-S | --season       Season number
-E | --Episode      Episode number
-t | --TVDB         TVDB ID
-i | --IMDB         IMDB ID
-P | --progress     Percentage progress (Ex: 10.0)
-h | --help         This help

--setup             Setup aplication
--reset             Reset settings and revoke token

-m | --media        Media type (movie, show, episode)
-a | --action       Action (start, pause, stop)
-s | --showname     Name of the TV Series
-M | --Moviename    Name of the Moviename
-y | --year         Year of the movie/TV Show
-S | --season       Season number
-E | --Episode      Episode number
-t | --TVDB         TVDB ID
-i | --IMDB         IMDB ID
-P | --progress     Percentage progress (Ex: 10.0)
-h | --help         This help

--setup             Setup aplication
--reset             Reset settings and revoke token

-m | --media        Media type (movie, show, episode)
-a | --action       Action (start, pause, stop)
-s | --showname     Name of the TV Series
-M | --Moviename    Name of the Moviename
-y | --year         Year of the movie/TV Show
-S | --season       Season number
-E | --Episode      Episode number
-t | --TVDB         TVDB ID
-i | --IMDB         IMDB ID
-P | --progress     Percentage progress (Ex: 10.0)
-h | --help         This help

--setup             Setup aplication
--reset             Reset settings and revoke token

-m | --media        Media type (movie, show, episode)
-a | --action       Action (start, pause, stop)
-s | --showname     Name of the TV Series
-M | --Moviename    Name of the Moviename
-y | --year         Year of the movie/TV Show
-S | --season       Season number
-E | --Episode      Episode number
-t | --TVDB         TVDB ID
-i | --IMDB         IMDB ID
-P | --progress     Percentage progress (Ex: 10.0)
-h | --help         This help

Aaron@tardis scripts % 

from tautulli2trakt.

Generator avatar Generator commented on May 29, 2024

What's the output of which gdate and brew shellenv ?

from tautulli2trakt.

macstainless avatar macstainless commented on May 29, 2024
Aaron@tardis ~ % which gdate
/usr/local/bin/gdate
Aaron@tardis ~ % brew shellenv
export HOMEBREW_PREFIX="/usr/local";
export HOMEBREW_CELLAR="/usr/local/Cellar";
export HOMEBREW_REPOSITORY="/usr/local/Homebrew";
export PATH="/usr/local/bin:/usr/local/sbin:$PATH";
export MANPATH="/usr/local/share/man:$MANPATH";
export INFOPATH="/usr/local/share/info:$INFOPATH";

from tautulli2trakt.

Generator avatar Generator commented on May 29, 2024

OK you can try it with Tautulli

wget -O tautulli2trakt.sh https://github.com/Generator/tautulli2trakt/raw/develop/tautulli2trakt.sh
chmod +x tautulli2trakt.sh

from tautulli2trakt.

macstainless avatar macstainless commented on May 29, 2024

That seems to have fixed it! I did a couple of quick watches and Trakt seems to be picking up the info. THANK YOU!

from tautulli2trakt.

Related Issues (14)

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.