Skip to content

Commit

Permalink
1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
bigretromike committed Feb 3, 2016
1 parent 73373e9 commit 869347a
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 24 deletions.
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---------------------------------------------------------
WARNING
---------------------------------------------------------
This Plugin work only with not released version of JMMServer, till then please download JMMServer and compile it yourself to be able to use this plugin



---------------------------------------------------------
Nakamori Plugin
---------------------------------------------------------
Expand All @@ -23,7 +16,7 @@ The overwrite of player methods and fix for 'Playback failed' was lookup on foru

This is only hobby attempt to join both words of awesome and this is my first python project.

REMAMBER:
REMEMBER:
After adding add-on configure ip address and port in settings if needed (default: 127.0.0.1:8111)


Expand Down
6 changes: 3 additions & 3 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.nakamoriplugin" name="Nakamori Plugin" version="1.2.5" provider-name="BigRetroMike">
<addon id="plugin.video.nakamoriplugin" name="Nakamori Plugin" version="1.2.6" provider-name="BigRetroMike">
<extension point="xbmc.python.pluginsource" library="nakamori.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary lang="en">Nakamori Plugin enables you to browse your JMM collection within Kodi.</summary>
<description lang="en">Nakamori Plugin enables you to browse your JMM collection within Kodi without needing to reimport it. </description>
<description lang="en">Nakamori Plugin enables you to browse your JMM collection within Kodi without needing to reimport it in anyway. Thanks to this approach you are able to still manage your collection with JMM and use information you gathered there to pass them to Kodi. </description>
<platform>all</platform>
<license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
<language>en</language>
<source>https://github.com/bigretromike/nakamoriplugin/</source>
<email>bigretromike at gmail dot com</email>
<disclaimer lang="en">Remamber to change IP address in settings if your JMM Server is not on the same computer as Kodi.</disclaimer>
<disclaimer lang="en">Remember to change IP address in settings if your JMM Server is not on the same computer as Kodi.</disclaimer>
</extension>
</addon>
5 changes: 4 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
v1.2.6 (02/02/2016)
v1.2.6 (03/02/2016)
- Compatible with JMM Server v3.4.6.4
- New Icon (#8)
- Added '-continue-' item to move cursor on next not watched episode (#52)
- Little change in Settings

v1.2.5 (18/01/2016)
- Added support for few skins that use fanart as cover (ex. Mimic) (#59)
Expand Down
30 changes: 20 additions & 10 deletions nakamori.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ def addGUIItem(url, details, extraData, context=None, folder=True):
if extraData.get('type','video').lower() == "video":
context=[]
url_peep = sys.argv[2]
#xbmcgui.Dialog().ok('debug', url, str(extraData.get('source','none')) + " --- " + str(url_peep))
#if extraData.get('source','none') == 'tvseasons':
# url_peep = url_peep + "&anime_id=" + extraData.get('key') +"&cmd=vote"
# context.append(('Vote', 'RunScript(plugin.video.nakamoriplugin, %s, %s)' % (sys.argv[1] ,url_peep)))
if extraData.get('source','none') == 'tvshows':
url_peep = url_peep + "&anime_id=" + extraData.get('key')[2:]+"&cmd=vote"
context.append(('Vote', 'RunScript(plugin.video.nakamoriplugin, %s, %s)' % (sys.argv[1] ,url_peep)))
Expand Down Expand Up @@ -406,7 +402,7 @@ def buildTVEpisodes(params):
xbmcplugin.addSortMethod(handle, 28 ) #by MPAA

#value to hold position of not seen episode
nextepisode = 2
nextepisode = 1
episode_count = 0

for atype in e.findall('Video'):
Expand Down Expand Up @@ -484,8 +480,9 @@ def buildTVEpisodes(params):
details['playcount'] = 1
else:
details['playcount'] = 0
if (nextepisode == 2):
if (nextepisode == 1):
nextepisode = episode_count
nextepisode += 1

#Another Metadata
details['cast'] = tempcast
Expand All @@ -503,7 +500,7 @@ def buildTVEpisodes(params):
addGUIItem(u, details, extraData, context, folder=False)

#add item to move to not played item
util.addDir("-continue-", "url&offset=" + str(nextepisode+1), 7, "http://" + addon.getSetting("ipaddress") + ":" + addon.getSetting("port") + "/jmmserverkodi/GetSupportImage/plex_others.png","2","3","4")
util.addDir("-continue-", "url&offset=" + str(nextepisode), 7, "http://" + addon.getSetting("ipaddress") + ":" + addon.getSetting("port") + "/jmmserverkodi/GetSupportImage/plex_others.png","2","3","4")

xbmcplugin.endOfDirectory(handle)

Expand Down Expand Up @@ -550,13 +547,26 @@ def playVideo(url):

def playPlaylist(data):
# old and future implementation
#playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
#playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
#xbmcgui.Dialog().ok("playlist", str(playlist))
#xbmc.Player().play(playlist)
#nPlayer.playplaylist(playlist)
offset = data['offset']
win_id = getCurrentWindowId()
xbmc.executebuiltin("Control.SetFocus(" +str(handle) +", "+offset+")")
pos = int(offset)
if (pos == 1):
xbmcgui.Dialog().ok('Finished','You already finished this')
else:
win = xbmcgui.Window(xbmcgui.getCurrentWindowId())
cid = win.getFocusId()
ctl = win.getControl(cid)
ctl.selectItem(pos)
#temporary hack to prevent from going back on first item
xbmc.sleep(1000)
#Jarvis code:
#xbmc.executebuiltin("SetFocus(%i, %i)" % (cid, pos))

def TraktScrobble(data):
xbmcgui.Dialog().ok('WIP','WIP')

def voteSeries(params):
vote_list = [ 'Don\'t Vote', '10', '9', '8', '7', '6', '5', '4', '3', '2', '1' ,'0']
Expand Down
14 changes: 13 additions & 1 deletion resources/language/English/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ msgid "Notification window when marked as Watched"
msgstr ""

msgctxt "#32031"
msgid "Voting settings"
msgid "Community"
msgstr ""

msgctxt "#32032"
Expand All @@ -92,10 +92,22 @@ msgctxt "#32033"
msgid "TAG results Max Limit"
msgstr ""

msgctxt "#32038"
msgid "Trakt support"
msgstr ""

msgctxt "#32034"
msgid "(WIP)Series Vote after completing it"
msgstr ""

msgctxt "#32035"
msgid "(WIP)Enable voting for Trakt"
msgstr ""

msgctxt "#32036"
msgid "(WIP)Trakt Scrobble (without Notification)"
msgstr ""

msgctxt "#32037"
msgid "(WIP)Enable Trakt Scrobble Notification"
msgstr ""
2 changes: 1 addition & 1 deletion resources/lib/nakamoriPlayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def __init__ (self):
self.is_active = True
self.finished = False
xbmc.Player.__init__(self)
print("Player nakamori Initiated")
print("Player Nakamori Initiated <---------")

def play(self, listitem, windowed):
xbmc.Player().play(listitem=listitem)
Expand Down
3 changes: 3 additions & 0 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<category label="32031">
<setting label="32032" type="bool" id="voteallways" default="false"/>
<setting label="32034" type="bool" id="voteonseries" default="false"/>
<setting label="32038" type="lsep"/>
<setting label="32035" type="bool" id="trakt" default="false"/>
<setting label="32036" type="bool" id="traktscrobble" default="false"/>
<setting label="32037" type="bool" id="traktscrobblenotif" default="false"/>
</category>
</settings>

0 comments on commit 869347a

Please sign in to comment.