From d9ac0eaf3eca4c23a78d850a822cd1cd87868f2d Mon Sep 17 00:00:00 2001 From: Brian Hornsby Date: Sat, 7 Feb 2015 13:01:58 +1100 Subject: [PATCH 1/3] Updated plugin to use Kodi name. Updated copyright date. --- .gitignore | 11 ++--------- README.md | 8 ++++---- addon.xml | 5 ++++- default.py | 12 ++++++------ resources/lib/{xbmcsettings.py => kodisettings.py} | 6 +++--- resources/lib/{xbmcutils.py => kodiutils.py} | 4 ++-- 6 files changed, 21 insertions(+), 25 deletions(-) rename resources/lib/{xbmcsettings.py => kodisettings.py} (95%) rename resources/lib/{xbmcutils.py => kodiutils.py} (97%) diff --git a/.gitignore b/.gitignore index 90dabb2..b12d79d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,3 @@ - -resources/__init__.pyc - -resources/lib/__init__.pyc - -resources/lib/xbmcsettings.pyc - -resources/lib/xbmcutils.pyc - +resources/*.pyc +resources/lib/*.pyc *.pyc diff --git a/README.md b/README.md index b915116..fc9ffba 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -SimilarTracks for XBMC +SimilarTracks for Kodi =========== -A script that uses the currently playing track to generate a playlist of similar tracks in your XBMC music library. +A script that uses the currently playing track to generate a playlist of similar tracks in your Kodi music library. Features -------- @@ -21,7 +21,7 @@ Screenshots Installation ----------- -Download the latest zip file and install the addon. See http://wiki.xbmc.org/?title=Add-ons#How_to_install_from_a_ZIP_file for more details on installing addons from zip file. +Download the latest zip file and install the addon. See http://kodi.wiki/view/HOW-TO:Install_an_Add-on_from_a_zip_file for more details on installing addons from zip file. Usage ----- @@ -39,7 +39,7 @@ The following settings are available. License ------- -SimilarTracks for XBMC is licensed under the [GPL 3.0 license] [1]. +SimilarTracks for Kodi is licensed under the [GPL 3.0 license] [1]. [1]: http://www.gnu.org/licenses/gpl-3.0.html diff --git a/addon.xml b/addon.xml index 97a8584..e114d98 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + @@ -9,5 +9,8 @@ Creates a playlist based on tracks from your music library that are similar to the currently playing track. Creates a playlist based on tracks from your music library that are similar to the currently playing track. Uses the last.fm track.getSimilar api. all + GNU GENERAL PUBLIC LICENSE. Version 3, 29 June 2007 + http://brianhornsby.com/kodi_addons/similartracks + https://github.com/brianhornsby/script.similartracks diff --git a/default.py b/default.py index 44593b1..40d3991 100644 --- a/default.py +++ b/default.py @@ -1,9 +1,9 @@ #/* # * -# * SimilarTracks for XBMC. +# * SimilarTracks for Kodi. # * -# * Copyright (C) 2013 Brian Hornsby +# * Copyright (C) 2015 Brian Hornsby # * # * This program is free software: you can redistribute it and/or modify # * it under the terms of the GNU General Public License as published by @@ -27,8 +27,8 @@ import xbmcgui from urllib2 import urlopen, URLError -import resources.lib.xbmcsettings as xbmcsettings -import resources.lib.xbmcutils as utils +import resources.lib.kodisettings as kodisettings +import resources.lib.kodiutils as utils if sys.version_info < (2, 7): import simplejson @@ -36,7 +36,7 @@ import json as simplejson _addonid = 'script.similartracks' -_settings = xbmcsettings.XBMCSettings(_addonid, sys.argv) +_settings = kodisettings.KodiSettings(_addonid, sys.argv) # Get addon information and settings. _addonname = _settings.get_name() @@ -199,7 +199,7 @@ def add_tracks_to_playlist(artist, playlisttracks): pDialog.update(25, _settings.get_string(3005), '%s - %s' % (artist.decode('ascii', 'ignore'), title.decode('ascii', 'ignore'))) count, playlisttracks = get_similar_tracks(artist, title) - log_debug('Found %d similar tracks in XBMC library' % count) + log_debug('Found %d similar tracks in Kodi library' % count) if _runinbackground or not pDialog.iscanceled(): index = 0 diff --git a/resources/lib/xbmcsettings.py b/resources/lib/kodisettings.py similarity index 95% rename from resources/lib/xbmcsettings.py rename to resources/lib/kodisettings.py index 68e223d..83a279e 100644 --- a/resources/lib/xbmcsettings.py +++ b/resources/lib/kodisettings.py @@ -1,8 +1,8 @@ #/* # * -# * Add-on Settings class for XBMC. +# * SimilarTracks for Kodi. # * -# * Copyright (C) 2012 Brian Hornsby +# * Copyright (C) 2015 Brian Hornsby # * # * This program is free software: you can redistribute it and/or modify # * it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ import xbmc -class XBMCSettings: +class KodiSettings: def __init__(self, addonid, argv): self.__addon__ = xbmcaddon.Addon(id=addonid) self.__argv__ = argv diff --git a/resources/lib/xbmcutils.py b/resources/lib/kodiutils.py similarity index 97% rename from resources/lib/xbmcutils.py rename to resources/lib/kodiutils.py index 0c959db..f7d8d9e 100644 --- a/resources/lib/xbmcutils.py +++ b/resources/lib/kodiutils.py @@ -1,8 +1,8 @@ #/* # * -# * Utilities for XBMC addons. +# * SimilarTracks for Kodi. # * -# * Copyright (C) 2012 Brian Hornsby +# * Copyright (C) 2015 Brian Hornsby # * # * This program is free software: you can redistribute it and/or modify # * it under the terms of the GNU General Public License as published by From 01168afd3e5d3a3668c39fc7e84d943dbc59709d Mon Sep 17 00:00:00 2001 From: Brian Hornsby Date: Sat, 7 Feb 2015 13:07:45 +1100 Subject: [PATCH 2/3] Reverting version number back to 2.0.1 (from 3.0.0) after updating it by mistake. --- addon.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index e114d98..6a60070 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + From 885a01bbf5915498f6573b34175dac9f59e8329f Mon Sep 17 00:00:00 2001 From: Brian Hornsby Date: Sun, 25 Oct 2015 13:45:31 +1100 Subject: [PATCH 3/3] Updated version number and changelog. Updated .gitignore. --- .gitignore | 1 + addon.xml | 2 +- changelog.txt | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b12d79d..a51d5db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ resources/*.pyc resources/lib/*.pyc *.pyc +*.pyo diff --git a/addon.xml b/addon.xml index 6a60070..e114d98 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index bd2d492..4b7913c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +*** 3.0.0 *** +Updated plugin to use Kodi name. Updated copyright date. [d9ac0ea] + *** 2.0.1 *** Fix for issue #1 where unicode character was causing script to raise an exception.