Skip to content

Commit

Permalink
standalone update + readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Feb 8, 2011
1 parent 099abf5 commit af3b102
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 9 deletions.
4 changes: 3 additions & 1 deletion HowTo/rssclient_howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ There is also one more global property:

RSS.count - holds count of RSS items passed to skin (usefull if script will return less items than skinner wanted - limit parameter)

**Using properites**:
## Using properites:

**In list**

First we have to populate some container control

Expand Down
68 changes: 68 additions & 0 deletions HowTo/skinning_standalone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Skinning window for standalone RSS client

First of all name Your file 'script-rssclient-standalone-main.xml'.

## Important controls:

Container for RSS channels (List / wraplist / fixedlist / panel)
You need to add this (even if it will be just dummy control)

<control type="list" id="30051">
<description>Container for RSS channels</description>
[ ... ]
</control>

Container for RSS items (List / wraplist / fixedlist / panel)
You need to add this

<control type="list" id="30050">
<description>Container for RSS items</description>
[ ... ]
</control>

## Available info (for item list - container with id = 30050):

ListItem.Label - Header of RSS item
ListItem.Property(desc) - Text message of RSS item
ListItem.Property(channeltext) - Name of channel to which RSS item belongs
ListItem.Property(link) - Unique index of RSS item (often link to article)
ListItem.Property(date) - Date of RSS item
ListItem.Property(image) - Link to image attached to RSS item (empty if no image)
ListItem.Property(imageCount) - Number of images attached to RSS item
ListItem.Property(image.X) - Link to Xth image attached to RSS item (X is 1 to imageCount)
ListItem.Property(slideshowable) - Returns 'true' if You can start slideshow/use multiimage control (there have to be more than 1 image and user have to enable image caching in addon settings)
ListItem.Property(video) - Link to video attached to RSS item (empty if no video)
ListItem.Property(read) - Returns 'true' if user already read this item (if User press Select (Enter key in default keymap) or if User have item selected for more than 1.5 seconds)

## Some Examples:

Images - multiimage or image control. Group will be visible if there is any image (in particular first item)

<control type="group">
<control type="image">
<posx>X</posx>
<posy>Y</posy>
<width>W</width>
<height>H</height>
<texture>$INFO[Container(30050).ListItem(0).Property(image)]</texture>
<aspectratio scalediffuse="false" align="center" aligny="top">keep</aspectratio>
<visible>!Container(30050).ListItem.Property(slideshowable)</visible>
</control>
<control type="multiimage">
<posx>X</posx>
<posy>Y</posy>
<width>W</width>
<height>H</height>
<imagepath>$INFO[Container(30050).ListItem(0).Property(multiimagepath)]</imagepath>
<aspectratio scalediffuse="false" align="center" aligny="top">keep</aspectratio>
<timeperimage>A</timeperimage>
<fadetime>B</fadetime>
<pauseatend>C</pauseatend>
<randomize>D</randomize>
<loop>E</loop>
<visible>Container(30050).ListItem.Property(slideshowable)</visible>
</control>
<visible>!StringCompare(Container(30050).ListItem(0).Property(image),)</visible>
</control>


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Download [Repo installer](https://github.com/downloads/pieh/pieh-xbmc-addons/rep

## RSS Client (script.rssclient-standalone)

Standalone RSS Client. Provides dedicated GUI for browsing through RSS Feeds. Allow user to open attached media (Images and Videos).
Standalone RSS Client. Provides dedicated GUI for browsing through RSS Feeds. Allow user to open attached media (Images and Videos). Skinning readme [How To](http://github.com/pieh/pieh-xbmc-addons/blob/master/HowTo/skinning_standalone.md)

## RSS Client Background (script.rssclient)

Expand Down
22 changes: 15 additions & 7 deletions script.rssclient-standalone/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,14 @@ def onInit(self):
self.channelList = self.getControl(30051)
self.itemList = self.getControl(30050)

self.image = self.getControl(30011)
self.justtext = self.getControl(30009)
#self.image = self.getControl(30011)
#self.justtext = self.getControl(30009)
#self.textandimage = self.getControl(30010)
#self.dateLabel = self.getControl(30008)
self.sortButton =self.getControl(39003)
try:
self.sortButton =self.getControl(39003)
except:
pass

self.isReady = True
self.channelList.selectItem(0)
Expand All @@ -257,8 +260,11 @@ def onInit(self):


def updateSortButton(self):
self.sortButton.setLabel("SORT BY: %s" % self.sortmodes[self.sortmode])
self.updateItemListWork(True)
try:
self.updateItemListWork(True)
self.sortButton.setLabel("SORT BY: %s" % self.sortmodes[self.sortmode])
except:
pass

def updateChannelList(self):
if not self.updateChannelListWork(False):
Expand Down Expand Up @@ -595,7 +601,7 @@ def onAction(self, action):
self.setAsRead(self.currentChan)
elif id == 39999 and action in ACTION_SELECT:
addon.openSettings()
print 'lol'


tmp_includeHTMLsIMG = addon.getSetting('htmlimg') in ['true', 'True', 1]
tmp_imageCachingEnabled = addon.getSetting('imagecaching') in ['true', 'True', 1]
Expand Down Expand Up @@ -663,6 +669,8 @@ def setItemAsRead(self, link, read, inverse):
self.checkIfChannelRead(chan)

def updateText(self):
return

for set in self.sets:
for source in set.sources:
for channel in source.channels:
Expand Down Expand Up @@ -859,7 +867,7 @@ def run(self):

checkDir(xbmc.translatePath('special://masterprofile/Thumbnails/RSS'))

ui = VideoGUI( "rss.xml", os.getcwd(), "default" )
ui = VideoGUI( "script-rssclient-standalone-main.xml", os.getcwd(), "default" )
ui.selectBuiltin = selectBuiltin
ui.sets = sets

Expand Down

0 comments on commit af3b102

Please sign in to comment.