Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Hornsby committed Oct 25, 2015
2 parents 625fb93 + 885a01b commit 6a917a1
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
12 changes: 3 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@

resources/__init__.pyc

resources/lib/__init__.pyc

resources/lib/xbmcsettings.pyc

resources/lib/xbmcutils.pyc

resources/*.pyc
resources/lib/*.pyc
*.pyc
*.pyo
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
--------
Expand All @@ -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
-----
Expand All @@ -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
5 changes: 4 additions & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.similartracks" name="Similar Tracks" version="2.0.1" provider-name="brianhornsby">
<addon id="script.similartracks" name="Similar Tracks" version="3.0.0" provider-name="brianhornsby">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
Expand All @@ -9,5 +9,8 @@
<summary lang="en">Creates a playlist based on tracks from your music library that are similar to the currently playing track.</summary>
<description lang="en">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.</description>
<platform>all</platform>
<license>GNU GENERAL PUBLIC LICENSE. Version 3, 29 June 2007</license>
<website>http://brianhornsby.com/kodi_addons/similartracks</website>
<source>https://github.com/brianhornsby/script.similartracks</source>
</extension>
</addon>
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
12 changes: 6 additions & 6 deletions default.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -27,16 +27,16 @@
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
else:
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()
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -23,7 +23,7 @@
import xbmc


class XBMCSettings:
class KodiSettings:
def __init__(self, addonid, argv):
self.__addon__ = xbmcaddon.Addon(id=addonid)
self.__argv__ = argv
Expand Down
4 changes: 2 additions & 2 deletions resources/lib/xbmcutils.py → resources/lib/kodiutils.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 6a917a1

Please sign in to comment.