Release - Dropbox addon

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
josetaza Offline
Junior Member
Posts: 38
Joined: Aug 2013
Reputation: 2
Location: The Netherlands, Eindhoven
Post: #46
(2014-02-21 04:56)shivup Wrote:  FYI, Videos(streaming) dont play on Linux XBMC (XBMCBuntu 12.2), They play on android XBMC Smile
Are you sure that you setup Dbmc to stream the video in the settings menu? I have tested it (version 0.7.0) on Ubuntu 13.10 and Raspbmc and it they are both streaming video just fine. I tested .avi and .mp4 files. At first I had streaming disabled and at that point the video wouldn't show because it was still caching(downloading) the video... So that is why I ask: are you sure it is streaming?

(2014-02-21 08:11)giovaorama Wrote:  Hi,
The synchronization works just the first time after the boot.

Version 0.7.0 on openelec 3.2.4
Hi, you mentioned it before. I hope it would be solved in the new version, but it looks like that is not the case...Undecided
Can provide me with the xbmc log? Preferably with debug logging enabled. And please tell me what interval you use for syncing.
Maybe you can try to change the "Dropbox folder to synchronize with" to another folder and back again. This would result in a reset of the stored sync data. Maybe stored sync data got corrupted in between the different releases...

(2014-02-21 21:32)nickedw Wrote:  I would like to start a slide show automatically when the system reboots. I would appreciate some direction how to go about scripting this. Thanks

Is there a way to change the length of time each slide displays? Also can i turn off the 'motion' effect when the slide displays? Thanks for any help
Hi, sorry but this is not the thread to get answers to those questions. This thread is about the Dbmc (Dropbox addon)...
Please try a different thread. Thanks.
(This post was last modified: 2014-02-22 01:09 by josetaza.)
find quote
giovaorama Offline
Junior Member
Posts: 9
Joined: Jan 2014
Reputation: 1
Location: Italy
Post: #47
Sure. I already ask you if i can help to debug this issue.

Anyway i'd like to use the synchronization to automatically put torrents file in the watch folder of transmission.

I try also to configure transmission to not delete them.

I'm looking to the log file i can't never see nothing related to dbmc but when i change the synchronization folder. Please note that it asked me justvthe first time to stop the synchronization before changing the settings.

Tomorrow I'll try to provide a real log file.

Using Tapatalk
(This post was last modified: 2014-02-22 01:49 by giovaorama.)
find quote
giovaorama Offline
Junior Member
Posts: 9
Joined: Jan 2014
Reputation: 1
Location: Italy
Post: #48
Ok, I "catch" the problem.

Usually, the synchronization worls correctly... but, if I (or Transmission, in my case) delete a file from the local folder then something nasty happen.

Code:
08:05:00 T:2912851040   DEBUG: plugin.dbmc: New sync time: Sat, 22 Feb 2014 08:10:00 +0000
08:05:00 T:2912851040   DEBUG: plugin.dbmc: Start sync...
08:05:02 T:2795500640   DEBUG: plugin.dbmc: Storing sync data
08:05:02 T:2795500640  NOTICE: plugin.dbmc: Synchronizing number of items: 0/1
08:05:02 T:2795500640   DEBUG: plugin.dbmc: Storing sync data
08:05:02 T:3046780928   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
08:05:02 T:2795500640   DEBUG: plugin.dbmc: Download file to: /storage/dropbox/FILE_TORRENT.torrent
08:05:02 T:3046780928   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/ImageLib-arm.so)
08:05:02 T:3046780928   DEBUG: Loading: /usr/lib/xbmc/system/ImageLib-arm.so
08:05:03 T:2795500640   DEBUG: plugin.dbmc: Downloaded file to: /storage/dropbox/FILE_TORRENT.torrent
08:05:03 T:2795500640  NOTICE: plugin.dbmc: Number of items synchronized: 1
08:05:03 T:2795500640   DEBUG: plugin.dbmc: Storing sync data
08:05:04 T:2912851040   DEBUG: plugin.dbmc: Finished sync...

Code:
08:10:00 T:2912851040   DEBUG: plugin.dbmc: New sync time: Sat, 22 Feb 2014 08:15:00 +0000
08:10:00 T:2912851040   DEBUG: plugin.dbmc: Start sync...
08:10:02 T:2736780384   DEBUG: plugin.dbmc: Storing sync data
08:10:02 T:2736780384  NOTICE: plugin.dbmc: Synchronizing number of items: 0/1
08:10:02 T:2736780384   DEBUG: plugin.dbmc: Storing sync data
08:10:02 T:3046780928   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
08:10:02 T:2736780384   DEBUG: plugin.dbmc: Download file to: /storage/dropbox/FILE_TORRENT.torrent
08:10:02 T:3046780928   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/ImageLib-arm.so)
08:10:02 T:3046780928   DEBUG: Loading: /usr/lib/xbmc/system/ImageLib-arm.so
08:10:04 T:2736780384   DEBUG: plugin.dbmc: Downloaded file to: /storage/dropbox/FILE_TORRENT.torrent
08:10:04 T:2736780384   ERROR: Exception in thread Thread-81:
                                            Traceback (most recent call last):
                                              File "./Lib/threading.py", line 551, in __bootstrap_inner
                                              File "/storage/.xbmc/addons/plugin.dbmc/sync_dropbox.py", line 313, in run
                                                self._synchronize()
                                              File "/storage/.xbmc/addons/plugin.dbmc/sync_dropbox.py", line 362, in _synchronize
                                                item.sync()
                                              File "/storage/.xbmc/addons/plugin.dbmc/sync_dropbox.py", line 522, in sync
                                                self.updateTimeStamp()
                                              File "/storage/.xbmc/addons/plugin.dbmc/sync_dropbox.py", line 459, in updateTimeStamp
                                                os.utime(self._localPath, (atime, int(self._remoteClientModifiedTime) ))
                                            OSError: [Errno 2] No such file or directory: '/storage/dropbox/FILE_TORRENT.torrent'
08:10:04 T:2912851040   DEBUG: plugin.dbmc: Finished sync...

And then no more log message from dbmc. So I think the dbmc thread is dead.

I will look to the source code... I will try also again to disable to "auto delete" function of transmission.

Using Tapatalk
(This post was last modified: 2014-02-22 09:57 by giovaorama.)
find quote
josetaza Offline
Junior Member
Posts: 38
Joined: Aug 2013
Reputation: 2
Location: The Netherlands, Eindhoven
Post: #49
Thanks for the detailed logging and information!
Indeed the thread that takes care of synchronizing is dead after the exception, so it won't sync anymore. The exception occurs when dbmc tries to update the timestamp of the file, but it just got removed (by transmission), and thus OSError.
I'll make a change in Dbmc to not crash when a exception occurs. So it keeps trying to sync. But that will not solve this exception! I think this can be solved if dbmc keeps a lock on the file until it is really done with that file. However I have to look into that to find a platform independent file lock mechanism.
If I think the problem is solved, I would kindly ask you to test it. Wink
find quote
giovaorama Offline
Junior Member
Posts: 9
Joined: Jan 2014
Reputation: 1
Location: Italy
Post: #50
Setting Transmission to not delete files doesn't solve the problem since it rename them.

A lock on the file probably doesn't solve the problem unless it is a low level lock (filesystem or os).

Probably the best is to catch the exception since a race condition may always happen.

Using Tapatalk
(This post was last modified: 2014-02-23 18:17 by giovaorama.)
find quote
josetaza Offline
Junior Member
Posts: 38
Joined: Aug 2013
Reputation: 2
Location: The Netherlands, Eindhoven
Post: #51
(2014-02-23 18:02)giovaorama Wrote:  Setting Transmission to not delete files doesn't solve the problem since it rename them.

A lock on the file probably doesn't solve the problem unless it is a low level lock (filesystem or os).

Probably the best is to catch the exception since a race condition may always happen.
Yes, I wanted to have a lock on filesystem level. But I didn't find a good solution for that...
Now I have made changes to catch the exception, and when it fails 2 times on a file/folder, it will ignore the file/folder for the rest of the synchronizations.
Please check it out: http://sourceforge.net/projects/xbmc-dro...p/download
This version (0.7.1beta) isn't automatically updated, so please download it and install it. If it is ok, I will upload it to the xbmc repos.
find quote
giovaorama Offline
Junior Member
Posts: 9
Joined: Jan 2014
Reputation: 1
Location: Italy
Post: #52
Hi. I'm testing the new beta.

It seems to work better: the files are downloaded and it doesn't stop to work even if transmission rename or delete them.

The strange think (but this happens also after a previous upgrade) after the first reboot the verification code was not more valid. Then i delete it, i redo e the authorization and then it start to work.

In the next days I will out of home and then I can made deeper tests

Using Tapatalk
(This post was last modified: 2014-02-28 19:45 by giovaorama.)
find quote
themagni Offline
Junior Member
Posts: 3
Joined: Mar 2014
Reputation: 0
Post: #53
(2014-02-12 21:26)josetaza Wrote:  
(2014-02-12 19:29)taltal13 Wrote:  Hi,

I'm on raspbmc - I get to step 8 but the last popup doesn't come up to let me close the webviewer. I see on dropbox.com that I'm signed in but it does say there's an error. I've tried going back to close to the web viewer, and I've tried rebooting right after I have allowed access without closing the webviewer but every time I open dbmc it asks me to log in to allow access....any ideas?
I just checked the login procedure and I see that step 8 indeed doesn't work like described. I will check what is going on...
However, my login was successful even though I didn't get the popup! When the last web-page was shown (just after pressing the allow button), I pressed the esc-key and the access code was still saved. I could browse my dropbox account after that.

On the last web-page, if you scroll down you should see something like "Enter this code into Dbmc (XBMC Plugin) to finish the process...". if you press the esc-key the code is still saved.

This is now solved in version 0.6.5!

I'm sorry, but it still doesn't work. When you log in, that dialog box doesn't show up. There is no field for "Enter this code into".

The closest I can get is if I hit back and refresh after I log in, you can see the form exists, but it shows as "empty" and you can't choose one of the fields.

The screen reads:

Dbmc (XBMC Plugin) would like access to the files and folders in your Dropbox.

-----------------------
-Form: None -
CancelAllow
--------------------

The fields are not selectable with either the mouse or with the keyboard. I can't take a screen shot since I'm using my laptop to post and a Raspberry Pi for the XBMC; posting here with a Pi would be an exercise in pain that I'm not willing to work with tonight.
find quote
alcosar Offline
Junior Member
Posts: 2
Joined: Mar 2014
Reputation: 0
Post: #54
(2013-12-09 22:18)josetaza Wrote:  
(2013-12-08 22:17)croontje Wrote:  I am using 2 factor authentication but the login fails...

You don't need to start the WebViewer yourself. The Dropbox addon starts it for you!
The webviewer indeed doesn't show the email field, that is why it is ask, before the webviewer is started.

The steps are:
1. Open the Dropbox addon (in the Pictures/Music/Videos menu)
2. A popup will appear, saying that a Dropbox Authorization is required. Press 'OK'
3. A keyboard popup will appear, requesting your dropbox username. Type in your dropbox username (email)
4. Now the WebViewer is started and the Dropbox website is automatically loaded. The password field is highlighted and you should press <enter> (or select key).
5. The keyboard popup is shown again. Now enter your Dropbox password. Select 'OK' when done.
6. Use the down arrow to select the "Sign in" button and press <enter> again.
7. A new page will be loaded and the "Cancel" and "Allow" buttons will be visible. Select the "Allow" button and press <enter>.
8. A popup is shown. The authorization is finished and the WebViewer can be closed (select "yes").

The access code is automatically stored in your addon settings and now you should be able to use the addon.

In which step does it fail?

In my case it fails at step 7. New page with "Cancel" and "Allow" would not show up. Web view shows that I successfully loged in. Thus I can not allow authorization code.

I've tested it with openelec on Raspberry Pi, Ubuntu 13.10 and Windows PCs. The version of the plugin: 0.7.0 and 0.7.1.

A week ago I could use it with Raspberry Pi, and then I've cleaned authorization code.

Code:
13:37:19 T:140612075771648  NOTICE: plugin.dbmc: DropboxSynchronizer started
13:37:19 T:140612062660352  NOTICE: Thread CRssReader start, auto delete: false
13:37:19 T:140611860559616  NOTICE:  StorageServer Module loaded RUN
13:37:19 T:140611860559616  NOTICE: StorageClient-2.5.4 Starting server
13:37:19 T:140611860559616  NOTICE: StorageServer-2.5.4 Storage Server starting /home/sasha/.xbmc/temp/commoncache.db
13:37:25 T:140611575342848  NOTICE: Thread Background Loader start, auto delete: false
13:37:29 T:140612075771648   ERROR: plugin.dbmc: DropboxSynchronizer could not connect to dropbox: No token (access code)
13:37:38 T:140611575342848  NOTICE: Thread XBPyThread start, auto delete: false
13:37:38 T:140611575342848  NOTICE: -->Python Interpreter Initialized<--
13:37:49 T:140612679559040   ERROR: GetDirectory - Error getting plugin://plugin.dbmc/?content_type=video
13:37:49 T:140612679559040   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.dbmc/?content_type=video) failed
13:37:49 T:140612084164352  NOTICE: Thread Background Loader start, auto delete: false
13:37:49 T:140611575342848  NOTICE: ('en_US', 'UTF-8')
13:37:49 T:140611575342848  NOTICE: WEBVIEWER: Version: 0.9.15
13:37:49 T:140611575342848  NOTICE: WEBVIEWER: Python Version: 2.7.5+ (default, Feb 27 2014, 19:40:54)
                                            [GCC 4.8.1]
13:37:58 T:140611575342848  NOTICE: WEBVIEWER: getWebResult() - STARTED
13:37:58 T:140611575342848  NOTICE: WEBVIEWER: STARTED
13:37:58 T:140612084164352  NOTICE: WEBVIEWER: Getting Page at URL: https://www.dropbox.com/1/oauth2/authorize?response_type=code&client_id=ege8o5q5abewuq5
13:38:00 T:140611575342848  NOTICE: WEBVIEWER: elementSelected() - No Element
13:38:00 T:140611575342848  NOTICE: WEBVIEWER: displayPage() - START
13:38:00 T:140611575342848  NOTICE: WEBVIEWER: URL MATCH: https://www.dropbox.com/1/oauth2/authorize?response_type=code&client_id=ege8o5q5abewuq5
13:38:00 T:140611575342848  NOTICE: WEBVIEWER: URL MATCH: https://www.dropbox.com/1/oauth2/authorize?response_type=code&client_id=ege8o5q5abewuq5
13:38:00 T:140611575342848  NOTICE: WEBVIEWER: AUTOCLOSE: NO HTML MATCH
13:38:00 T:140611575342848  NOTICE: WEBVIEWER: displayPage() - END
13:38:01 T:140612084164352  NOTICE: WEBVIEWER: Getting Page at URL: https://www.dropbox.com/
13:38:01 T:140611575342848  NOTICE: WEBVIEWER: displayPage() - START
13:38:01 T:140611575342848  NOTICE: WEBVIEWER: URL MATCH: https://www.dropbox.com/
13:38:01 T:140611575342848  NOTICE: WEBVIEWER: ACTION MATCH: /login
13:38:01 T:140611575342848  NOTICE: WEBVIEWER: displayPage() - START
13:38:01 T:140611575342848  NOTICE: WEBVIEWER: URL MATCH: https://www.dropbox.com/
13:38:01 T:140611575342848  NOTICE: WEBVIEWER: ACTION MATCH: /login
13:38:01 T:140611575342848  NOTICE: WEBVIEWER: displayPage() - START
13:38:01 T:140611575342848  NOTICE: WEBVIEWER: URL MATCH: https://www.dropbox.com/
13:38:01 T:140611575342848  NOTICE: WEBVIEWER: ACTION MATCH: /login
13:38:02 T:140611575342848  NOTICE: WEBVIEWER: AUTOCLOSE: NO URL MATCH
13:38:02 T:140611575342848  NOTICE: WEBVIEWER: displayPage() - END
13:38:02 T:140611575342848  NOTICE: WEBVIEWER: AUTOCLOSE: NO URL MATCH
13:38:02 T:140611575342848  NOTICE: WEBVIEWER: displayPage() - END
13:38:02 T:140611575342848  NOTICE: WEBVIEWER: AUTOCLOSE: NO URL MATCH
13:38:02 T:140611575342848  NOTICE: WEBVIEWER: displayPage() - END
13:38:13 T:140611575342848  NOTICE: WEBVIEWER: displayPage() - START
13:38:13 T:140611575342848  NOTICE: WEBVIEWER: URL MATCH: https://www.dropbox.com/home
13:38:13 T:140611575342848  NOTICE: WEBVIEWER: AUTOCLOSE: NO URL MATCH
13:38:13 T:140611575342848  NOTICE: WEBVIEWER: displayPage() - END
13:38:56 T:140611592124160  NOTICE: Thread Background Loader start, auto delete: false
13:38:56 T:140611575342848  NOTICE: WEBVIEWER: getWebResult() - FINISHED
13:38:56 T:140611592124160  NOTICE: Thread Jobworker start, auto delete: true
13:39:05 T:140612679559040   ERROR: ClearBlock: Trying to clear non existent block /home/sasha/.xbmc/addons/script.web.viewer
13:53:01 T:140611592124160  NOTICE: Thread Jobworker start, auto delete: true
13:53:04 T:140611835479808  NOTICE: Previous line repeats 1 times.
13:53:04 T:140611835479808  NOTICE: Thread XBPyThread start, auto delete: false
13:53:04 T:140611835479808  NOTICE: -->Python Interpreter Initialized<--
13:54:56 T:140612679559040   ERROR: GetDirectory - Error getting plugin://plugin.dbmc/?content_type=video
13:54:56 T:140612679559040   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.dbmc/?content_type=video) failed
13:54:56 T:140611592124160  NOTICE: Thread Background Loader start, auto delete: false
find quote
josetaza Offline
Junior Member
Posts: 38
Joined: Aug 2013
Reputation: 2
Location: The Netherlands, Eindhoven
Post: #55
Thanks for reporting this problem!
I see that Dropbox has changed their web-site (again). That is way it fails. I tried to solve it but now I'm also facing problems with WebViewer (script.module.mechanize to be precise). Undecided
Because the current authorization procedure is depended on the Dropbox web-site and WebViewer, it is not very robust... I'm going to change the procedure to make it more robust. The new procedure will force you to use a external browser.
When the new procedure works, I'll update you.
But for now... sorry the authorization just doesn't work. Confused
find quote
alcosar Offline
Junior Member
Posts: 2
Joined: Mar 2014
Reputation: 0
Post: #56
Thank you. Keep it up!
find quote
themagni Offline
Junior Member
Posts: 3
Joined: Mar 2014
Reputation: 0
Post: #57
Thank you. I figured it was something on DB's end. Good luck!
find quote
advtech Offline
Junior Member
Posts: 1
Joined: Mar 2014
Reputation: 0
Post: #58
Mine fails after asking for the password. It loads a broken site and when ever I enter my password, it gets hung up on submitting and never loads.
find quote
josetaza Offline
Junior Member
Posts: 38
Joined: Aug 2013
Reputation: 2
Location: The Netherlands, Eindhoven
Post: #59
The fix for the Authorization procedure is almost done. I think this weekend a new (beta) version will be available. Keep you posted...
find quote
josetaza Offline
Junior Member
Posts: 38
Joined: Aug 2013
Reputation: 2
Location: The Netherlands, Eindhoven
Post: #60
Just made a beta version (0.7.2beta) available with the new Authorization procedure.
You can download it here: https://sourceforge.net/projects/xbmc-dropbox/

It uses the http://xbmc-dropbox.sourceforge.net web-site for retrieving the Dropbox Access Code, which will be used by the addon to get the access token. The access token is needed by the addon to access your dropbox account.
Let me know if you have problems (or remarks). Thanks.
find quote