Mediainfo-rar: Difference between revisions

From Lundman Wiki
No edit summary
No edit summary
Line 1: Line 1:
== libdvdread.plus ==
=== Clomps-irc ===


I have made some patches to the regular '''libdvdread''' library used by many developers. Alas, I have had no luck in getting them accepted into the upstream repository, which has forced me to maintain a second version myself.  
A separate binary is compiled for the IRC Bot version of clomps. Clomps-irc connects to an IRC server(s), and sits in specified channel(s) to look for "New Release" notifications (or "Completion" messages depending on style).


Patches include:
To define an ircbot to listen to an irc server / irc channel, add the following line:


  * Bring UDF compatibility from base 1.92, to 2.50. This adds Bluray and BD5 ISO format.
  IRC | server=irc.server.com | port=6667 | pass=ircpass | nick=clomps | user=clomps@fxp.one | ssl=yes | channel=#bots ''|channel=#another''
  * Properly handle UDF chains, instead of assuming they are contiguous, and without gap.
  IRC | server=irc.server2.com | port=6667 | pass=ircpass | nick=clomps2 | user=clomps@fxp.one | ssl=no  | channel=#spew
  * Move filesizes from 32bit to 64bit.
* Add POSIX style '''opendir(3)''', '''readdir(3)''' API to add the ability to retrieve contents of ISO files & input-devices.
  * Add POSIX style '''open(3)''' of non-DVD related files. (Reading playlists, certificates etc)
* Allow API call to set IO handlers. Allowing all IO to libdvdread be developer defined. (Adding RAR support, or FTP perhaps)


Optionals are ''port, pass, ssl''. Should we add fishkey?


'''Download pre-patched source archive from:'''
You need to defines the sites with SITE lines, for each one you intend to use. In this case, do '''not''' have a '''DIR=''' section.


  http://lundman.net/ftp/dvdread/libdvdread-4.2.0.plus.tar.bz2
  SITE|NAME=ASite1|USESKIP=1|INCTEST=%s-(INCOMPLETE)|NUKETEST=NUKED-%s
SITE|NAME=glftpdsite|USESKIP=1|INCTEST=%s-(INCOMPLETE)|NUKETEST=NUKED-%s




Add a section:


TRADE | NICK=(?i)thebot | MATCH=\[TV\] New Release: <.*?> (.*) | SRCSITE=ASite1 | SRCDIR=/tv | DSTSITE=glftpdsite | DSTDIR=/tv | ACCEPT=*simpsons* | REJECT=*FINSUB*


If you wish to patch the original release yourself, the patches are located here:
'''NICK=''' Is a Regular Expression (RE) match on the nick name. Clomps will ignore other nicks. Here "(?i)" is the PCRE for "case-insensitive", matching on nick "thebot".
'''MATCH''' is Regular Expression to match a release on. This does;


* Match only on section "TV" (Since RE started with "[TV]")
* Match on new release message ("New Release", which could also be "Completed" or similar messages), to differentiate to "New racer, New SFV, or Halfway-through announces).
* Match and parse out the release name, ie "(.*)" and place it in "${releasename}". The part that is in parenthesis. This would unfortunately have to be tuned for each ircbot's output.
* If "${releasename}" passes the ACCEPT and REJECT rules, in this case "*simpsons* and *FINSUB*;


=== Patch 1: ===
If you need to use "|" in your regex, enclose the whole "MATCH=re" in quotes
TRADE|NICK=Test|"MATCH=.*|New Release|.* (.*?)"|SRC...


Handle AD chains correctly, skip gaps, and give full end blocks
If you wish to do groupings, like "(cat|dog)" use the non-capturing (). ie,  
"(?:cat|dog)?"
which will match either "cat", or "dog".


http://lundman.net/ftp/dvdread/patches/README.patch1
Specify '''REQUEUE''' if you wish FXP.One to continue queueing the release until completed. (If incoming to src is slower than src->dst link).
  http://lundman.net/ftp/dvdread/patches/patch1
  TRADE | NICK=(?i)thebot | MATCH=\[TV\] New Release: <.*?> (.*) | SRCSITE=ASite1 | SRCDIR=/tv | DSTSITE=glftpdsite | DSTDIR=/tv | ACCEPT=*simpsons* | REJECT=*FINSUB* | REQUEUE




=== Patch 2: ===


File sizes from 32 bit to 64 bit. If you have problems with finding a reliable [http://www.bestwritingservice.com essay service] that offers assistance not only with creating essays but term and research paper writing as well, I highly recommend you to visit BestWritingService.Com. If you have problems with finding a reliable [http://www.bestwritingservice.com essay service] that offers assistance not only with creating essays but term and research paper writing as well, I highly recommend you to visit BestWritingService.Com. One of my friends recommended me to order [http://www.essaysprofessors.com custom writing]on EssaysProfessors.Com. To tell you the truth, I have never regretted my decision. The writers are real professionals and know how to write impressive work full of knowledgeable information. Handle new FileInfoExt.
The release is then moved from SRCSITE:/SRCDIR/${releasename} -> DSTSITE:/DSTDIR/${releasename}


http://lundman.net/ftp/dvdread/patches/README.patch2
Should we add SESSIONS=<int> as well? So clomps-irc can be told to limit the number of sessions? Some cases you only ever want to use SESSIONS=1, so all new releases are added to the end of currently active transfers.
http://lundman.net/ftp/dvdread/patches/patch2


If we allow SESSIONS=2 or more, should we add balancing? round-robin? least-entries-in-queue?


=== Patch 3: ===


Add Directory Content access, reading DVD AACS/ Directory.
If all you care about is moving Completed releases, you should do the IRC match on the "Completed" message. This means you will wait until it is finished before it starts to move it. So, no racing.


http://lundman.net/ftp/dvdread/patches/README.patch3
However, if you want to move it as fast as possible, and participate in the racing, you should match on the "New Release" message. You probably also want to use REQUEUE keyword to make it retry until complete. However, if the source uploading is slower than the clomps trading connection, it might give up in the middle of a release (and leave an incomplete, if nobody else is racing), if this is an issue, it is recommended that you set clomps to match and trigger on '''both''' "New Release" '''and''' "Completed" messages. This ensures one final queuing to complete the release.
http://lundman.net/ftp/dvdread/patches/patch3
 
 
=== Patch 4: ===
 
Expose dvd_input handlers as API call.  
 
http://lundman.net/ftp/dvdread/patches/README.patch4
http://lundman.net/ftp/dvdread/patches/patch4

Revision as of 00:52, 12 March 2012

Clomps-irc

A separate binary is compiled for the IRC Bot version of clomps. Clomps-irc connects to an IRC server(s), and sits in specified channel(s) to look for "New Release" notifications (or "Completion" messages depending on style).

To define an ircbot to listen to an irc server / irc channel, add the following line:

IRC | server=irc.server.com  | port=6667 | pass=ircpass | nick=clomps  | user=clomps@fxp.one | ssl=yes | channel=#bots |channel=#another
IRC | server=irc.server2.com | port=6667 | pass=ircpass | nick=clomps2 | user=clomps@fxp.one | ssl=no  | channel=#spew

Optionals are port, pass, ssl. Should we add fishkey?

You need to defines the sites with SITE lines, for each one you intend to use. In this case, do not have a DIR= section.

SITE|NAME=ASite1|USESKIP=1|INCTEST=%s-(INCOMPLETE)|NUKETEST=NUKED-%s
SITE|NAME=glftpdsite|USESKIP=1|INCTEST=%s-(INCOMPLETE)|NUKETEST=NUKED-%s


Add a section:

TRADE | NICK=(?i)thebot | MATCH=\[TV\] New Release: <.*?> (.*) | SRCSITE=ASite1 | SRCDIR=/tv | DSTSITE=glftpdsite | DSTDIR=/tv | ACCEPT=*simpsons* | REJECT=*FINSUB* 

NICK= Is a Regular Expression (RE) match on the nick name. Clomps will ignore other nicks. Here "(?i)" is the PCRE for "case-insensitive", matching on nick "thebot". MATCH is Regular Expression to match a release on. This does;

  • Match only on section "TV" (Since RE started with "[TV]")
  • Match on new release message ("New Release", which could also be "Completed" or similar messages), to differentiate to "New racer, New SFV, or Halfway-through announces).
  • Match and parse out the release name, ie "(.*)" and place it in "${releasename}". The part that is in parenthesis. This would unfortunately have to be tuned for each ircbot's output.
  • If "${releasename}" passes the ACCEPT and REJECT rules, in this case "*simpsons* and *FINSUB*;

If you need to use "|" in your regex, enclose the whole "MATCH=re" in quotes

TRADE|NICK=Test|"MATCH=.*|New Release|.* (.*?)"|SRC...

If you wish to do groupings, like "(cat|dog)" use the non-capturing (). ie,

"(?:cat|dog)?" 

which will match either "cat", or "dog".

Specify REQUEUE if you wish FXP.One to continue queueing the release until completed. (If incoming to src is slower than src->dst link).

TRADE | NICK=(?i)thebot | MATCH=\[TV\] New Release: <.*?> (.*) | SRCSITE=ASite1 | SRCDIR=/tv | DSTSITE=glftpdsite | DSTDIR=/tv | ACCEPT=*simpsons* | REJECT=*FINSUB* | REQUEUE


The release is then moved from SRCSITE:/SRCDIR/${releasename} -> DSTSITE:/DSTDIR/${releasename}

Should we add SESSIONS=<int> as well? So clomps-irc can be told to limit the number of sessions? Some cases you only ever want to use SESSIONS=1, so all new releases are added to the end of currently active transfers.

If we allow SESSIONS=2 or more, should we add balancing? round-robin? least-entries-in-queue?


If all you care about is moving Completed releases, you should do the IRC match on the "Completed" message. This means you will wait until it is finished before it starts to move it. So, no racing.

However, if you want to move it as fast as possible, and participate in the racing, you should match on the "New Release" message. You probably also want to use REQUEUE keyword to make it retry until complete. However, if the source uploading is slower than the clomps trading connection, it might give up in the middle of a release (and leave an incomplete, if nobody else is racing), if this is an issue, it is recommended that you set clomps to match and trigger on both "New Release" and "Completed" messages. This ensures one final queuing to complete the release.