• 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 12
[CLOSED] OneDrive (SkyDrive) Video/Music add-on for XBMC / Kodi
(2015-05-10, 00:22)dmdsoftware Wrote: Does playback of these files work?

Yes, no problem with the playback.
Reply
(2015-03-15, 15:48)dmdsoftware Wrote:
(2015-03-03, 08:23)sandronesta Wrote: I have tested Version 0.1.6 and 0.2.1 and I can't build a stream with right-click on the File.

You showed this option for Hive (https://www.youtube.com/watch?v=mf8KR7QBUZA) and this is really a cool feature...

Sorry, I noticed the code is there but disabled. The STRMs that are generated are unique and expire after time, so until STRMs that can be generated that don't expire after some period of time can be generated, the feature will be unavailable.

I will have a look at what work needs to be done to rework the way links are generated, but it involves a lot of rework (hours).

(2015-05-10, 00:28)tehKNi Wrote:
(2015-05-10, 00:22)dmdsoftware Wrote: Does playback of these files work?

Yes, no problem with the playback.

Is something like tést.mkv showing up as something like.... t\u00e9st.mkv in the plugin? When I create a STRM, it creates a file u00e9st.mkv in a directory t. Obvious what is going on there. Should be easy to fix.

Found an issue around STRM that some users would be running into. Will fix that too.
Reply
(2015-05-10, 01:21)dmdsoftware Wrote:
(2015-03-15, 15:48)dmdsoftware Wrote:
(2015-03-03, 08:23)sandronesta Wrote: I have tested Version 0.1.6 and 0.2.1 and I can't build a stream with right-click on the File.

You showed this option for Hive (https://www.youtube.com/watch?v=mf8KR7QBUZA) and this is really a cool feature...

Sorry, I noticed the code is there but disabled. The STRMs that are generated are unique and expire after time, so until STRMs that can be generated that don't expire after some period of time can be generated, the feature will be unavailable.

I will have a look at what work needs to be done to rework the way links are generated, but it involves a lot of rework (hours).

(2015-05-10, 00:28)tehKNi Wrote:
(2015-05-10, 00:22)dmdsoftware Wrote: Does playback of these files work?

Yes, no problem with the playback.

Is something like tést.mkv showing up as something like.... t\u00e9st.mkv in the plugin? When I create a STRM, it creates a file u00e9st.mkv in a directory t. Obvious what is going on there. Should be easy to fix.

Found an issue around STRM that some users would be running into. Will fix that too.

That's right Wink

Other subject on the table but, as i don't fully get it, i'm quite worried about my account security with these new OAUTH2 type of login (1. and 2.), no offense really ;-)
Would it be possible to have something like a tutorial to make that 3. & 4. work ? Or maybe just an external document on which you based your script.
Reply
(2015-05-10, 00:28)tehKNi Wrote: That's right Wink

Other subject on the table but, as i don't fully get it, i'm quite worried about my account security with these new OAUTH2 type of login (1. and 2.), no offense really ;-)
Would it be possible to have something like a tutorial to make that 3. & 4. work ? Or maybe just an external document on which you based your script.

The unicode is fixed. Ran into a similar issue in the past in OwnCloud and the same two lines of code fixed the issue here.

http://dmdsoftware.net/repository.ddurdl...-0.3.6.zip

Version 0.3.6
- fix for unicode characters in filenames and folders
- fix for STRM playback when first account is set to login type ClientLogin

I feel the same way about your concerns about OAUTH2. Both Google and Microsoft advise never to release your client secret. That's a problem on open-source projects like this, as if I include the secret in the code, it is there for anyone to capture. I started out by creating a simple PHP (the dmdsoftware.net option) that simply takes your transaction that would normally go to Microsoft and append the client ID and client secret to it. Of course, you have to trust that the server it interacts with isn't compromised. Plus, I haven't bought a SSL certificate for my site.

That's where I added the other option, the SSL script. It's a script housed on Google which ensures that it uses SSL. Again, for the token part, it simply relays the tokens and appends the client id and client secret. The part about 'the code' tries to make it simpler for the user by storing 'the code' that can be retrieved by the app. This part is actually stored, but then again, "the code" is one time use and expires if not used immediately. The Microsoft 'the code' is not all that difficult to enter manually as it resembles a code that is hyphenated and looks designed for a human to transcribe from browser to app. The Google OAUTH2 keys are much more complicated to enter, are much longer and are mixed characters -- why I developed this general routine.

I'll be opening the SSL script up to public view access when I figure out how I can do that without releasing the client secret at the same time -- right now the client ID & client secret are hardcoded, but it should be possible to setup a restricted resource like a spreadsheet, where the ID can be retrieved only by the executing script. Transparency is a good thing. It will allow users to see exactly what information is sent and what information is stored, along with evidence that access and refresh tokens are simply "relayed" and not stored. Then it becomes a matter of do I trust that the intermediate server (in this case for SSL script, Google) is compromised. If I discover some free or cheap Microsoft offering equivalent to "Google Apps Script", I'll adopt that as well.

With regards to type 3 and 4, for the google plugin I released detailed steps with pictures for creating your own client ID and client secret. I'll do the same for Microsoft when I get time this week.
Reply
Thanks for taking your time to explain, very much appreciated!

Just saw this error when trying to access a folder with the "client login" :

Code:
17:53:49 T:8412   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.AttributeError'>
                                            Error Contents: 'bool' object has no attribute 'split'
                                            Traceback (most recent call last):
                                              File "C:\Users\KNi\AppData\Roaming\Kodi\addons\plugin.video.onedrive-testing\default.py", line 735, in <module>
                                                service.addMediaFile(item, contextType=contextType)
                                              File "C:\Users\KNi\AppData\Roaming\Kodi\addons\plugin.video.onedrive-testing\resources\lib\cloudservice.py", line 434, in addMediaFile
                                                listitem = xbmcgui.ListItem(package.file.displayTitle(), iconImage=package.file.thumbnail,
                                              File "C:\Users\KNi\AppData\Roaming\Kodi\addons\plugin.video.onedrive-testing\resources\lib\file.py", line 56, in displayTitle
                                                return urllib.unquote(self.title)
                                              File "D:\Program Files (x86)\Kodi\system\python\Lib\urllib.py", line 1223, in unquote
                                                bits = s.split('%')
                                            AttributeError: 'bool' object has no attribute 'split'
                                            -->End of Python script error report<--

The SSL script method is working pretty good :

Can access to my folders, even with the read-only script.
STRM are created successfully for now.
Reply
Edit: All works with SSL Script mode. I was using the classical username+password.


[u]I'm trying to execute the addon but it doesn't works fine. I created a new Windows Live Account and uploaded some MP3 (a correct MP3) to it inside Music ("Música" in spanish) folder and inside another folder (i.e. Música/Name (year)/1-other_name.mp3)

After upload the login is OK and i enter in "Música". This folder shows a list of folders that I created, only this and a ".." to go back. All Ok. I click in "Name (year)".

In 0.2.5: It shows only ONE file (the first alphabetically) with the correct name (no extension, but OnedDrive doesn't show the extension, it show the file as audio file without extension), the other are gone, and other entry that says "Música" (the first folder name) I click in the file and it shows a new screen with 2 entries: [1] "Name (year)" [2] "Música" and it repeats if I click in some of these options. No audio is reproduced and lot of files are gone.

In 0.3.6-testing: It crash. The prlugin produces an error. I moved the MP3 to the upper folder and entered again. No MP3 is showed, it only shows the upper folders. I renamed the file to name.mp3 and nothing changed. I configured the plugin (in configuration) to show all files and it shows now a dup entry in the upper folder "Música" "Música". The first is the same, the second shows a message "Opening stream" but finally crashes.
[/u]
Reply
(2015-03-15, 15:48)dmdsoftware Wrote:
(2015-03-03, 08:23)sandronesta Wrote: I have tested Version 0.1.6 and 0.2.1 and I can't build a stream with right-click on the File.

You showed this option for Hive (https://www.youtube.com/watch?v=mf8KR7QBUZA) and this is really a cool feature...

Sorry, I noticed the code is there but disabled. The STRMs that are generated are unique and expire after time, so until STRMs that can be generated that don't expire after some period of time can be generated, the feature will be unavailable.

I will have a look at what work needs to be done to rework the way links are generated, but it involves a lot of rework (hours).

(2015-05-18, 01:10)Julipo Wrote: Edit: All works with SSL Script mode. I was using the classical username+password.


[u]I'm trying to execute the addon but it doesn't works fine. I created a new Windows Live Account and uploaded some MP3 (a correct MP3) to it inside Music ("Música" in spanish) folder and inside another folder (i.e. Música/Name (year)/1-other_name.mp3)

After upload the login is OK and i enter in "Música". This folder shows a list of folders that I created, only this and a ".." to go back. All Ok. I click in "Name (year)".

In 0.2.5: It shows only ONE file (the first alphabetically) with the correct name (no extension, but OnedDrive doesn't show the extension, it show the file as audio file without extension), the other are gone, and other entry that says "Música" (the first folder name) I click in the file and it shows a new screen with 2 entries: [1] "Name (year)" [2] "Música" and it repeats if I click in some of these options. No audio is reproduced and lot of files are gone.

In 0.3.6-testing: It crash. The prlugin produces an error. I moved the MP3 to the upper folder and entered again. No MP3 is showed, it only shows the upper folders. I renamed the file to name.mp3 and nothing changed. I configured the plugin (in configuration) to show all files and it shows now a dup entry in the upper folder "Música" "Música". The first is the same, the second shows a message "Opening stream" but finally crashes.
[/u]

Yes, music is not supported in the ClientLogin type. I'll be adding a warning indicating that fact.
Reply
Will you update the repository with the last version of OneDrive? Is for install from repo (and have updates) or use the -testing zip. (I was trying this in my computer, but I want the addon for a Raspberry Pi)
Reply
(2015-03-15, 15:48)dmdsoftware Wrote:
(2015-03-03, 08:23)sandronesta Wrote: I have tested Version 0.1.6 and 0.2.1 and I can't build a stream with right-click on the File.

You showed this option for Hive (https://www.youtube.com/watch?v=mf8KR7QBUZA) and this is really a cool feature...

Sorry, I noticed the code is there but disabled. The STRMs that are generated are unique and expire after time, so until STRMs that can be generated that don't expire after some period of time can be generated, the feature will be unavailable.

I will have a look at what work needs to be done to rework the way links are generated, but it involves a lot of rework (hours).

(2015-05-19, 13:52)Julipo Wrote: Will you update the repository with the last version of OneDrive? Is for install from repo (and have updates) or use the -testing zip. (I was trying this in my computer, but I want the addon for a Raspberry Pi)

You can install the -testing repository for automatic updates, etc from the following zip http://dmdsoftware.net/repository.ddurdl...esting.zip

It is installed the same way as the regular repository, but this will keep the -testing instances updated. This is the way I keep my Raspberry Pi updated with the latest test builds.

The latest OneDrive won't be prompted to the regular repository until the testing is complete.
Reply
Stable synced with latest testing (version 0.3.8):

Stable:
http://dmdsoftware.net/repository.ddurdl...-0.3.8.zip

-testing:
http://dmdsoftware.net/repository.ddurdl...-0.3.8.zip
Reply
Hi ddurdle. Thank you for the efforts you have put in to this fantastic add-on so far, I am very impressed - particularly with the speed of it, I have 40Mb internet connection and 2TB of movies in OneDrive and it is very similar performance to files held on my local NAS. Excellent.

Are there any plans to allow folders that are shared with you to show in the add-on? Currently they do no list - which may be an API limitation?

Also, is there any way planned to filter out folders from the listing (or more likely white-list ones someone is happy to include)? I personally use Music, Pictures, Videos for all my media and would rather not see any other folders there for ease of navigation.
Reply
(2015-07-12, 14:53)falihax Wrote: Hi ddurdle. Thank you for the efforts you have put in to this fantastic add-on so far, I am very impressed - particularly with the speed of it, I have 40Mb internet connection and 2TB of movies in OneDrive and it is very similar performance to files held on my local NAS. Excellent.

Are there any plans to allow folders that are shared with you to show in the add-on? Currently they do no list - which may be an API limitation?

Also, is there any way planned to filter out folders from the listing (or more likely white-list ones someone is happy to include)? I personally use Music, Pictures, Videos for all my media and would rather not see any other folders there for ease of navigation.

I'll look into the shared folders.

Filtering out folders is more challenging, but definitely doable. I'm testing out a few features, such as this, with my Google Drive plugin. I'm also testing filtering and categorizing content directly in the plugin. Once I crack the recipe, I'll add it to this plugin.

TIP: You can right click a folder and add it to your favourites Smile This way you can access your Music, Pictures, Videos folders without even needing to enter the plugin Smile
Reply
Hi,

I have some problems making your 4th option:
"Provide your own client ID / client secret that you have registered with Microsoft."
work.

'This is what I did and what result I got:

1) Registered myApp with Microsoft and got my client-ID and my secret

2) Requested the token using this URL:
[url]https://login.live.com/oauth20_authorize.srf?client_id=00000myclient0000&scope=wl.offline_access%20wl.skydrive&response_type=token&redirect_uri=https://login.live.com/oauth20_desktop.srf
[/url]

3) Got the access token and copied it for the settings file
[url]https://login.live.com/oauth20_desktop.srf?lc=1031#access_token=EwCIlenghty_tokenAqVAcWcB&token_type=bearer&expires_in=3600&scope=wl.offline_access%20wl.skydrive%20onedrive.readwrite%20wl.signin&user_id=1eaff255xxxxb63d461
[/url]

4) Prepared the settings.xml

<setting id="onedrive1_client_id" value="00000myclient0000" />
<setting id="onedrive1_client_secret" value="00000mysecretvalue000000" />
<setting id="onedrive1_code" value="EwCIlenghty_tokenAqVAcWcB" />
<setting id="onedrive1_passcode" value="" />
<setting id="onedrive1_password" value="outlookpw2ndaccount" />
<setting id="onedrive1_save_auth_token" value="true" />
<setting id="onedrive1_type" value="3" />
<setting id="onedrive1_url" value="" />
<setting id="onedrive1_username" value="[email protected]" />

6) Starting Kodi and using the plugin I got the following log entries

Code:
00:48:48 T:7016  NOTICE: -->Python Interpreter Initialized<--
00:48:54 T:7016   ERROR: onedrive: HTTP Error 500: Internal Server Error
00:48:55 T:7016   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: ('auth_refresh_token',)
                                            Traceback (most recent call last):
                                              File "C:\Users\gne\AppData\Roaming\Kodi\addons\plugin.video.onedrive\default.py", line 728, in <module>
                                                mediaItems = service.getMediaList(folderName,contentType=contentType)
                                              File "C:\Users\gne\AppData\Roaming\Kodi\addons\plugin.video.onedrive\resources\lib\onedrive_api.py", line 387, in getMediaList
                                                self.login()
                                              File "C:\Users\gne\AppData\Roaming\Kodi\addons\plugin.video.onedrive\resources\lib\onedrive_api.py", line 214, in login
                                                self.refreshToken()
                                              File "C:\Users\gne\AppData\Roaming\Kodi\addons\plugin.video.onedrive\resources\lib\onedrive_api.py", line 238, in refreshToken
                                                req = urllib2.Request(url, 'client_id='+clientID+'&client_secret='+clientSecret+'&refresh_token='+self.authorization.getToken('auth_refresh_token')+'&redirect_uri=https://login.live.com/oauth20_desktop.srf&grant_type=refresh_token', header)
                                              File "C:\Users\gne\AppData\Roaming\Kodi\addons\plugin.video.onedrive\resources\lib\authorization.py", line 52, in getToken
                                                return self.auth[name]
                                            KeyError: ('auth_refresh_token',)
                                            -->End of Python script error report<--
00:48:55 T:6324   ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.onedrive/?content_type=video
00:48:55 T:6324   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.onedrive/?content_type=video) failed
00:48:55 T:5960  NOTICE: Thread BackgroundLoader start, auto delete: false

Any idea of what is goring wrong?

regards,

ypoosn
Reply
At step #2, the oath code in the form of #########-####-####-####-############ is provided. This is _code that you enter into the plugin. The plugin fetches the access and refresh token.
Reply
(2015-07-17, 15:40)dmdsoftware Wrote: At step #2, the oath code in the form of #########-####-####-####-############ is provided. This is _code that you enter into the plugin. The plugin fetches the access and refresh token.

Thanks for your quick reply.

I also requested the token and not the code

https://login.live.com/oauth20_authorize...ponse_type=code&redirect_uri=https://login.live.com/oauth20_desktop.srf

Now it works,

Your help is very much appreciated.

best,

ypoosn
Reply
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 12

Logout Mark Read Team Forum Stats Members Help
[CLOSED] OneDrive (SkyDrive) Video/Music add-on for XBMC / Kodi2