chorus2 icon indicating copy to clipboard operation
chorus2 copied to clipboard

Easily Copy Video URL from UI

Open gergely-sallai opened this issue 6 years ago • 1 comments

Feature suggestion

Detailed Description It'd be a nice to have an additional button for copying the Video's URL wherever there's a "Play in Browser" button on the UI.

Context

Browsers do not support all kinds of audio or video codecs, a way to easily access the video URL would make it a lot more convenient to play videos from Chorus UI with a different (non web based) player. With a click of a simple button the video's URL could be copied to the clipboard, and we'd only need to paste it to the external player.

Of course this would limit the "auto mark as watched" feature, as Chorus could have no way of knowing whether the video has been fully played, but I believe this is a reasonable compromise.

Possible Implementation

All the necessary API calls are there, in fact, the current play in browser feature uses this exact same API. This is only a matter of putting a button on the screen (a few screens to be exact). Almost managed to write a Chrome plugin for this, but I'm not familiar with Backbone and the other used frameworks, it was not trivial to access the data on-screen from Chrome dev console.

Note: Team Kodi will consider this item however we will not make any promises if it will be included.

gergely-sallai avatar Sep 07 '19 09:09 gergely-sallai

Until this feature is implemented, you can press the "Stream" button and in the window that opens, right click on the video and press "copy video url". Then you just have to add "yourkodiuser: yourpassword@" after "http://" The url should be like: http://yourkodiuser: [email protected]:8080/vfs/filepath.mkv

Also I modify the file kodi-webinterface.js to copy the URL to clipboard when tap on "More->Download", but only works on Chrome.

Files.prototype.downloadFile = function(file) {
      var downloadfilepath = this.downloadPath(file, function(path) {
	  var $temp = $("<input>");
	  $("body").append($temp);
	  $temp.val("http://yourkodiuser: [email protected]:8080/" + path).select();
	  document.execCommand("copy");
	  $temp.remove();
	  alert("URL copied!");
     });
  return "";//downloadfilepath;
};

avilco avatar Dec 28 '19 01:12 avilco

duplicate (i admit yours is earlier) of #389

malard avatar Jan 27 '24 21:01 malard