-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
frdfsnlght
committed
Dec 3, 2014
1 parent
d089715
commit c69c0a4
Showing
32 changed files
with
780 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,7 @@ | |
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain | ||
|
||
# Images | ||
*.png binary | ||
*.jpg binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.px-state | ||
*.py[co] | ||
desktop.ini | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
KODI-SickRage | ||
===== | ||
Addon for SickRage. | ||
|
||
## Features | ||
- Manage shows (add/delete, review seasons/episodes) | ||
- View upcoming episodes | ||
- View download history | ||
- View backlog | ||
- View failed downloads | ||
- Customizable date/time format | ||
|
||
## Screenshots | ||
[Main](http://imgur.com/EwPYPWW)<br> | ||
[Shows](http://imgur.com/QJ5cH3T)<br> | ||
[Episodes](http://imgur.com/YAMmx1h)<br> | ||
[Upcoming](http://imgur.com/sWg8pXx)<br> | ||
[History](http://imgur.com/9JHBfnO)<br> | ||
[Backlog](http://imgur.com/zeyxAYe) | ||
|
||
## Install | ||
Coming soon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import resources.lib.util as util | ||
|
||
# wrap this in a try/catch to catch broken API calls (can't connect, timeout, etc) | ||
|
||
try: | ||
if 'vf' in util.pluginArgs: | ||
vf = util.pluginArgs['vf'] | ||
if vf == 'shows': | ||
import resources.lib.shows as shows | ||
shows.menu() | ||
elif vf == 'upcoming': | ||
import resources.lib.upcoming as upcoming | ||
upcoming.menu() | ||
elif vf == 'history': | ||
import resources.lib.history as history | ||
history.menu() | ||
elif vf == 'backlog': | ||
import resources.lib.backlog as backlog | ||
backlog.menu() | ||
elif vf == 'failed': | ||
import resources.lib.failed as failed | ||
failed.menu() | ||
elif vf == 'seasons': | ||
import resources.lib.seasons as seasons | ||
seasons.menu() | ||
elif vf == 'episodes': | ||
import resources.lib.episodes as episodes | ||
episodes.menu() | ||
else: | ||
util.log('invalid folder "' + vf + '"') | ||
import resources.lib.main as main | ||
main.menu() | ||
elif 'action' in util.pluginArgs: | ||
action = util.pluginArgs['action'] | ||
if action == 'showAdd': | ||
import resources.lib.showAdd as showAdd | ||
showAdd.action() | ||
else: | ||
util.log('invalid folder "' + vf + '"') | ||
else: | ||
import resources.lib.main as main | ||
main.menu() | ||
|
||
except IOError as ioe: | ||
util.message('Error', '%s' % ioe) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<addon id="plugin.program.sickrage" | ||
name="SickRage" | ||
version="1.0.0" | ||
provider-name="frdfsnlght"> | ||
<requires> | ||
<import addon="xbmc.python" version="2.1.0"/> | ||
</requires> | ||
<extension point="xbmc.python.pluginsource" library="addon.py"> | ||
<provides>executable</provides> | ||
</extension> | ||
<extension point="xbmc.addon.metadata"> | ||
<summary>SickRage integration into XBMC</summary> | ||
<description>Provides the ability to control SickRage from within XBMC.</description> | ||
<platform>all</platform> | ||
</extension> | ||
</addon> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
v1.0 | ||
Initial version | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Dummy file to make this directory a package. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Dummy file to make this directory a package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import xbmcplugin | ||
import xbmcgui | ||
import urllib | ||
import re | ||
|
||
import util as util | ||
|
||
def menu(): | ||
shows = util.api.getBacklog() | ||
shows.sort(key = lambda show: re.sub(r'^(?i)(the)\s+', '', show['show_name'])) | ||
|
||
for show in shows: | ||
url = util.getShowURL(show['indexerid']) | ||
for ep in show['episodes']: | ||
ep['show_name'] = show['show_name'] | ||
listItem = xbmcgui.ListItem( | ||
label = util.formatEpisodeName(ep), | ||
iconImage = util.getIcon('wanted' if ep['status'] == 3 else 'qual') | ||
) | ||
listItem.addContextMenuItems([ | ||
('Refresh list', util.getContextCommand('refresh')) | ||
], True) | ||
xbmcplugin.addDirectoryItem( | ||
handle = util.pluginId, | ||
url = url, | ||
listitem = listItem, | ||
isFolder = True | ||
) | ||
|
||
xbmcplugin.endOfDirectory(util.pluginId) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import xbmcplugin | ||
import xbmcgui | ||
import urllib | ||
|
||
import util as util | ||
|
||
def menu(): | ||
showId = util.pluginArgs['id'] | ||
season = int(util.pluginArgs['season']) | ||
episodes = util.api.getSeasons(showId, {'season': season}) | ||
episodeNums = episodes.keys() | ||
episodeNums.sort(key = int) | ||
thumbnailImage = util.api.getShowPoster(showId) | ||
|
||
for episodeNum in episodeNums: | ||
episode = episodes[episodeNum] | ||
|
||
listItem = xbmcgui.ListItem( | ||
label = episodeNum + '. ' + episode['status'] + ': ' + episode['name'], | ||
thumbnailImage = thumbnailImage | ||
) | ||
listItem.addContextMenuItems([ | ||
('Set Episode Status', util.getContextCommand('episodeStatus', [showId, season, episodeNum])), | ||
('Set Season Status', util.getContextCommand('seasonStatus', [showId, season])), | ||
('Manual Search', util.getContextCommand('episodeSearch', [showId, season, episodeNum])), | ||
('Refresh list', util.getContextCommand('refresh')) | ||
], True) | ||
xbmcplugin.addDirectoryItem( | ||
handle = util.pluginId, | ||
url = '', | ||
listitem = listItem, | ||
isFolder = False | ||
) | ||
|
||
xbmcplugin.endOfDirectory(util.pluginId) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import xbmcplugin | ||
import xbmcgui | ||
import urllib | ||
import re | ||
|
||
import util as util | ||
|
||
def menu(): | ||
releases = util.api.getFailed() | ||
releases.sort(key = lambda release: re.sub(r'^(?i)(the)\s+', '', release['release'])) | ||
|
||
for release in releases: | ||
listItem = xbmcgui.ListItem( | ||
label = str(release['release']) | ||
) | ||
listItem.addContextMenuItems([ | ||
('Refresh list', util.getContextCommand('refresh')) | ||
], True) | ||
xbmcplugin.addDirectoryItem( | ||
handle = util.pluginId, | ||
url = None, | ||
listitem = listItem, | ||
isFolder = False | ||
) | ||
|
||
xbmcplugin.endOfDirectory(util.pluginId) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import xbmcplugin | ||
import xbmcgui | ||
import urllib | ||
import re | ||
|
||
import util as util | ||
|
||
def menu(): | ||
history = util.api.getHistory() | ||
shows = {} | ||
|
||
for show in history: | ||
uId = str(show['tvdbid']) + '-' + str(show['season']) + '-' + str(show['episode']) | ||
if (not uId in shows) or (show['status'] == 'Downloaded'): | ||
shows[uId] = show | ||
|
||
shows = shows.values() | ||
shows.sort(key = lambda show: show['date'], reverse = True) | ||
|
||
for show in shows: | ||
url = util.getShowURL(show['tvdbid']) | ||
listItem = xbmcgui.ListItem( | ||
label = util.formatDateTime(show['date']) + ': ' + show['status'] + ' ' + util.formatEpisodeName(show), | ||
iconImage = util.getIcon('downloaded' if show['status'] == 'Downloaded' else 'snatched') | ||
#thumbnailImage = util.api.getShowPosterThumbnail(show['tvdbid']) | ||
) | ||
listItem.addContextMenuItems([ | ||
('Refresh list', util.getContextCommand('refresh')) | ||
], True) | ||
xbmcplugin.addDirectoryItem( | ||
handle = util.pluginId, | ||
url = url, | ||
listitem = listItem, | ||
isFolder = True | ||
) | ||
|
||
xbmcplugin.endOfDirectory(util.pluginId) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import xbmcplugin | ||
import xbmcgui | ||
|
||
import resources.lib.util as util | ||
|
||
def menu(): | ||
util.xbmcAddDirectory('Shows', 'shows') | ||
util.xbmcAddDirectory('Upcoming', 'upcoming') | ||
util.xbmcAddDirectory('History', 'history') | ||
util.xbmcAddDirectory('Backlog', 'backlog') | ||
util.xbmcAddDirectory('Failed Downloads', 'failed') | ||
util.xbmcEndDirectory() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import xbmc | ||
|
||
xbmc.executebuiltin('Container.Refresh') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import xbmcplugin | ||
import xbmcgui | ||
import urllib | ||
|
||
import util as util | ||
|
||
def menu(): | ||
showId = util.pluginArgs['id'] | ||
seasons = util.api.getSeasonList(showId) | ||
seasons.sort() | ||
thumbnailImage = util.api.getShowPoster(showId) | ||
|
||
for season in seasons: | ||
url = util.pluginURL + '?' + urllib.urlencode({ | ||
'vf': 'episodes', | ||
'id': showId, | ||
'season': season | ||
}) | ||
listItem = xbmcgui.ListItem( | ||
label = ('Season ' + str(season)) if season > 0 else 'Extras', | ||
thumbnailImage = thumbnailImage | ||
) | ||
listItem.addContextMenuItems([ | ||
('Refresh list', util.getContextCommand('refresh')) | ||
], True) | ||
xbmcplugin.addDirectoryItem( | ||
handle = util.pluginId, | ||
url = url, | ||
listitem = listItem, | ||
isFolder = True | ||
) | ||
|
||
xbmcplugin.endOfDirectory(util.pluginId) | ||
|
Oops, something went wrong.