Permalink
Commits on Jun 21, 2018
  1. helper: commands: resolve: fix movie resolution

    XaF committed Jun 21, 2018
    Commit f436460 introduced a
    bug by converting the imdb id returned in the URL form by
    imdbpie to the imdb id alone, and doing so for the
    'parentTitle' of the media, which represents a series for
    a TV episode, but does not exist for a movie. This commit
    fixes that behavior by checking that the 'parentTitle'
    exists before applying the conversion at its level.
    
    Fixes #119
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Commits on Jun 14, 2018
  1. intf: Windows: manage Universal Naming Convention paths

    XaF committed Jun 14, 2018
    When a network drive is not mapped to a drive letter on Windows,
    the path will appear as an UNC path starting with 'file://'.
    However, Lua will fail to open that file to resolve the hash.
    This thus fixes that problem by changing the protocol from 'file'
    to 'unc' in order to avoid trying to resolve the hash when
    reading a media from an UNC path.
    
    Relates to #115
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  2. intf: movieHash: manage file opening errors properly

    XaF committed Jun 14, 2018
    When failing to open a file to resolve the hash, the interface was
    exiting on error because of the assertion. It can happen for a
    number of reasons that the file cannot be opened and this should
    not prevent TraktForVLC from working properly. This commit aims
    at managing the error properly by showing an error message and
    aborting the hash resolution.
    
    Relates to #115
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Commits on Jun 13, 2018
  1. intf: use a different parameter to check that the media is a video

    XaF committed Jun 13, 2018
    Commit 92361d8 introduced a check
    that the media was a video using the 'decoded_video' parameter.
    However, that parameter stays to 0 if the video is not decoded; this
    thus changes for the use of the 'displayed_pictures' parameter that
    should always be greater than 0 for a video.
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  2. helper: commands: resolve: allows to resolve episodes without IMDb match

    XaF committed Jun 13, 2018
    In some cases, episodes seem to be weirdly registered in IMDb (two
    by two for instance) which means the matching between the resolution
    done using The TVDB and the corresponding IMDb episode does not work.
    This commit fixes that by allowing to resolve without an IMDb match
    by querying directly Trakt if the match is not found. This also
    introduces the use of other ids to perform the scrobble.
    
    This commit also introduce a compatibility code in trakt.lua that
    will need to be removed in a few versions.
    
    Fixes #111
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Commits on May 4, 2018
  1. Fix: play time scaling as VLC 2 and 3 are not using the same time unit

    XaF committed May 4, 2018
    VLC 2 was giving time information using seconds, while VLC 3 moved
    to giving the same information using microseconds. This thus needs
    to be managed correctly when computing the play time.
    
    Fixes #104
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  2. helper: commands: update: save the release type to download in the bu…

    XaF committed Apr 29, 2018
    …ilt versions
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Commits on Apr 29, 2018
  1. ci: travis: build a legacy macOS 10.10 version

    XaF committed Apr 29, 2018
    Fixes #102
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  2. ci: travis: remove duplicate show of python version

    XaF committed Apr 29, 2018
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  3. helper: add build system release information (OS release version)

    XaF committed Apr 29, 2018
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  4. version: fix failure when no tag is found

    XaF committed Apr 29, 2018
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  5. intf: clean configuration information

    XaF committed Apr 29, 2018
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  6. intf: create the default config value for media.stop.delay

    XaF committed Apr 29, 2018
    Fixes #103
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Commits on Apr 26, 2018
  1. helper: commands: resolve: check duration for movie resolution

    XaF committed Apr 26, 2018
    When providing the duration, it can be used to discard the 'closest'
    matching movie if its duration is far away from the expected one.
    This implements that behavior by considering that 'far away' is more
    than half the expected duration. This might need future improvement.
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  2. helper: commands: resolve: better filtering for movies resolution

    XaF committed Apr 26, 2018
    When searching on IMDB, other objects such as actors could be
    returned. This checks the IMDB ID returned and verifies it starts
    with 'tt' (which represents episodes, series and movies) and that
    the returned element is not a TV series.
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  3. helper: commands: resolve: check series names using format 'name (year)'

    XaF committed Apr 26, 2018
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  4. helper: commands: extraids: manage unicode titles properly

    XaF committed Apr 26, 2018
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  5. intf: check that the media is a video before using TraktForVLC's logic

    XaF committed Apr 26, 2018
    It is not necessary to use TraktForVLC's logic if VLC is only used
    for listening to music for instance. We thus can check directly in
    the interface if we have a video playing. If not, just wait.
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  6. intf: check the volume to verify that VLC is still running

    XaF committed Apr 26, 2018
    On most VLC versions, closing VLC should stop the modules. However,
    it seems that in some cases the VLC process is kept running until
    the modules stop. In those latter cases, TraktForVLC was causing
    VLC to hang at the end of the execution. Checking the volume will
    thus allow to see if VLC is still opened, and stop properly if it
    is not.
    
    Fixes #100
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Commits on Apr 20, 2018
  1. helper: commands: extraids: allow to provide TV shows IMDB ID

    XaF committed Apr 20, 2018
    When resolving episodes, sometimes the first aired date returned by
    TheTVDB is not matching the one of IMDB. In such situations, a TV
    shows might be discarded even though it was the right one. This
    thus allows to instead match using the IMDB ID even when the year
    does not match.
    
    Fixes #98
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  2. helper: commands: extraids: improve logging and efficiency

    XaF committed Apr 20, 2018
    In order to understand what happens when an extraids command does
    not provide any extra IDs, this adds logs for rejected matchs.
    Moreover, caching is now enabled as it can be useful when resolving
    multiple episodes of the same tv show at the same time, for instance.
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  3. helper: commands: resolve: manage mathematical issue for movie resolu…

    XaF committed Apr 20, 2018
    …tion
    
    In some cases, we can get mean + stddev > max, in such cases, the
    movie resolution was failing as it was looking for any movie having
    a match of at least mean + stddev. Using a "min" operator with the
    "max" value available for the movies, we insure that we will always
    at least have a match.
    
    Fixes #98
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  4. helper: commands: resolve: fix hash match when multiple entries are r…

    XaF committed Apr 20, 2018
    …eturned
    
    When multiple entries are returned by the OpenSubtitles API, we
    first check for episodes and then movies. However, nothing
    guarantees that both of those will have data in them. We thus
    need to first compute the list of matching returned medias of
    the right type, and then, if any matches, determine the closest.
    
    Fixes #96
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  5. helper: utils: get_vlc: add hardcoded path for MacOS

    XaF committed Apr 19, 2018
    When manually installing VLC on MacOS from the VideoLAN installer,
    the path is pretty much always the same. This adds this path in
    the get_vlc function in order to resolve it if VLC is installed
    at this location.
    
    Fixes #94
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Commits on Apr 19, 2018
  1. MacOS: fix VLC configuration directory

    XaF committed Apr 19, 2018
    VLC configuration directory was set to the 'Application Support'
    folder instead of the 'Preferences' one. This was not impacting
    the actual installation at the moment, but could impact a future
    service configuration, as well as confuse users about where the
    trakt_config.json file is.
    
    Fixes #90
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  2. helper: commands: date: workaround the missing '%s' on Windows

    XaF committed Apr 19, 2018
    Python does not support the '%s' format string for the datetime
    module on Windows. This patch fixes that behavior by replacing
    the '%s' string by the value returned by 'time.time()' on
    Windows only; keeping the old behavior for Linux and MacOS.
    
    Fixes #92
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  3. trakt.lua: remove leading slashes for file URIs on Windows

    XaF committed Apr 19, 2018
    When the VLC URI is returned for a file on Windows, the format
    of the URI is file:///<drive>:/<path>/<etc.>/<file>.
    The matching regex was not removing the leading slash in this
    case, as it needs to be kept for UNIX systems. This patch
    fixes it.
    
    Fixes #91
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
  4. Add --vlc-verbose option for commands calling VLC

    XaF committed Apr 19, 2018
    This will help in debugging when there is an issue in a command
    that calls VLC for part of its tasks.
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Commits on Apr 16, 2018
  1. Fix: github update link

    XaF committed Apr 16, 2018
  2. Initialization of the repository for TraktForVLC 2.x

    XaF committed Apr 16, 2018
    The new structure for TraktForVLC 2.x includes a Lua VLC module
    that will take care of following what is happening on the VLC
    side, while a helper Python script is provided to perform all
    the tasks that the VLC embedded Lua does not allow to do.
    
    TraktForVLC 2.x includes the following features:
    - Automatically set the watching status for movies and series
    - Automatically scrobble movies and series
    - Identify movies and series using a combination of APIs from
      OpenSubtitles, IMDB, TheTVDB and TMDB
    - Allow for offline save of movies and series scrobble status
      for late scrobble when an internet connection is found
    - Simple installation/update/uninstallation process
    - Automatic release of binaries for multiple OS (Linux, MacOS,
      Windows) for new releases, including the 'latest' tag that
      will keep up with the master branch
    
    Related to: #88
    
    Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>