• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 9
[REQUEST] RSS Reader Script Addon for Dharma?
#46
grajen3 Wrote:ok, https://github.com/pieh/script.rssclient

You can now watch videos (only youtube links for now) supplied to topics ("Press 'P' to play the video" will show up when there is video to play)

---edit
it's done without modification in YouTube plugin
Code:
xbmc.executebuiltin("XBMC.PlayMedia(plugin://plugin.video.youtube/?action=play_video&videoid=%s)" % ( id) )

Really? For me I get just "wrong handle given to SetResolvedUrl() and player doesn't start... Did you test this against youtube trunk?
Reply
#47
NordishByNature Wrote:Really? For me I get just "wrong handle given to SetResolvedUrl() and player doesn't start... Did you test this against youtube trunk?
Hmmm, I tested it again and it work for me: http://pastebin.com/kBiAU4UB

Code:
xbmc.executebuiltin("XBMC.PlayMedia(plugin://plugin.video.youtube/?action=play_video&videoid=%s)" % ( id) )
Important to use executebuiltin and xbmc.playmedia there. Using RunScript, RunPlugin or XBMC.Player().play(path) doesn't seem to work.
Reply
#48
smuto Wrote:can u take a look for yahoo pipes support

this is oryginal rss
http://serwisy.gazeta.pl/pub/rss/zczubatv.xml

& this is this same rss, but aggregate by Yahoo Pipes
http://pipes.yahoo.com/pipes/pipe.run?_i...render=rss

smuto
Thanks for the report - fixed now.
https://github.com/pieh/script.rssclient
Reply
#49
Hello!

Great work with this..

But is this threading stuff really needed? I would like to rewrite the parsing part. There is a very efficent lib called UniversalParser. I just fetched your changes from git and will put up a version without threading tonight. I know you forked the code also, maybe we could clean the whole thing up and make it really great.

I have still problems with gui lockups btw. I'm struggling with this onSelect stuff. Seems not very stable for me...

Another skin issue:
In 16:9 we should not use the full width for because of readabilty.

I made a small mockup, what do you think?

Image
Reply
#50
NordishByNature Wrote:Hello!
But is this threading stuff really needed? I would like to rewrite the parsing part. There is a very efficent lib called UniversalParser. I just fetched your changes from git and will put up a version without threading tonight. I know you forked the code also, maybe we could clean the whole thing up and make it really great.
I was starting with forking, but eventually I rewrote whole code myself, due to some roadblocks in code I was modding (multirss). I surely appreciate help with it, as I'm rather new to Python (I have experience with Java, c++, c#, php, SQL) and don't know anything about available libs.

About threading: Main target was to not lock GUI while reading RSS feeds. Deamon thread is created to read,parse rss from cache and read,cache,parse rss from internet and update GUI after parsing.

NordishByNature Wrote:I have still problems with gui lockups btw. I'm struggling with this onSelect stuff. Seems not very stable for me...
I'm aware of it. But currently I don't have time to play with it. I'm always open for suggestions Smile

NordishByNature Wrote:Another skin issue:
In 16:9 we should not use the full width for because of readabilty.

I made a small mockup, what do you think?
It looks really good. I said earlier that I'm not skinner and didn't want to make fancy looking GUI - just the GUI that works. If people are able to do it, I will gladly add it. For now, I will just not waste my time on doing/coding/designing/maintaining GUI while I still do massive changes to code side.
Reply
#51
some preview: http://www.youtube.com/watch?v=72k7dPRE2Ww - youtube videos
Reply
#52
Waoooo!!! Class!

Great Job
Reply
#53
Ok, got some time to document some stuff from the script:

Attaching RSS to window (Like Home Window)

Here's some preview - http://www.youtube.com/watch?v=i90MSaG93Qs

Running script is similiar to running Recently Added script:
Code:
        <control type="button" id="8999">
            <description>Run Recently added</description>
            <posx>-20</posx>
            <posy>-20</posy>
            <width>1</width>
            <height>1</height>
            <label>-</label>
            <font>-</font>
            <onfocus>XBMC.RunScript(script.recentlyadded,limit=4)</onfocus>
            [color=#FF0000][b]<onfocus>XBMC.RunScript(script.rssclient,guiless,feed=http://pipes.yahoo.com/pipes/pipe.run?_id=9c377c68a206d6ae8f2889db97f10084&_render=rss,limit=15)</onfocus>[/b][/color]
            <onfocus>SetFocus(9000)</onfocus>
            <texturenofocus>-</texturenofocus>
            <texturefocus>-</texturefocus>
            <visible>Skin.HasSetting(homepageHideRecentlyAdded)</visible>
        </control>

I think parameters are pretty self-explanatory:
  • guiless - don't create script's window
  • feed=http://pipes.yahoo.com/pipes/pipe.run?_id=9c377c68a206d6ae8f2889db97f10084&_render=rss - specify source of RSS items (if not used, default feeds from rssfeeds.xml are used)
  • limit=15 - setting item limit

Ok, script is reading feeds - now we need a way to show them, so let's create list for them (I won't write about using list - info is available in skinning manual) with static content:
Code:
<control type="list" id="XXX">
    [...] <- list parameters, etc.
    <content>
        <item id="1">
            <label>$INFO[Window.Property(RSS.1.Title)]</label>
            <label2>$INFO[Window.Property(RSS.1.Desc)]</label2>
            <onclick>SetProperty(RSS.Date,$INFO[Window.Property(RSS.1.Date)])</onclick>
            <onclick>SetProperty(RSS.Channel,$INFO[Window.Property(RSS.1.Channel)])</onclick>
            <onclick>SetProperty(RSS.Media,$INFO[Window.Property(RSS.1.Media)])</onclick>
            <onclick>Control.SetFocus(30002)</onclick>
            <icon>$INFO[Window.Property(RSS.1.Image)]</icon>
            <thumb>-</thumb>
            <visible>IntegerGreaterThan(Window.Property(RSS.count),1)</visible>
        </item>
    </content>
</control>

Explanation of <onclick>Control.SetFocus(30002)</onclick>:

To display item's I've used Group Control:
Code:
<control type="group">
    [...] - controls displaying item's content, date, channel, header, image
    <control type="button" id="30002">
        <onup>30004</onup>
        <ondown>30050</ondown>
        <onleft>9000</onleft>
        <onright>9000</onright>
        <onclick>Control.SetFocus(XXX)</onclick>
        <posx>-20</posx>
        <posy>-20</posy>
        <width>1</width>
        <height>1</height>
        <visible>True</visible>
    </control>
    <control type="button" id="30004">
        <onfocus>SetFocus(30002)</onfocus>
        <onfocus>XBMC.PlayMedia($INFO[Window.Property(RSS.Media)])</onfocus>
        <posx>-20</posx>
        <posy>-20</posy>
        <width>1</width>
        <height>1</height>
        <visible>!StringCompare(Window.Property(RSS.Media),none)</visible>
    </control>
    <control type="button" id="30004">
        <onfocus>SetFocus(30050)</onfocus>
        <posx>-20</posx>
        <posy>-20</posy>
        <width>1</width>
        <height>1</height>
        <visible>StringCompare(Window.Property(RSS.Media),none)</visible>
    </control>
    <visible>Control.HasFocus(30002)</visible>
</control>


And of course way to display item:
Code:
$INFO[Container(XXX).ListItem(0).Label] - displaying current's item header
$INFO[Container(XXX).ListItem(0).Label2] - displaying current's item text
$INFO[Container(XXX).ListItem.Icon] - current's item image url (empty if there is no image)
<visible>!StringCompare(Container(XXX).ListItem.Icon,)</visible> - checking if there is image for current item (control is visible if there is image)
$INFO[Window.Property(RSS.Date)] - displaying current's item date
$INFO[Window.Property(RSS.Channel)] - displaying current's item channel name

---

Playing media (just youtube now):

<label>Press 'UP' to play attached media</label>
<visible>!StringCompare(Window.Property(RSS.Media),none)</visible>

and

<onfocus>XBMC.PlayMedia($INFO[Window.Property(RSS.Media)])</onfocus>


---
Reply
#54
thanx for the guiless implementation and the documentation grajen3!

did a bit of skinning with it tonight and it's definitely working like a charm.

very, very cool script. cheers mate!
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#55
Quote:Playing media (just youtube now):

maybe u find time to add more playable staff

i create more pipes to have playable rss xbmc source

u can take a look
http://trac.xbmc.org/browser/trunk/xbmc/...ectory.cpp

and my pipes
- LechTV
http://pipes.yahoo.com/pipes/pipe.run?_i...render=rss

- sport.pl
http://pipes.yahoo.com/pipes/pipe.run?_i...render=rss

- Onet Muzyka
http://pipes.yahoo.com/pipes/pipe.run?_i...render=rss

- 990px - random 3 albums - i use it as slideshow screensaver
http://pipes.yahoo.com/pipes/pipe.run?_i...render=rss

smuto
Reply
#56
smuto Wrote:maybe u find time to add more playable staff

i create more pipes to have playable rss xbmc source

u can take a look
http://trac.xbmc.org/browser/trunk/xbmc/...ectory.cpp

and my pipes
- LechTV
http://pipes.yahoo.com/pipes/pipe.run?_i...render=rss

- sport.pl
http://pipes.yahoo.com/pipes/pipe.run?_i...render=rss

- Onet Muzyka
http://pipes.yahoo.com/pipes/pipe.run?_i...render=rss

- 990px - random 3 albums - i use it as slideshow screensaver
http://pipes.yahoo.com/pipes/pipe.run?_i...render=rss

smuto
Thanks for feedback, I modified parsing part to get more medias - you can download it from https://github.com/pieh/script.rssclient
Tested and working Sport.pl, onet muzyka, 990px random images. Unfortunately there is nothing I can do about LechTV, because RSS doesn't provide any URL for video: (a szkoda, bo fajnie by było jakby filmiki z Lecha działały Smile )

Code:
<item>
         <title>Tak strzelał Rudnevs</title>
         <link>http://www.lechpoznan.tv/</link>
         <description>Bramki łotewskiego snajpera przy Bułgarskiej.</description>
         <guid isPermaLink="false">4151</guid>
         <pubDate>Fri, 03 Dec 2010 08:00:00 +0000</pubDate>
         <media:content duration="185" type="video/wmv"/>
         <media:title duration=""/>
         <media:thumbnail url="http://static.lechpoznan.tv/Images/330x215/4151.jpg"/>
         <enclosure type="video/wmv" duration="3:05"/>
      </item>
Reply
#57
I thought XBMC has a built in RSS reader ? Doesn't it handle video ? Wouldn't it be better if RSS was treated as addon plugin, hence all meta information required for xbmc plugin will be provided by RSS ?

Are you planning on adding private rss feeds support ?

I take it all of this features in Boxee RSS feed is supported .. http://developer.boxee.tv/RSS_Specification ..
The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
Reply
#58
CrashX Wrote:I thought XBMC has a built in RSS reader ? Doesn't it handle video ? Wouldn't it be better if RSS was treated as addon plugin, hence all meta information required for xbmc plugin will be provided by RSS ?
Yes, but builtin RSS reader is more like source of video, music feeds. My script is more about displaying text (with possibility of playing video and displaying images). Sure, propably RSS reader could be moved out of XBMC core. But this isn't up to me Smile

CrashX Wrote:Are you planning on adding private rss feeds support ?
If time and 'internet knowledge' allow me, then yes Smile

CrashX Wrote:I take it all of this features in Boxee RSS feed is supported .. http://developer.boxee.tv/RSS_Specification ..
I think it's some custom boxee format to add content to boxee's library. It's supported by XBMC, but it suits more for builtin RSS video source than for my script.
Reply
#59
2 questions
- can u add 'media:thumbnail'? - maybe something like this
PHP Code:
item.image itemXML.getElementsByTagName('media:thumbnail')[0].attributes['url'].nodeValue 

- if i wanted more than one channel to window (Like Home Window), can u set Property?

& one extra for set id
Quote:feed=http://pipes.yahoo.com/pipes/pipe.run?_id=9c377c68a206d6ae8f2889db97f10084&_ren der=rss - specify source of RSS items (if not used, default feeds from rssfeeds.xml are used)
- is possible to give id instead of specify source, something like this
XBMC.RunScript(script.rssclient,guiless,feed=id="1",limit=15)

smuto

ps. it's definitely working like a charm

Image

my edits of confluence skin
Home.xml
IncludesHomeRecentlyAdded.xml/
Reply
#60
Hi grajen, you've made great progress since my last visit!

I've been playing around with the help of your documentation and everything works as it should for me except for the image thumb.

I can't seem to get it to work, nothing shows at all. I use Dharma RC1 if that is a problem. Could you please help me figure out what I'm doing wrong?
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 9

Logout Mark Read Team Forum Stats Members Help
[REQUEST] RSS Reader Script Addon for Dharma?1
This forum uses Lukasz Tkacz MyBB addons.