Take .torrent file from Dropbox
Take .torrent file from Dropbox
Would be nice if Transmission could monitor folder at Dropbox (or any other cloud service) and add .torrent files from there. E.g. I'm not home but want to add movie for download, then I upload .torrent file to Dropbox folder, Transmission with some interval checks the folder, gets the file and starts download. I'm back to home and voila - movie is ready to be watched
-
- Posts: 552
- Joined: Sun Dec 13, 2009 10:44 pm
Re: Take .torrent file from Dropbox
No thanks, I think that would be unnecessary bloat even if you limit it to just the more popular ones.
Technically you can "get it" by just setting your watchfolder inside DropBox's sync-folder.
Technically you can "get it" by just setting your watchfolder inside DropBox's sync-folder.
Re: Take .torrent file from Dropbox
Recently, Dropbox introduced new API called Drop-ins (https://www.dropbox.com/developers/dropins).
I've implemented Drop-ins choose interface on the original web interface with this API.
We can select a torrent file in Dropbox folder and submit your transmission without any file transfering.
To use Drop-ins interface, we need to register application information to Dropbox App Console. (https://www.dropbox.com/developers/apps)
This is modified lines. I hope we can improve this code.
file : /usr/share/transmission/web/index.html
line 10 :
<link rel="apple-touch-icon" href="./images/webclip-icon.png"/>
+ <script type="text/javascript" src="https://www.dropbox.com/static/api/1/dropins.js" id="dropboxjs" data-app-key="your app key"></script>
<script type="text/javascript" src="./javascript/jquery/jquery.min.js"></script>
line 294:
<label for="torrent_upload_file">Please select a torrent file to upload:</label>
<input type="file" name="torrent_files[]" id="torrent_upload_file" multiple="multiple" \
/>
+ <label for="torrent_upload_dropbox">Or select Dropbox:</label>
+ <input type="dropbox-chooser" name="selected-file" id="db-chooser" data-link-type="dire\
ct" data-extensions=".torrent" />
+<script type="text/javascript">
+ // add an event listener to a Chooser button
+ document.getElementById("db-chooser").addEventListener("DbxChooserSuccess",
+ function(e) {
+ document.getElementById("torrent_upload_url").value = e.files[0].link;
+ }, false);
+</script>
<label for="torrent_upload_url">Or enter a URL:</label>
<input type="url" id="torrent_upload_url"/>
<input type="checkbox" id="torrent_auto_start" />
<label for="torrent_auto_start" id="auto_start_label">Start when added</label>
I've implemented Drop-ins choose interface on the original web interface with this API.
We can select a torrent file in Dropbox folder and submit your transmission without any file transfering.
To use Drop-ins interface, we need to register application information to Dropbox App Console. (https://www.dropbox.com/developers/apps)
This is modified lines. I hope we can improve this code.
file : /usr/share/transmission/web/index.html
line 10 :
<link rel="apple-touch-icon" href="./images/webclip-icon.png"/>
+ <script type="text/javascript" src="https://www.dropbox.com/static/api/1/dropins.js" id="dropboxjs" data-app-key="your app key"></script>
<script type="text/javascript" src="./javascript/jquery/jquery.min.js"></script>
line 294:
<label for="torrent_upload_file">Please select a torrent file to upload:</label>
<input type="file" name="torrent_files[]" id="torrent_upload_file" multiple="multiple" \
/>
+ <label for="torrent_upload_dropbox">Or select Dropbox:</label>
+ <input type="dropbox-chooser" name="selected-file" id="db-chooser" data-link-type="dire\
ct" data-extensions=".torrent" />
+<script type="text/javascript">
+ // add an event listener to a Chooser button
+ document.getElementById("db-chooser").addEventListener("DbxChooserSuccess",
+ function(e) {
+ document.getElementById("torrent_upload_url").value = e.files[0].link;
+ }, false);
+</script>
<label for="torrent_upload_url">Or enter a URL:</label>
<input type="url" id="torrent_upload_url"/>
<input type="checkbox" id="torrent_auto_start" />
<label for="torrent_auto_start" id="auto_start_label">Start when added</label>