Kodi Community Forum

Full Version: [CLOSED] ownCloud v6-v9 - A Video and Music Add-on
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
thx. ill have a look tomorrow
Finally this is something ive been waiting for Big Grin please create a repo makes it easier to update

http://wiki.xbmc.org/index.php?title=HOW...or_add-ons

really awesome no dropbox crap etc.
I'll create a repo today and post back with it when its done.

Any issues, bugs, features, questions anyone has, feel free to post and I'll try my best to resolve them
I have been testing the plugin, and it doesn't work here. After much debugging, I found out that it will not work on an nginx install of owncloud, and neither if file encryption is enabled in owncloud, because both settings break support for http(s) range requests.

Support for nginx is possible if a different owncloud api is used: /index.php/apps/documents/ajax/download.php?path= instead of index.php/apps/files/ajax/download.php?dir=&file=, with the former supporting range requests on all webservers and the latter only on apache. But note that the implementation is very inefficient, with the requirement of loading the full video file in a server process (so memory limits in php must be set really high).

Support for encrypted files requires fixes in owncloud. I will submit these fixes to the project soon.

That said, after fixing owncloud I managed to access it from xbmc using the buildin webdav client. It's really efficient now: very fast and limited resource use. So we may not need a plugin after all.
Has this been tested with OC7 since my authentication keeps failing with the above methods.
Thanks for starting this Addon!
Some remarks:
I am working with a self hosted OC 6.0.4 on a linux debian server. Client is raspberry pi using XBMC 13.1.

When trying to login the server answers with an internal representation of the username in form of
data-user="cdef9bbc-f432-1031-884f-39f7c9039ff7"

so in the file resources/lib/owncloud.py it seems to be enough to check following:
Code:
#validate successful login
        for r in re.finditer('(data-user)\=\"([^\"]+)\"',
                             response_data, re.DOTALL):
            loginType,loginResult = r.groups()
        log("got login result="+loginResult,True)
        if (loginResult == 0 or loginResult == 0):

When using "JSON" method I can play one song additional connect result in
Code:
ERROR: Previous line repeats 11 times.
ERROR: CCurlFile::Stat - Failed: SSL connect error(35) https://test....
or
Code:
ERROR: CCurlFile::Stat - Failed: Timeout was reached(28) for https://test....

In "Disk Cache" mode I did not see any file but only subdirectory entries, so it's impossible to play anything.

In "Memory Cache" mode I saw the file entries but no play. This was the only mode to display file names with spaces and non alphanumerical characters correctly (e.g. "Test Artist - Song #14.mp3")
when trying to play a file I get
Code:
ERROR: CCurlFile::FillBuffer - Failed: Timeout was reached(28)
09:28:56 T:3039777312   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
09:28:56 T:3039777312   ERROR: Open - failed to open source <https://test.fa

I'm not a python programmer so its hard for me to do deeper debugging but I am willing to help.
Possibly its raspberry pi related problems, will try with different XBMC install.
(2014-08-18, 09:36)frakn Wrote: [ -> ]Possibly its raspberry pi related problems, will try with different XBMC install.

No, its the same in openSuSE 13.1 Linux desktop version with XBMC.
(2014-08-18, 09:36)frakn Wrote: [ -> ]Thanks for starting this Addon!
Some remarks:
I am working with a self hosted OC 6.0.4 on a linux debian server. Client is raspberry pi using XBMC 13.1.

When trying to login the server answers with an internal representation of the username in form of
data-user="cdef9bbc-f432-1031-884f-39f7c9039ff7"

so in the file resources/lib/owncloud.py it seems to be enough to check following:
Code:
#validate successful login
        for r in re.finditer('(data-user)\=\"([^\"]+)\"',
                             response_data, re.DOTALL):
            loginType,loginResult = r.groups()
        log("got login result="+loginResult,True)
        if (loginResult == 0 or loginResult == 0):

When using "JSON" method I can play one song additional connect result in
Code:
ERROR: Previous line repeats 11 times.
ERROR: CCurlFile::Stat - Failed: SSL connect error(35) https://test....
or
Code:
ERROR: CCurlFile::Stat - Failed: Timeout was reached(28) for https://test....

In "Disk Cache" mode I did not see any file but only subdirectory entries, so it's impossible to play anything.

In "Memory Cache" mode I saw the file entries but no play. This was the only mode to display file names with spaces and non alphanumerical characters correctly (e.g. "Test Artist - Song #14.mp3")
when trying to play a file I get
Code:
ERROR: CCurlFile::FillBuffer - Failed: Timeout was reached(28)
09:28:56 T:3039777312   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
09:28:56 T:3039777312   ERROR: Open - failed to open source <https://test.fa

I'm not a python programmer so its hard for me to do deeper debugging but I am willing to help.
Possibly its raspberry pi related problems, will try with different XBMC install.

Any kind of streaming over HTTPS has known issues on the Raspberry Pi. Since your issue is occurring on a desktop XBMC, I'll validate and see if I can reproduce the issue.
Hi,

Is this still active?

I am testing and cannot login, plain vanilla windows 7 install of latest gotham and an ubuntu own cloud box.

Let me know if still active I will post the details.

Cheers,
(2014-09-10, 21:26)tdrive Wrote: [ -> ]Hi,

Is this still active?

I am testing and cannot login, plain vanilla windows 7 install of latest gotham and an ubuntu own cloud box.

Let me know if still active I will post the details.

Cheers,

Yes, this project is still active and being worked on. If you encounter an issue or have a feature request, please post in this thread or post as an issue in the github project.

Include int he details about the version of owncloud and what is the web server software.
(2014-09-10, 21:44)dmdsoftware Wrote: [ -> ]
(2014-09-10, 21:26)tdrive Wrote: [ -> ]Hi,

Is this still active?

I am testing and cannot login, plain vanilla windows 7 install of latest gotham and an ubuntu own cloud box.

Let me know if still active I will post the details.

Cheers,

Yes, this project is still active and being worked on. If you encounter an issue or have a feature request, please post in this thread or post as an issue in the github project.

Include int he details about the version of owncloud and what is the web server software.

OK, here we go.

Version: XBMC (13.2 Git:20140817-0f3db05). Platform: x86 Win32 32-bit

Running on Windows 7, 64 bit

owncloud 7.0 on Ubuntu 14.04.1 LTS (14.04)

Apache 2

I am running owncloud on plain http

Fails with "Login Information i incorrect or permission denied"

Let me know what else you need as far as info/logging is concerned.

Cheers,

Log file portion:

12:58:00 T:4896 DEBUG: Keyboard: scancode: 0x50, sym: 0x0112, unicode: 0x0000, modifier: 0x0
12:58:00 T:4896 DEBUG: CApplication::OnKey: down (0xf081) pressed, action is Down
12:58:00 T:3492 DEBUG: CTextureCacheJob::GetImageHash - unable to stat url C:\Program Files (x86)\XBMC\addons\repository.owncloud\icon.png
12:58:01 T:4896 DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x000d, modifier: 0x0
12:58:01 T:4896 DEBUG: CApplication::OnKey: return (0xf00d) pressed, action is Select
12:58:01 T:4896 DEBUG: CGUIMediaWindow::GetDirectory (plugin://plugin.video.owncloud/?content_type=video)
12:58:01 T:4896 DEBUG: ParentPath = [addons://sources/video/]
12:58:01 T:3492 DEBUG: XFILE::CPluginDirectory::StartScript - calling plugin ownCloud('plugin://plugin.video.owncloud/','2','?content_type=video')
12:58:01 T:3492 DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult - waiting on the ownCloud (id=3) plugin...
12:58:01 T:8668 NOTICE: Thread LanguageInvoker start, auto delete: false
12:58:01 T:8668 INFO: initializing python engine.
12:58:01 T:8668 DEBUG: CPythonInvoker(3, C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py): start processing
12:58:01 T:8668 NOTICE: -->Python Interpreter Initialized<--
12:58:01 T:8668 DEBUG: CPythonInvoker(3, C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py): the source file to load is "C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py"
12:58:01 T:8668 DEBUG: CPythonInvoker(3, C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py): setting the Python path to C:\Program Files (x86)\XBMC\addons\repository.owncloud;C:\Program Files (x86)\XBMC\addons\script.module.pil\lib;C:\Program Files (x86)\XBMC\addons\xbmc.debug\;C:\Program Files (x86)\XBMC\system\python\DLLs;C:\Program Files (x86)\XBMC\system\python\Lib;C:\Program Files (x86)\XBMC\python27.zip;C:\Program Files (x86)\XBMC\system\python\lib\plat-win;C:\Program Files (x86)\XBMC\system\python\lib\lib-tk;C:\Program Files (x86)\XBMC;C:\Program Files (x86)\XBMC\system\python;C:\Program Files (x86)\XBMC\system\python\lib\site-packages
12:58:01 T:8668 DEBUG: CPythonInvoker(3, C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py): entering source directory C:\Program Files (x86)\XBMC\addons\repository.owncloud
12:58:01 T:8668 DEBUG: CPythonInvoker(3, C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py): instantiating addon using automatically obtained id of "plugin.video.owncloud" dependent on version 2.1.0 of the xbmc.python api
12:58:01 T:8668 DEBUG: ownCloud: plugin url: plugin://plugin.video.owncloud/
12:58:01 T:8668 DEBUG: ownCloud: plugin queries: {'mode': 'main', 'content_type': 'video'}
12:58:01 T:8668 DEBUG: ownCloud: plugin handle: 2
12:58:01 T:8668 DEBUG: ownCloud: main
12:58:01 T:8668 DEBUG: ownCloud: logging in
12:58:01 T:8668 DEBUG: LocalizeStrings: no strings.po file exist at C:\Program Files (x86)\XBMC\addons\repository.owncloud\resources\language\English, fallback to strings.xml
12:58:01 T:4896 DEBUG: ------ Window Init (DialogBusy.xml) ------
12:58:01 T:4896 DEBUG: ------ Window Init (DialogOK.xml) ------
12:58:02 T:4896 DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x000d, modifier: 0x0
12:58:02 T:4896 DEBUG: CApplication::OnKey: return (0xf00d) pressed, action is Select
12:58:02 T:4896 DEBUG: ------ Window Deinit (DialogOK.xml) ------
12:58:03 T:8668 ERROR: ownCloud: login failed
12:58:03 T:8668 INFO: CPythonInvoker(3, C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py): script successfully run
12:58:03 T:3492 DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult- plugin returned successfully
12:58:03 T:4320 NOTICE: Thread BackgroundLoader start, auto delete: false
12:58:03 T:8668 INFO: Python script stopped
12:58:03 T:8668 DEBUG: Thread LanguageInvoker 8668 terminating
12:58:03 T:4320 DEBUG: Thread BackgroundLoader 4320 terminating
12:58:03 T:4896 DEBUG: ------ Window Deinit (DialogBusy.xml) ------
12:58:04 T:4896 DEBUG: Keyboard: scancode: 0x01, sym: 0x001b, unicode: 0x001b, modifier: 0x0
12:58:04 T:4896 DEBUG: CApplication::OnKey: escape (0xf01b) pressed, action is PreviousMenu
12:58:04 T:4896 DEBUG: CGUIWindowManager:TonguereviousWindow: Deactivate
12:58:05 T:4896 DEBUG: ------ Window Deinit (MyVideoNav.xml) ------
12:58:05 T:4896 DEBUG: CGUIWindowManager:TonguereviousWindow: Activate new
12:58:05 T:4896 DEBUG: ------ Window Init (Home.xml) ------
12:58:05 T:4896 DEBUG: ------ Window Init (Pointer.xml) ------
12:58:08 T:4896 DEBUG: CWinEventsWin32::WndProcWindow is active
12:58:08 T:4896 DEBUG: CWinEventsWin32::WndProc: Focus switched to process C:\Windows\explorer.exe
12:58:12 T:4896 DEBUG: ------ Window Deinit (Pointer.xml) ------
12:58:13 T:4896 INFO: Python, unloading python shared library because no scripts are running anymore
(2014-09-10, 22:00)tdrive Wrote: [ -> ]
(2014-09-10, 21:44)dmdsoftware Wrote: [ -> ]
(2014-09-10, 21:26)tdrive Wrote: [ -> ]Hi,

Is this still active?

I am testing and cannot login, plain vanilla windows 7 install of latest gotham and an ubuntu own cloud box.

Let me know if still active I will post the details.

Cheers,

Yes, this project is still active and being worked on. If you encounter an issue or have a feature request, please post in this thread or post as an issue in the github project.

Include int he details about the version of owncloud and what is the web server software.

OK, here we go.

Version: XBMC (13.2 Git:20140817-0f3db05). Platform: x86 Win32 32-bit

Running on Windows 7, 64 bit

owncloud 7.0 on Ubuntu 14.04.1 LTS (14.04)

I am running owncloud on plain http

Fails with "Login Information i incorrect or permission denied"

Let me know what else you need as far as info/logging is concerned.

Cheers,

Log file portion:

12:58:00 T:4896 DEBUG: Keyboard: scancode: 0x50, sym: 0x0112, unicode: 0x0000, modifier: 0x0
12:58:00 T:4896 DEBUG: CApplication::OnKey: down (0xf081) pressed, action is Down
12:58:00 T:3492 DEBUG: CTextureCacheJob::GetImageHash - unable to stat url C:\Program Files (x86)\XBMC\addons\repository.owncloud\icon.png
12:58:01 T:4896 DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x000d, modifier: 0x0
12:58:01 T:4896 DEBUG: CApplication::OnKey: return (0xf00d) pressed, action is Select
12:58:01 T:4896 DEBUG: CGUIMediaWindow::GetDirectory (plugin://plugin.video.owncloud/?content_type=video)
12:58:01 T:4896 DEBUG: ParentPath = [addons://sources/video/]
12:58:01 T:3492 DEBUG: XFILE::CPluginDirectory::StartScript - calling plugin ownCloud('plugin://plugin.video.owncloud/','2','?content_type=video')
12:58:01 T:3492 DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult - waiting on the ownCloud (id=3) plugin...
12:58:01 T:8668 NOTICE: Thread LanguageInvoker start, auto delete: false
12:58:01 T:8668 INFO: initializing python engine.
12:58:01 T:8668 DEBUG: CPythonInvoker(3, C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py): start processing
12:58:01 T:8668 NOTICE: -->Python Interpreter Initialized<--
12:58:01 T:8668 DEBUG: CPythonInvoker(3, C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py): the source file to load is "C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py"
12:58:01 T:8668 DEBUG: CPythonInvoker(3, C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py): setting the Python path to C:\Program Files (x86)\XBMC\addons\repository.owncloud;C:\Program Files (x86)\XBMC\addons\script.module.pil\lib;C:\Program Files (x86)\XBMC\addons\xbmc.debug\;C:\Program Files (x86)\XBMC\system\python\DLLs;C:\Program Files (x86)\XBMC\system\python\Lib;C:\Program Files (x86)\XBMC\python27.zip;C:\Program Files (x86)\XBMC\system\python\lib\plat-win;C:\Program Files (x86)\XBMC\system\python\lib\lib-tk;C:\Program Files (x86)\XBMC;C:\Program Files (x86)\XBMC\system\python;C:\Program Files (x86)\XBMC\system\python\lib\site-packages
12:58:01 T:8668 DEBUG: CPythonInvoker(3, C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py): entering source directory C:\Program Files (x86)\XBMC\addons\repository.owncloud
12:58:01 T:8668 DEBUG: CPythonInvoker(3, C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py): instantiating addon using automatically obtained id of "plugin.video.owncloud" dependent on version 2.1.0 of the xbmc.python api
12:58:01 T:8668 DEBUG: ownCloud: plugin url: plugin://plugin.video.owncloud/
12:58:01 T:8668 DEBUG: ownCloud: plugin queries: {'mode': 'main', 'content_type': 'video'}
12:58:01 T:8668 DEBUG: ownCloud: plugin handle: 2
12:58:01 T:8668 DEBUG: ownCloud: main
12:58:01 T:8668 DEBUG: ownCloud: logging in
12:58:01 T:8668 DEBUG: LocalizeStrings: no strings.po file exist at C:\Program Files (x86)\XBMC\addons\repository.owncloud\resources\language\English, fallback to strings.xml
12:58:01 T:4896 DEBUG: ------ Window Init (DialogBusy.xml) ------
12:58:01 T:4896 DEBUG: ------ Window Init (DialogOK.xml) ------
12:58:02 T:4896 DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x000d, modifier: 0x0
12:58:02 T:4896 DEBUG: CApplication::OnKey: return (0xf00d) pressed, action is Select
12:58:02 T:4896 DEBUG: ------ Window Deinit (DialogOK.xml) ------
12:58:03 T:8668 ERROR: ownCloud: login failed
12:58:03 T:8668 INFO: CPythonInvoker(3, C:\Program Files (x86)\XBMC\addons\repository.owncloud\default.py): script successfully run
12:58:03 T:3492 DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult- plugin returned successfully
12:58:03 T:4320 NOTICE: Thread BackgroundLoader start, auto delete: false
12:58:03 T:8668 INFO: Python script stopped
12:58:03 T:8668 DEBUG: Thread LanguageInvoker 8668 terminating
12:58:03 T:4320 DEBUG: Thread BackgroundLoader 4320 terminating
12:58:03 T:4896 DEBUG: ------ Window Deinit (DialogBusy.xml) ------
12:58:04 T:4896 DEBUG: Keyboard: scancode: 0x01, sym: 0x001b, unicode: 0x001b, modifier: 0x0
12:58:04 T:4896 DEBUG: CApplication::OnKey: escape (0xf01b) pressed, action is PreviousMenu
12:58:04 T:4896 DEBUG: CGUIWindowManager:TonguereviousWindow: Deactivate
12:58:05 T:4896 DEBUG: ------ Window Deinit (MyVideoNav.xml) ------
12:58:05 T:4896 DEBUG: CGUIWindowManager:TonguereviousWindow: Activate new
12:58:05 T:4896 DEBUG: ------ Window Init (Home.xml) ------
12:58:05 T:4896 DEBUG: ------ Window Init (Pointer.xml) ------
12:58:08 T:4896 DEBUG: CWinEventsWin32::WndProcWindow is active
12:58:08 T:4896 DEBUG: CWinEventsWin32::WndProc: Focus switched to process C:\Windows\explorer.exe
12:58:12 T:4896 DEBUG: ------ Window Deinit (Pointer.xml) ------
12:58:13 T:4896 INFO: Python, unloading python shared library because no scripts are running anymore

Can you confirm where you got the addon from? The "repository.owncloud" looks odd.

Can you confirm it is Apache on the Ubuntu server?
(2014-09-10, 22:11)dmdsoftware Wrote: [ -> ]Can you confirm where you got the addon from? The "repository.owncloud" looks odd.

Can you confirm it is Apache on the Ubuntu server?

Chopped the above, too much.

Yes, Apache 2, ubuntu 14.04.

I just got the repo from the link above, and installed the zip.

Looking at the repo in your sig, that seems to be the same.

Let me know if anything else/newer is available, I can re-install / retest.

Or, I can open an account for you on my test box, you can check?

Cheers,
Pages: 1 2 3 4 5 6 7