Permalink
Browse files

First attempt, includes redesigned dialog

  • Loading branch information...
1 parent 87408d4 commit 6bbdf070f569327edf6f7171f1d56173bdcd225b @othrayte othrayte committed May 9, 2011
View
@@ -41,7 +41,7 @@ def doRateMovie(movieid):
# display rate dialog
import windows
ui = windows.RateMovieDialog("rate.xml", __settings__.getAddonInfo('path'), "Default")
- ui.initDialog(imdbid, title, year)
+ ui.initDialog(imdbid, title, year, getMovieRatingFromTrakt(imdbid, title, year))
ui.doModal()
del ui
@@ -68,6 +68,6 @@ def doRateEpisode(episodeid):
# display rate dialog
import windows
ui = windows.RateEpisodeDialog("rate.xml", __settings__.getAddonInfo('path'), "Default")
- ui.initDialog(tvdbid, title, year, season, episode)
+ ui.initDialog(tvdbid, title, year, season, episode, getEpisodeRatingFromTrakt(tvdbid, title, year, season, episode))
ui.doModal()
del ui
@@ -63,16 +63,18 @@
<string id="1162">not found in your XBMC Library</string>
<string id="1163">Retreiving information from Trakt servers</string>
<string id="1164">Cross-referencing with local information</string>
- <string id="1166">I don't know</string>
+ <string id="1166"></string>
<string id="1167">Rating submitted successfully</string>
<string id="1168">Error submitting rating</string>
<string id="1300">Checking XBMC Database for new seen Movies</string>
<string id="1301">Checking Trakt Database for new seen Movies</string>
<string id="1302">Unable to play movie</string>
- <string id="1303">How would you rate that movie?</string>
- <string id="1304">How would you rate that episode?</string>
+ <string id="1303">Rate that movie?</string>
+ <string id="1304">Rate that episode?</string>
<string id="1305">Rate whole show</string>
- <string id="1306">How would you rate that show?</string>
+ <string id="1306">Rate that show?</string>
+ <string id="1307">Unrate</string>
+ <string id="1308">Unrated</string>
<!-- auto update / sync -->
<string id="1180">start movie collection update</string>
@@ -5,7 +5,7 @@
<coordinates>
<system>1</system>
<posx>510</posx>
- <posy>250</posy>
+ <posy>270</posy>
</coordinates>
<controls>
<control type="image" id="98">
@@ -20,23 +20,11 @@
<fadetime>20</fadetime>
<aspectratio>scale</aspectratio>
</control>
- <control type="image" id="99">
- <description>Background</description>
- <posx>0</posx>
- <posy>50</posy>
- <width>300</width>
- <height>150</height>
- <visible>true</visible>
- <colordiffuse>cc222222</colordiffuse>
- <texture>w1x1.png</texture>
- <fadetime>20</fadetime>
- <aspectratio>scale</aspectratio>
- </control>
<control type="image">
<description>Header</description>
<posx>0</posx>
<posy>0</posy>
- <width>300</width>
+ <width>260</width>
<height>50</height>
<visible>true</visible>
<colordiffuse>f6111111</colordiffuse>
@@ -48,7 +36,7 @@
<description>Heading</description>
<posx>0</posx>
<posy>0</posy>
- <width>300</width>
+ <width>260</width>
<height>50</height>
<visible>true</visible>
<align>center</align>
@@ -61,43 +49,68 @@
<shadowcolor>ff222222</shadowcolor>
<wrapmultiline>false</wrapmultiline>
</control>
+ <control type="image">
+ <description>Area 1</description>
+ <posx>0</posx>
+ <posy>50</posy>
+ <width>260</width>
+ <height>45</height>
+ <visible>true</visible>
+ <colordiffuse>cc222222</colordiffuse>
+ <texture>w1x1.png</texture>
+ <fadetime>20</fadetime>
+ <aspectratio>scale</aspectratio>
+ </control>
+ <control type="image">
+ <description>Area 2</description>
+ <posx>0</posx>
+ <posy>95</posy>
+ <width>260</width>
+ <height>95</height>
+ <visible>true</visible>
+ <colordiffuse>cc111111</colordiffuse>
+ <texture>w1x1.png</texture>
+ <fadetime>20</fadetime>
+ <aspectratio>scale</aspectratio>
+ </control>
<control type="button" id="101">
- <description>Love</description>
- <posx>35</posx>
+ <description>Current not rated</description>
+ <posx>20</posx>
<posy>60</posy>
<width>100</width>
- <height>75</height>
+ <height>25</height>
<visible>true</visible>
- <texturefocus>love.png</texturefocus>
- <texturenofocus diffuse="44000000">love_f.png</texturenofocus>
+ <texturefocus>current-no-rating.png</texturefocus>
+ <texturenofocus diffuse="44000000">current-no-rating.png</texturenofocus>
<colordiffuse>ffffffff</colordiffuse>
- <label></label>
- <textcolor>ffffffff</textcolor>
- <focusedcolor>ffaaaaaa</focusedcolor>
+ <label>Unrated</label>
+ <textcolor>ff666666</textcolor>
+ <focusedcolor>ffffffff</focusedcolor>
<disabledcolor>80ffffff</disabledcolor>
- <align></align>
- <aligny></aligny>
+ <align>center</align>
+ <aligny>center</aligny>
<textoffsetx></textoffsetx>
<textoffsety></textoffsety>
<pulseonselect>true</pulseonselect>
<onclick>-</onclick>
<onfocus>-</onfocus>
<onup>105</onup>
<ondown>102</ondown>
- <onleft>103</onleft>
- <onright>103</onright>
+ <onleft>104</onleft>
+ <onright>102</onright>
+ <font>font12</font>
</control>
<control type="button" id="102">
- <description>I dont know</description>
+ <description>Current love</description>
<posx>20</posx>
- <posy>145</posy>
- <width>260</width>
- <height>40</height>
+ <posy>60</posy>
+ <width>100</width>
+ <height>25</height>
<visible>true</visible>
- <font>font13</font>
- <texturefocus></texturefocus>
- <texturenofocus></texturenofocus>
+ <texturefocus>current-love.png</texturefocus>
+ <texturenofocus diffuse="44000000">current-love.png</texturenofocus>
<colordiffuse>ffffffff</colordiffuse>
+ <label> Unrate</label>
<textcolor>ff666666</textcolor>
<focusedcolor>ffffffff</focusedcolor>
<disabledcolor>80ffffff</disabledcolor>
@@ -109,15 +122,95 @@
<onclick>-</onclick>
<onfocus>-</onfocus>
<onup>101</onup>
+ <ondown>103</ondown>
+ <onleft>101</onleft>
+ <onright>103</onright>
+ <font>font12</font>
+ </control>
+ <control type="button" id="103">
+ <description>Current hate</description>
+ <posx>20</posx>
+ <posy>60</posy>
+ <width>100</width>
+ <height>25</height>
+ <visible>true</visible>
+ <texturefocus>current-hate.png</texturefocus>
+ <texturenofocus diffuse="44000000">current-hate.png</texturenofocus>
+ <colordiffuse>ffffffff</colordiffuse>
+ <label> Unrate</label>
+ <textcolor>ff666666</textcolor>
+ <focusedcolor>ffffffff</focusedcolor>
+ <disabledcolor>80ffffff</disabledcolor>
+ <align>center</align>
+ <aligny>center</aligny>
+ <textoffsetx></textoffsetx>
+ <textoffsety></textoffsety>
+ <pulseonselect>true</pulseonselect>
+ <onclick>-</onclick>
+ <onfocus>-</onfocus>
+ <onup>102</onup>
<ondown>105</ondown>
+ <onleft>102</onleft>
+ <onright>104</onright>
+ <font>font12</font>
+ </control>
+ <control type="button" id="104">
+ <description>Skip</description>
+ <posx>140</posx>
+ <posy>60</posy>
+ <width>100</width>
+ <height>25</height>
+ <visible>true</visible>
+ <texturefocus>skip-rating.png</texturefocus>
+ <texturenofocus diffuse="44000000">skip-rating.png</texturenofocus>
+ <colordiffuse>ffffffff</colordiffuse>
+ <label></label>
+ <textcolor>ff666666</textcolor>
+ <focusedcolor>ffffffff</focusedcolor>
+ <disabledcolor>80ffffff</disabledcolor>
+ <align>center</align>
+ <aligny>center</aligny>
+ <textoffsetx></textoffsetx>
+ <textoffsety></textoffsety>
+ <pulseonselect>true</pulseonselect>
+ <onclick>-</onclick>
+ <onfocus>-</onfocus>
+ <onup>106</onup>
+ <ondown>106</ondown>
<onleft>103</onleft>
<onright>101</onright>
<font>font12</font>
</control>
- <control type="button" id="103">
+ <control type="button" id="105">
+ <description>Love</description>
+ <posx>20</posx>
+ <posy>105</posy>
+ <width>100</width>
+ <height>75</height>
+ <visible>true</visible>
+ <texturefocus>love.png</texturefocus>
+ <texturenofocus diffuse="44000000">love_f.png</texturenofocus>
+ <colordiffuse>ffffffff</colordiffuse>
+ <label></label>
+ <textcolor>ffffffff</textcolor>
+ <focusedcolor>ffaaaaaa</focusedcolor>
+ <disabledcolor>80ffffff</disabledcolor>
+ <align></align>
+ <aligny></aligny>
+ <textoffsetx></textoffsetx>
+ <textoffsety></textoffsety>
+ <pulseonselect>true</pulseonselect>
+ <onclick>-</onclick>
+ <onfocus>-</onfocus>
+ <onup>103</onup>
+ <ondown>101</ondown>
+ <onleft>106</onleft>
+ <onright>106</onright>
+ </control>
+ <control type="button" id="106">
<description>Hate</description>
- <posx>175</posx>
- <posy>60</posy>
+ <posx>140</posx>
+ <posy>105</posy>
<width>100</width>
<height>75</height>
<visible>true</visible>
@@ -135,25 +228,25 @@
<pulseonselect>true</pulseonselect>
<onclick>-</onclick>
<onfocus>-</onfocus>
- <onup>105</onup>
- <ondown>102</ondown>
- <onleft>101</onleft>
- <onright>101</onright>
+ <onup>104</onup>
+ <ondown>104</ondown>
+ <onleft>105</onleft>
+ <onright>105</onright>
</control>
- <control type="image" id="104">
+ <control type="image" id="107">
<description>extention for rate show button</description>
<posx>0</posx>
- <posy>225</posy>
- <width>300</width>
+ <posy>210</posy>
+ <width>260</width>
<height>50</height>
<colordiffuse>F6111111</colordiffuse>
<texture>w1x1.png</texture>
</control>
- <control type="button" id="105">
+ <control type="button" id="108">
<description>Rate show</description>
<posx>0</posx>
- <posy>225</posy>
- <width>300</width>
+ <posy>210</posy>
+ <width>260</width>
<height>50</height>
<angle>0</angle>
<align>center</align>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -2,7 +2,8 @@
#
import xbmc,xbmcaddon,xbmcgui
-import telnetlib, time, simplejson
+import telnetlib, time
+import simplejson as json
from utilities import *
from rating import *
from sync_update import *
@@ -77,7 +78,7 @@ def autostart():
if watchedTime <> 0:
Debug("[Rating] Time watched: "+str(watchedTime)+", Item length: "+str(totalTime))
if 'type' in curVideo and 'id' in curVideo:
- if totalTime/2 < watchedTime:
+ #if totalTime/2 < watchedTime:
if curVideo['type'] == 'movie' and rateMovieOption == 'true':
doRateMovie(curVideo['id'])
if curVideo['type'] == 'episode' and rateEpisodeOption == 'true':
Oops, something went wrong.

0 comments on commit 6bbdf07

Please sign in to comment.