General > Developers

Transmission torrent on LinuxMCE

(1/11) > >>

robwoodward75:
All,

Not sure if this is the right place to put this, but I have recently spent a lot of time including transmission-daemon and some download management tools into the Linux MCE web admin site.  I have tried best I can to keep the theme as per the rest of the site, apart from the Transmission-daemon server connection, which is as per the transmission daemon installation.  There are pages on there to create symbolic links from either file or directory level to another folder (in my case, I was fed up with all the Sample.avi etc etc etc) appearing on Media Tomb, hence the symbolic links to just the movie!!  There is also built in an unrar, which most of the downloads appear to be.

The installation tool checks for transmission-daemon, and unrar, offering to add them in if they are not installed, adds a new database into MySQL called "transmission_links", and adds the menu option into Advanced > Configuration, then copies all the necessary web and scripting files into the relevant places.

In my set-up, I have put transmission-daemon's setting (/etc/transmission-daemon/settings.json) to use /home/public/torrents folder in my set-up, and my mediatomb only looks at /home/public/data.


WARNING!!!
Due to the new web pages, index.php will be replaced, as will include/config/database.inc.php and include/config/globalconfig.inc.php, so, if you have made any changes to these files, please be careful!!!  Back-up copies will however remain in their location with the date and time stamp after the file name so you can return to "normal" afterwards, similar to: index.php-20130729165423.bak.

Disclaimer
I accept no responsibility for loss of data, so please be sure to read through the install script prior to running, if you feel happier, then create the database and user, and copy the files manually.



Hope you like the layout, I will continue to try to work on advancing the layout and interface, and would appreciate any input from the outside world!

Marie.O:
Do you think it makes sense to provide an svn diff of what you did and create a trac ticket?

robwoodward75:
Hi Posde,

If I had the slightest idea how to do that, then I would!!  If you can point me to a suitable set of destructions to follow, I'de be glad to do that, if that's the preferred method.

Thanks for taking the time to look.

WhateverFits:
Get the source tree for the website:
http://wiki.linuxmce.org/index.php/Source_Code

It will be under the web folder in the subversion tree.

Unpack your file over the top of the stuff there. Then do:

svn diff > patchfile

and make sure it actually worked and then create a ticket here:
http://svn.linuxmce.org/

and attach the file. Don't forget to post your ticket number back here so people know about it quicker.  ;D

robwoodward75:
OK, did up to the raising of the Trac ticket, but the svn diff left me a little worried, in that it appears that there have been changes since my install, and I don't want to put something in which shows new changes being replaced with old stuff, effectively undoing other peoples work.  Here is the output of the svn diff, and it shows replacing lines, which I hadn't replaced.  Also, it doesn't include the new files I created?!  Any Suggestions?!  or is this what you expected to see?!  Sorry, first time doing this!!


--- Code: ---Index: lmce-admin/include/config/database.inc.php
===================================================================
--- lmce-admin/include/config/database.inc.php (revision 27776)
+++ lmce-admin/include/config/database.inc.php (working copy)
@@ -26,6 +26,10 @@
   $securityADO = &ADONewConnection($dbPlutoSecurityType);
   $securityADO->NConnect($dbPlutoSecurityServer,urlencode($dbPlutoSecurityUser),urlencode($dbPlutoSecurityPass),urlencode($dbPlutoSecurityDatabase));
 
+ // TransmissionADO connection
+ $transmissionADO = &ADONewConnection($dbTransmissionType);
+ $transmissionADO->NConnect($dbTransmissionServer,urlencode($dbTransmissionUser),urlencode($dbTransmissionPass),urlencode($dbTransmissionDatabase));
+
   //for sqlite
   //$db = &ADONewConnection('sqlite');
   //$db->NConnect($GLOBALS['appRoot'].'sqlite.db'); # sqlite will create if does not exist
Index: lmce-admin/include/config/globalconfig.inc.php
===================================================================
--- lmce-admin/include/config/globalconfig.inc.php (revision 27776)
+++ lmce-admin/include/config/globalconfig.inc.php (working copy)
@@ -32,6 +32,13 @@
  $dbPlutoSecurityServer = $DB_HOST;
  $dbPlutoSecurityDatabase = "pluto_security";
 
+ // Transmission
+ $dbTransmissionType = "mysql";
+ $dbTransmissionUser = "transmission";
+ $dbTransmissionPass = "";
+ $dbTransmissionServer = $DB_HOST;
+ $dbTransmissionDatabase = "transmission_links";
+
 function LoadConfig($configFile,$configKey) {
  //LoadConfig()
  //Looks for the assigned value of $configKey within $configFile,
Index: lmce-admin/index.php
===================================================================
--- lmce-admin/index.php (revision 27776)
+++ lmce-admin/index.php (working copy)
@@ -1078,10 +1078,9 @@
  $output = new Template($dbADO);
  $output->setTemplateFileType('large');
  @include($GLOBALS['globalConfigPath'].'asteriskDB.inc.php');
- @include($GLOBALS['globalConfigPath'].'telecom.inc.php');
      include_once('operations/phones/phoneLines.php');
      $output->setHelpSrc('/wiki/index.php/Phone_Lines');
-     phoneLines($output,$asteriskADO,$dbADO,$telecomADO);
+     phoneLines($output,$asteriskADO,$dbADO);
  break;
  case 'fax';
  $output = new Template($dbADO);
@@ -1801,6 +1800,20 @@
      include_once('operations/deviceTemplate/commMethod.php');
      commMethod($output,$dbADO);    
  break;
+ case 'transmission-daemon':
+ $output = new Template($dbADO);
+ $output->setTemplateFileType('large');
+     include_once('operations/others/transmissionDaemon.php');
+     transmissionDaemon($output,$dbADO,$transmissionADO);    
+     //transmissionDaemon($output,$dbADO,"");    
+ break;
+ case 'transmissionLink':
+ $output = new Template($dbADO);
+ $output->setTemplateFileType('small');
+     include_once('operations/others/transmissionLink.php');
+     transmissionLink($output,$dbADO,$transmissionADO);    
+     //transmissionLink($output,$dbADO,"");    
+ break;
  case 'upnpServer':
  $output = new Template($dbADO);
  $output->setTemplateFileType('large');


--- End code ---

Navigation

[0] Message Index

[#] Next page

Sitemap 
Go to full version