Hello Community.
i've created a podcast-addon. It can handle opml.files and organized it in a folder structure. Additional it tracks, which article was "readed"(listened) and which not.
Till now, everything works well. but know i need two things.
How can i tell, the plugin-installer, to prepare a defined folder-structure in the userdata/plugins/<plugin>/-folder. I need some initial (editable) files. Is there any standartized way, to do this? Or do i have do handle it, in my pyhton-script aka "if (firstrun) ..."?
Second: To display the user, which articels are new/unreaded, the script have to gather all xml-files, parse them and check against local stored files. This takes some time. My opml files list around 20 podcast and it takes 20 till 30 seconds to gather all information on the initial screen. I would prefer id, to install a script, who is runned (in background) at the start and rerunned after a well defined time (f.e: 30 minutes) to build a index, so the user-experience speed up.
Raptor 2101
Senior Member Posts: 240 Joined: Sep 2010 Reputation: 1 |
2010-09-13 18:45
Post: #1
|
| find quote |
chippyash
Senior Member Joined: Jan 2010 Reputation: 0 Location: Northants, UK |
2010-09-13 21:24
Post: #2
Quote:i've created a podcast-addon. Well done you. Be interesting to see what it turns out like. As it happens, I'm doing a similar thing but using Gpodder as the podcatching backend. Not sure it will help but take a look at the documentation I'm producing for Addon devs. You can find the current version at http://trac.xbmc.org/attachment/ticket/10107/. If you do find a neat way of achieving what you want, I'd like to include it in the docs. Cheers System info: Asrock ION330HT-BD (Intel Atom 330 4 core i686) connected to Sony KDL-Z5800 TV using hdmi via Onkyo TX-SR507 AV Amp. [Old Config Ubuntu 12.04. (Linux 3.2.0-32-generic-pae ) XBMCBuntu (Eden 11.0 Git:unknown Compiled Mar 24 2012). OpenGL 3.3.0 NVIDIA 280.13] New Config unknown - no working XBMC at moment! |
| find quote |
Raptor 2101
Senior Member Posts: 240 Joined: Sep 2010 Reputation: 1 |
2010-09-14 22:46
Post: #3
you will find the needed files here... i will check you documentation as son as possible
http://blog.raptor2101.de/wp-content/upl...ackage.zip |
| find quote |
chippyash
Senior Member Joined: Jan 2010 Reputation: 0 Location: Northants, UK |
2010-09-14 23:48
Post: #4
If you check out the last appendix in the doc, there's a neat little class that you can use to determine what context your addon is running in. Then in your addon.xml file you put
Code: <extension point="xbmc.python.pluginsource" library="default.py">Hope it helps System info: Asrock ION330HT-BD (Intel Atom 330 4 core i686) connected to Sony KDL-Z5800 TV using hdmi via Onkyo TX-SR507 AV Amp. [Old Config Ubuntu 12.04. (Linux 3.2.0-32-generic-pae ) XBMCBuntu (Eden 11.0 Git:unknown Compiled Mar 24 2012). OpenGL 3.3.0 NVIDIA 280.13] New Config unknown - no working XBMC at moment!
(This post was last modified: 2010-09-14 23:55 by chippyash.)
|
| find quote |
chippyash
Senior Member Joined: Jan 2010 Reputation: 0 Location: Northants, UK |
2010-09-14 23:51
Post: #5
ha ha - see you found that hashlib isn't supported in Python 2.4 either. XBMC won't be on 2.6 or 2.7 for a long while yet. see http://forum.xbmc.org/showthread.php?tid=81047
System info: Asrock ION330HT-BD (Intel Atom 330 4 core i686) connected to Sony KDL-Z5800 TV using hdmi via Onkyo TX-SR507 AV Amp. [Old Config Ubuntu 12.04. (Linux 3.2.0-32-generic-pae ) XBMCBuntu (Eden 11.0 Git:unknown Compiled Mar 24 2012). OpenGL 3.3.0 NVIDIA 280.13] New Config unknown - no working XBMC at moment! |
| find quote |
chippyash
Senior Member Joined: Jan 2010 Reputation: 0 Location: Northants, UK |
2010-09-15 00:03
Post: #6
Raptor 2101 Wrote:How can i tell, the plugin-installer, to prepare a defined folder-structure in the userdata/plugins/<plugin>/-folder. I need some initial (editable) files. Is there any standartized way, to do this? Or do i have do handle it, in my pyhton-script aka "if (firstrun) ..."?I had a think about it. Put the template files into resources/data In your resources/setings.xml, create a hidden setting that is set to False. Create a class that handles the data to be read/managed which always checks the state of that setting. If false, then copy files from resources/data to the user folder (Jonathan wrote a comment on my trac ticket for the docs that points the way to accessing the user data folder,) set the setting true and off you go. System info: Asrock ION330HT-BD (Intel Atom 330 4 core i686) connected to Sony KDL-Z5800 TV using hdmi via Onkyo TX-SR507 AV Amp. [Old Config Ubuntu 12.04. (Linux 3.2.0-32-generic-pae ) XBMCBuntu (Eden 11.0 Git:unknown Compiled Mar 24 2012). OpenGL 3.3.0 NVIDIA 280.13] New Config unknown - no working XBMC at moment! |
| find quote |
Raptor 2101
Senior Member Posts: 240 Joined: Sep 2010 Reputation: 1 |
2010-10-02 20:49
Post: #7
i finaly rewrite the plug-in. I speed the whole thing up, while downloading the rss-feeds an store it locally and reload it after 30 minutes (if needed). So the user suffers an performance-impact at the "first read".
I solved the problem with the folder structure with initial checks and os.mkdir... now i have to get the file in the official repository ![]() preview-download: http://blog.raptor2101.de/wp-content/upl...atcher.zip |
| find quote |
nchall
Senior Member Posts: 144 Joined: Sep 2007 Reputation: 1 |
2010-10-06 01:25
Post: #8
is there any way to make this a script or plugin as well? just requesting that so it will work with xbmc on xbox.
|
| find quote |
Raptor 2101
Senior Member Posts: 240 Joined: Sep 2010 Reputation: 1 |
2010-10-10 21:59
Post: #9
Cause i'am rely on the PVR-Testing-Branch i have no option to test a conversion, but there should be no problem to convert the source-code to the old plugin-style.
meanwhile i've done some performance-improvements and a backgroundscript who can be run from the os side (cronjob / task) same link like above. |
| find quote |
nchall
Senior Member Posts: 144 Joined: Sep 2007 Reputation: 1 |
2010-10-12 00:35
Post: #10
not sure how to convert it. what i used to do was delete addon.xml and keep plugin.xml, but i don't see plugin.xml in the zip.
|
| find quote |


Search
Help