Kodi Community Forum
[RELEASE] Pneumatic - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] Pneumatic (/showthread.php?tid=97657)



- Popeye - 2011-08-15

j1nx Wrote:Hi Popeye,

I am a bit confused, hopefully you can help me out a little.

I haven't managed to get myself a nzbs.org login as of yet. So I need to use nzb.su

This is not a real problem as the API opens more doors for me over here in the Netherlands.

So you have two githups;
https://github.com/TsUPeR/xbmc-nzbs
The default, last updated on the 25th of July

https://github.com/TsUPeR/xbmc-nzb.su
A second one for nzb.su


Can you explain to me how to proceed from here if I want to use your plugin in combination with nzb.su

Thanks in advanced.

As thank you, expect the plugin translated to "Dutch" in return.

Hi, plugin.video.nzbs has the core function to stream so you need to install it and configure the SABnzbd part. The nzb.su plugin has the function for just that site so you need that too (configured with your settings). To stream just use the nzb.su plugin.
A note, only use the "official" releases and not a dump of master from github.


- Popeye - 2011-08-15

Mar2zz Wrote:I am having errors as soon as I try to enter the Incomplete folder. I double checked everything, chmod 777 and everything.
log:
http://pastebin.com/ns3udsX6

Installed both plugins (nzbs and nzbsu), they also work, send an nzb to sab. Sab has streaming on 1. It fills the incompletefolder with files, but nothing happens, and I still can't access the incompletefolder from your addon.


One featurerequest allready. nzb's on nzb.su can be incomplete (like 7mb of parts). So that doesn't contain a complete movie. Could you filter out incompletes, or show filesize perhaps for us to see which are complete and which not? I had several movies when I tested that downloaded for like 1 second and were done...\

Logs, excellent! Had a quick look and I suspect there is a parse error of the history xml from SAB (line 4455, column 60) that causes the plugin to fail list the incomplete folder. If you could get the character I'd be happy to do a fix for it. Flushing the history might help you in the short run.
File size? Sure that is a goog suggestion if its a common problem. Guess you should tell nzb.su about the problem too. See who gets it fixed first...

/Johan


- kebirek - 2011-08-16

Just to add for the general knowledge.
My SABnzbd is running in Windows 7
XMBC is running in Ubuntu. I had to mount my windows samba shares (it doesn't work if you set the paths to something like //your-pc/your_share
You have to mount the shares on a local folder (so the plugin just uses the folder as if it were local).

I'd be happy to help anyone with my scenario.
Thanks Popeye this is great!


- Mar2zz - 2011-08-16

Popeye Wrote:Logs, excellent! Had a quick look and I suspect there is a parse error of the history xml from SAB (line 4455, column 60) that causes the plugin to fail list the incomplete folder. If you could get the character I'd be happy to do a fix for it. Flushing the history might help you in the short run.
File size? Sure that is a goog suggestion if its a common problem. Guess you should tell nzb.su about the problem too. See who gets it fixed first...

/Johan

Thx that did it. I had a lot of history-items (~350, so I have not searched for that character).

newznab can set a minimum-size to make a release. Running my own server I will work with that. Maybe you could rewrite the nzb.su plugin to accept url's in settings, so we can easily setup multiple newznab-servers (like nzb.su is?) I will see if I can make it work, but I am no python hero...

I am not sure why nzb.su is not working with minimal release-size.


- j1nx - 2011-08-16

OK, thx Popeye, got it to work (with the help of Mar2zz).

Some feedback;
My system contains of a ubuntu 10.10 server on my addict, acting as NAS for all my media. This server has Sabnzbd installed (together with sickbeard, coachpotato, etc) and downloads all my wanted movies and series. XBMC is also running on this as the TV-Out is connected to the TV in the main bedroom.

A second system in the living room, recently updated with the last PVR build running on Ubuntu 11.04. This is my main XBMC system and the one I used/use for testing this plugin.

All my media is shared by SMB, because the desktop systems are used to browse the shares as well.


I readed in the thread there would be some error with the SMB:// protocol, so mounted the SMB share locally. This works partially. I can then browse the incomplete, use the plugin to select a movie. It will download, but as soon it wants to unpack the first rar file it fails because of permission errors. Sabnzbd uses a strict 0500 for all new files in the incomplete folder. Even after I forced the local smb mount to be done by the same user and credentials as the user sabnzbd is running with. Hence even mounted with root credentials wasn't doing the trick.

So, installed NFS on the server and client. (Needed to be done for a long time anyway). Exported the downloads folder on the server and mounted it on the client, making sure the anonymous and nogroup id's passed on were the same as the sabnzbd user and group.

I was then able to use the plugin as supposed. Sort off .....

1) Selecting the movie = OK
2) Sending the moving to sabnzbd = OK
3) Downloading the movie/1st rar = OK
4) Autoplay of the movie = OK
5) Watching = OK
6) Stopping the movie (end of test) = Movie stops, XBMC tries to get back to plugin screen, but hangs !

Could not find anything in the logs. Will investigate later what is causing the problem and will report back.

Thumbs up, so far!


- Mar2zz - 2011-08-16

woah I really suck @ python.

What I am trying to do is creating a newznabplugin. That's the nzb.su one, but for custom newznab-providers (I have 3 servers).

Ideal would be this:
Install the nzbs plugin. From that choose a plugin to use also (so it will download nzb.su for example as a plugin in a plugin). But also a newznab-plugin that can have a custom name (e.g. spotweb=dutch usenet community with newznab-api) and a custom url. All those set in settings.xml.

But, how do I change nzb.su to a plugin from which I can enter Name and URL as a variable?

You know what I am speaking about? Of course people will request this for nzbmatrix as wel. But maybe that uses a different api. Newznab-providers all use the same api-system, so only name, url, api and id are different.

By the way: I wrote a how to in Dutch for this plugin and asked people to test and post issues on github if any. Hope that's okay. (hoping it will speed up development to final state.) Here is the howto: http://mar2zz.tweakblogs.net/blog/6969/nzbs-streamen-in-xbmc.html


- Popeye - 2011-08-16

j1nx Wrote:OK, thx Popeye, got it to work (with the help of Mar2zz).
...

Could not find anything in the logs. Will investigate later what is causing the problem and will report back.

Thumbs up, so far!

Great to hear you got it working. I also use a NFS mount without any problems.

Mar2zz Wrote:woah I really suck @ python.

What I am trying to do is creating a newznabplugin. That's the nzb.su one, but for custom newznab-providers (I have 3 servers).

Ideal would be this:
Install the nzbs plugin. From that choose a plugin to use also (so it will download nzb.su for example as a plugin in a plugin). But also a newznab-plugin that can have a custom name (e.g. spotweb=dutch usenet community with newznab-api) and a custom url. All those set in settings.xml.

But, how do I change nzb.su to a plugin from which I can enter Name and URL as a variable?

You know what I am speaking about? Of course people will request this for nzbmatrix as wel. But maybe that uses a different api. Newznab-providers all use the same api-system, so only name, url, api and id are different.

By the way: I wrote a how to in Dutch for this plugin and asked people to test and post issues on github if any. Hope that's okay. (hoping it will speed up development to final state.) Here is the howto: http://mar2zz.tweakblogs.net/blog/6969/nzbs-streamen-in-xbmc.html

I'm not 100% sure I follow what you are trying to achieve. If you have another site using a similar api as nzb.su, why dont you just create a new plugin with the nzb.su as a template and change all references to nzb.su to whatever site you access? Remember to change the addon.xml since this is what XBMC reads during installation...


- j1nx - 2011-08-16

Popeye Wrote:Great to hear you got it working. I also use a NFS mount without any problems.



I'm not 100% sure I follow what you are trying to achieve. If you have another site using a similar api as nzb.su, why dont you just create a new plugin with the nzb.su as a template and change all references to nzb.su to whatever site you access? Remember to change the addon.xml since this is what XBMC reads during installation...

What Mar2zz is talking about is "Spotweb" which is based on the "Spotnet" principle. This is in fact the replacement for FTD if you everheard of that. (You might have called it "Fuck the Dutch")

Anyway, this system implemented an API which is exactly based on the newznab/nzb.su API. This way they didn't had to ask for another search engine implementation for sickbeard, couchpotato, etc.

Although the API is there, I don't think the RSS feeds are already implemented. So even if you find/replace all nzb.su references, still only the search option will work as all the categories are based on RSS feeds.


- Mar2zz - 2011-08-17

Not really. Well, yeah spotweb is one of the newznab providers I want to use.

I want to make 1 plugin for all 3 newznab-providers I have. Then a settings.xml with this:
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
    <!-- Plugin settings strings -->
    <string id="30005">Number of feed items</string>
    <!-- newznab -->
    <string id="30020">newznabname</string>
    <string id="30021"> - http://url.to.newznab</string>
    <string id="30022"> - Newznab1 id i</string>
    <string id="30023"> - Newznab1 r</string>
    <string id="30024"> - Hide XXX</string>
</strings>

This way the url to the newznab-site could be configurable from xbmc.


- Popeye - 2011-08-17

Mar2zz Wrote:Not really. Well, yeah spotweb is one of the newznab providers I want to use.

I want to make 1 plugin for all 3 newznab-providers I have. Then a settings.xml with this:
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
    <!-- Plugin settings strings -->
    <string id="30005">Number of feed items</string>
    <!-- newznab -->
    <string id="30020">newznabname</string>
    <string id="30021"> - http://url.to.newznab</string>
    <string id="30022"> - Newznab1 id i</string>
    <string id="30023"> - Newznab1 r</string>
    <string id="30024"> - Hide XXX</string>
</strings>

This way the url to the newznab-site could be configurable from xbmc.

As long as they share the same ID table
Code:
TABLE_NZB_SU = [['Movies', 2000],
        [' - HD', 2040],
        [' - SD', 2030],
        [' - Other', 2020],
        [' - Foreign', 2010],
        ['TV', 5000],
        [' - HD', 5040],
        [' - SD', 5030],
        [' - other', 5050],
        [' - Foreign', 5020],
        [' - Sport', 5060],
        [' - Anime', 5070],
        ['XXX', 6000],
        [' - DVD', 6010],
        [' - WMV', 6020],
        [' - XviD', 6030],
        [' - x264', 6040]]
It should be fairly simple ...


- Mar2zz - 2011-08-17

Code:
NEWZNAB_URL_SEARCH = (__settings__.getSetting("newznab_url") + "/api?dl=1&apikey=" + __settings__.getSetting("newznab_key") +
            "&num=" + str(NUMBER) + "&")

I forked your repo, will it work when it's like above (url as variable)? In my repo I changed all nzb.su to newznab and load the url from the settingsfile.

This should work for nzb.su also as I fill nzb.su in settings.xml?
I am sorry, but I suck @ python, still trying to learn it, small babysteps at a time Wink


- Popeye - 2011-08-17

Mar2zz I have no idea if it will work or not. The api must be exactly the same. You will have to do like I do, try, try again and again and again...
However grabbing the url form settings look ok as far as the python n00b I am to know..


- Mar2zz - 2011-08-17

The api is the same. newznab=nzb.su. One can setup an own newznab server which will act the same as nzb.su (same api, same source, see newznab.com for more info).

ok, wil test and try and test and try. I have only one machine that runs xbmc, so that will be something Smile

edit:
nearly there, need to fix some errors I don't understand, but interface works but no items... maybe this week I will have a working version for custom newznab providers.

edit2:
Yeah! It works! Custom newznab-provider (tested on my own server, another and nzb.su) works!
Added one extra field, Custom url, here you can enter any url to any newznab-site (so if you enter nzb.su it will work for nzb.su, but it can also work for localhost:10000/newznab.

Download:
https://github.com/downloads/Mar2zz/xbmc-newznab/xbmc-newznab-0.0.0.2.zip

Now the only thing is, for every newznab site I have to create another one. In the end I will have nzbs.org, nzb.su, my own newznab, some other newznab, and spotweb. That's like 5 plugins with the same goal.

Is it possible to throw all these plugins into one plugin? Like:
open nzbs-plugin. A selection screen is presented where all providers are listed. Choose a provider and that newznab loads.


- Popeye - 2011-08-18

Mar2zz Wrote:....
edit2:
Yeah! It works! Custom newznab-provider (tested on my own server, another and nzb.su) works!
....

Now the only thing is, for every newznab site I have to create another one. In the end I will have nzbs.org, nzb.su, my own newznab, some other newznab, and spotweb. That's like 5 plugins with the same goal.

Is it possible to throw all these plugins into one plugin? Like:
open nzbs-plugin. A selection screen is presented where all providers are listed. Choose a provider and that newznab loads.

Great! You should probably change the header of default.py...
The idea of having a wrapper of several services is not anything I'd like to maintain. But you can easily code a wrapper for your own favorite services.
I'm planning to remove the nzbs part to a plugin of its own and have a separate streaming core. Then others can code plugins for their favorite sites just like you have.
I'm hoping I can have a update ready soon...

To all who have crashes at the end of a movie. What does the logs say? What OS are you running? Did you have to repair?


- Mar2zz - 2011-08-19

what's a header? Smile This?
__settings__ = xbmcaddon.Addon(id='plugin.video.newznab')