Commits on May 6, 2014
  1. Split apart the adding of movies to trakt

    Split apart removing of movies to trakt
    Split apart updating movies to trakt
    Seems recently it has not been working (500 internal error) if there is a large amount (400+ in adding, 120+ in removing)
    nate1280 committed Apr 26, 2014
Commits on Apr 22, 2014
  1. Check if data returned from XBMC is empty, indicates invalid ID, if i…

    …t is, stop scrobbling the episode. Should fix potential crashes if rating is enabled and data is empty.
    nate1280 committed Apr 22, 2014
Commits on Feb 21, 2014
  1. Change how show data is loaded and prepared from during a sync.

    During sync, when getting show data from build the list instead of reformatting inplace, this allows for checks to be done against impossible shows (a show with no title, imdb id and tvdb id for now)
    nate1280 committed Feb 21, 2014
Commits on Feb 18, 2014
  1. Fix for when the lastplayed value is empty in XBMC movie json data

    Check for last played value when loading movies from xbmc, only convert it if its present.
    Add a try/catch when converting an sql date to a unix time stamp.
    nate1280 committed Feb 18, 2014
Commits on Feb 7, 2014
Commits on Feb 3, 2014
Commits on Jan 21, 2014
  1. A couple of feature additions

    Add new action, settings, to directly open the settings dialog, usable via RunScript(script.trakt,action=settings).
    Add new setting to toggle the showing of a notification on successful scrobbling of an episode or movie.
    Add indication if simulating scrobbling.
    Fix for utf8 decode error fix, error in previous fix.
    nate1280 committed Jan 7, 2014
Commits on Jan 1, 2014
  1. Add ability to specify which library gets updated in manual sync with…

    … a new variable, library.
    Add ability to specify which library gets updated in manual sync with a new variable, library. This still checks if episode/movie sync is enabled or disabled.
    Usage: RunScript(script.trakt,action=sync[,silent=True][,library=[all|episodes|movies]])
    The variable is optional, and if omitted defaults to all.
    nate1280 committed Aug 21, 2013
Commits on Nov 3, 2013
Commits on Oct 22, 2013
  1. Workaround fix for UnicodeDecodeError

    Workaround fix for UnicodeDecodeError which seems to occur when json tries to parse a response string from executeJSONRPC.
    nate1280 committed Oct 21, 2013
Commits on Oct 5, 2013
  1. Bug fixes

    Fixed update tags not running after sync, if the setting was enabled.
    Fixed usage of sync after library update, was always syncing.
    Small cleanup of sync, replace redundant calls with a variable and one time call.
    nate1280 committed Oct 5, 2013
Commits on Aug 19, 2013
  1. Some fixes and changes

    Fix possible crashes in
    Add ability to disable sending watched calls on seek and when resuming playback, this can cut down on wait times from the API, for example playing a movie and seeking to the end in 10 minute skips to scrobble it.  This would mainly benefit those who usually have long response times from
    Close progress dialog if results from trakt or xbmc are invalid, otherwise dialog stays on screen with no way to remove it
    nate1280 committed Aug 19, 2013
Commits on Jul 20, 2013
  1. Some fixes and new features

    Handle failure status when returns an error code.
    Increase wait time delay whens erver is busy.
    Add debug entry that summary info is being prefetched if rating is enabled for media type.
    Add debug entry for final scrobble is show or movie is not found.
    Add ability to select default script action
    Fix traktapi bad jason response debug line.
    Fix traktapi to only check for status if there is data, fixes failure on NoneType
    Add optional silent argument (true/false) for manual sync, this allows a sync to be run with no on screen progress, which can be used in a scheduled job. Example: RunScript(script.trakt,action=sync,silent=True)
    Remove filename in sanitizeMovieData, this field was added in with the exclusion check, forgot to strip it out of data that gets submitted to
    Delete file key in movie data in xbmcLoadMovies instead of when sanitizing data since this key is only used in this function and no where else, its not needed outside of this function.
    Fix typo in variable, cosmetic change
    Try to prevent strptime thread safety issue
    Add new contextmenu action, usable via RunScript(script.trakt,action=contextmenu).
    nate1280 committed Jul 7, 2013
Commits on Jun 22, 2013
Commits on Jun 18, 2013
Commits on Jun 10, 2013
  1. Extend exclusion settings to be used in syncing.

    Moved exclusion settings to own section.
    Added exclusion checks in sync code.
    nate1280 committed Jun 10, 2013
Commits on Jun 8, 2013
  1. Some fixes and tweaks

    On initial load, purge old queue before doing anything.
    No longer load settings on trakt api creation, variable is there to force it if needed.
    Move load settings to a dispatch action.
    Add load settings to dispatch after purging queue, so its the first thing that gets done when loop is entered.
    Cache settings when they're loaded and refresh them a week (less an hour) from the last time they were cached.
    Add ability to force settings to be reloaded in addon configure screen.
    Rework settings a bit, add separators in debug section.
    nate1280 committed Jun 8, 2013
Commits on Jun 7, 2013
  1. Fix for UnicodeEncodeError in notification function.

    Add encode method to message string in utilities notification function.
    nate1280 committed Jun 7, 2013
Commits on May 26, 2013
  1. Some fixes and cleanup

    Fix for RuntimeError
    Cleanup in
    Update function that updates the current media's playing time, remove check for paused, this will prevent updates not happening if resume/pause gets messed up.
    If library item is missing imdb or tvdb id, and rating is enabled, don't get summary, get it after a watching call instead.  This will stop API calls being made that can never return data.
    Added ability to update library item's imdb/tvdb id from watching calls if they are missing.
    Added 2 new settings to control the ability to update a library item's imdb and tvdb id.
    Fix for watchlist tag check
    nate1280 committed May 24, 2013
Commits on May 22, 2013
  1. Add ability to edit list within managelists dialog

    Edit managelists dialog to include controls for editing a list, these will be visible once a list is selected.
    Added ability to hide a list in the itemslist dialog, useful for if you have some lists that you just don't want to use in XBMC.
    managelists dialog remembers your list selection when returning to the from editing a list.
    nate1280 committed May 22, 2013
Commits on May 21, 2013
  1. A few fixes and cleanup

    Fix typo in changelog
    Fix positioning of scrollbar in list dialog
    Change sync to use rewritten find functions
    Fix itemlists dialog, should make changes after checks, not before
    Cleanup traktAPI
    nate1280 committed May 21, 2013
Commits on May 20, 2013
  1. Add tagging support

    Add new API function wrappers to traktAPI class.
    Added the ability for the plugin to create tags from lists on trakt, as well as from watchlists (if enabled), and from ratings (if enabled, with a minimum value).
    Add new settings section for tagging.
    Added 5 new actions, addtolist, removefromlist, updatetags, itemlists, and managelists.
    RunScript(script.trakt,action=updatetags) will cause xbmc tags to be updated from trakt lists based on settings.
    RunScript(script.trakt,action=itemlists) will allow a user to edit the lists a movie/show belongs to within XBMC, and add new lists.
    RunScript(script.trakt,action=managelists) will allow a user to edit there lists from within XBMC and add new lists.
    RunScript(script.trakt,action=addtolist,media_type=<movie|show>,dbid=<#>) will allow for adding an item to a specific list, media_type and dbid are optional, if not included, this will apply to the selected item.
    RunScript(script.trakt,action=removefromlist,media_type=<movie|show>,dbid=<#>) will allow for adding an item to a specific list, media_type and dbid are optional, if not included, this will apply to the selected item.
    Update service thread to handle new actions.
    Move find* functions to utilities file.
    Add loadsettings optional variable to traktAPI class declaration, for use when creating class in a script and doesn't need setting data.
    Cache the lists from, and refresh if 10 minutes have passed since last api call.
    Add temporary timerlist action, times JSON calls to get movies/shows with and without tags, can be triggered manually from Debug settings.
    Rewrote findInList, to loop through by index instead of by item, added ability to return index or item.
    Rewrote findMovie/findShow to use changes in findInList
    Added ability for Watchlist tag to be automatically removed on a scrobble, if tagging and watchlists is enabled, and only for movies.
    Added ability to add/remove rating tag when rating a movie/show, only if tagging and rating tags are enabled.
    nate1280 committed May 13, 2013
Commits on May 7, 2013
  1. Add function to ToggleWatched

    Add a new action, togglewatched to wrap around the XBMC action, works only on library items, consider it an extension of the sync functions.
    Add settings to toggle notifications on/off for items marked as watched.
    ToggleWatched action uses the simulate_sync setting, so it can be easily tested.
    ToggleWatched will only mark as watched on trakt, it will not unwatch items, it checks XBMC data to build a list of what has a playcount of 0, and also checks data from trakt to see if the item is not watched already.
    Add new queue system for the dispatch queue, uses an sqlite database, this allows for script functions to send events to the service thread without the need to set properties which could cause race conditions.
    Update manual sync and manual rating to use new queue system.
    Update manual sync to get XBMC data in script call, instead of service, and pass this data, less to do in service thread now, makes it cleaner.
    Add new trakt api call, show/season to get season data for marking a season as watched
    Add extend option to getShowSummary
    nate1280 committed May 1, 2013
Commits on May 6, 2013
  1. Cleanup

    Cleanup localization files, remove unused string
    Remove unused function in utilities
    nate1280 committed May 6, 2013
Commits on May 2, 2013
  1. Alternate rating notification style

    Alternate rating notification style, status is on the left, and the title of the item is on the right, which can scroll if its to long.
    nate1280 committed May 2, 2013
Commits on May 1, 2013
Commits on Apr 29, 2013
  1. Add script function to trigger a manual rating.

    Rename to
    Add a script function to trigger a manual rating from either a keypress association, or from within a skin.
    Can manually rate a movie, base tv show, or episode.
    Use, RunScript(script.trakt,action=rate) to trigger a manual rating.
    Use, RunScript(script.trakt,action=unrate) to trigger a manual unrate.
    Can rate a library item as well as a non-library items.
    Check the type of media currently selected based on the currently visible container  (movie, tvshow, season, episode).
    Allow overriding the media_type and ID for manual rating.
    Support rating parameter to directly rate an item.
    Add error checking when getting data from XBMC
    Add setting to allow re-rating of media.
    On a re-rate, selecting the same rating unrates media, this is the same behaviour as the website.
    Change rating dialog focused rating string to mimic website behaviour if unrating
    Signal service thread with type of media and DB id of currently selected item to perform a manual rating.
    Use JSON for the data passed to the service thread.
    Add signaling check in service thread for manual rating.
    Clear properties used when calling manual functions, as to not re-trigger them if service crashes before clearing properties.
    Add isShow, getShowDetailsFromXBMC and isValidMediaType helper functions.
    Add supporting calls to traktapi class.
    Alter check for status/error fields in traktRequest, since show summary has a status field which is not success/failure, this caused an error.
    Rename getShowSummary to getEpisodeSummary
    Rename getTVShowSummary to getShowSummary
    Add season/episode to rating dialog, now shows <Show> - S##E## - <Episode Title>.
    Add short option to formatted item name, used when displaying rating dialog, specifically for episode rating, as adding the show title made it rather long.
    If media is already rated, and re-rating is not enabled, always show notification, even on a rate after a scrobble.
    Add ability to show notification that a show/episode/movie has already been rated.
    Make already rated notification more descriptive
    Make rating submission notification more descriptive
    Add new notification header string for ratings
    If re-rating media, set current rating as focus on dialog.
    Add debug line when no rating is returned from dialog (usually signifies it was closed)
    Updated all translations of string 1167, they're probably wrong, but without %s would have caused a crash.
    Any notifications still use the long format.
    nate1280 committed Apr 24, 2013
Commits on Apr 25, 2013
  1. Fix sync progress information

    Fix sync progress during a manual sync.
    nate1280 committed Apr 13, 2013
Commits on Apr 18, 2013
  1. Fix NoneType error in traktLoadMovies

    Fix NoneType error in traktLoadMovies, didn't sanitize data before doing comparison.
    nate1280 committed Apr 18, 2013
Commits on Apr 15, 2013
  1. Fix for wrong data type of tmdb_id in watched movie data

    Handle data type inconsistency from api calls, type cast tmdb_id to unicode when iterating over watched movie data.
    nate1280 committed Apr 15, 2013
Commits on Apr 14, 2013
  1. Few fixes in sync

    Handle NoneType for tvdb_id and imdb_id for tv shows (like done for movies).
    Default to empty string if tvdb_id, tmdb_id are None, instead of 0.
    Change findMovie to use isdigit() instead of > 0.
    Add title and year to findMovie, findShow search.
    Cleanup traktLoadShows, remove watched array update from initial loop, and move it to 2nd loop, like how traktLoadMovies does it, saw 50% speed improvement (on a fast machine, did not test on other).
    Rewrite findInList to use named optional arguments, this allows for multiple fields to be compared now.
    Add case sensitive option to findInList, defaults to True.
    Fix typo in debug entry.
    nate1280 committed Apr 14, 2013
Commits on Apr 10, 2013
  1. Implement queue for dispatch events

    Implement queue for dispatch events, should resolve race conditions that can occur.
    Dispatch queue is acted upon every cycle and cleared.
    Add check for xbmc playing video when doing update() from service thread.
    Remove old check for switching videos in a playlist in scrobbler class.
    Small change to rating check, perform the setting check before anything else.
    Change how updating time is handled, only update if the current playlist index is the same as what was seen when playback started.
    In traktPlayer, save playlist index in onPlayBackStarted to variable.
    In traktPlayer, onPlayBackStarted, check current playlist index to saved index if playlist length is greater then 1, if it is, fire an onPlayBackEnded event.
    Add some more debug lines to help in testing playlist playback.
    nate1280 committed Apr 9, 2013
Commits on Apr 9, 2013
  1. Add simulate scrobble setting

    Add simulate scrobble setting for testing.
    nate1280 committed Apr 9, 2013