180 likes | 320 Views
http://usenet-providers.net. Son of a…. Ohh … I know where this is going …. COME ON MAN!... BOBBY TABLED…. Weeks later … a new indexer .. No wait .. Nevermind. OK. Well this is so much better …. INTRO. Newznab = FREE! No regex to find releases
E N D
INTRO • Newznab= FREE! No regex to find releases • Newznab+ = $$ Live support. Auto updating regex • Not noob friendly • Runs on windows…YAY…
OMG REGXFU • /^(\(|\[|)((?P<parts>\d{1,4}\/\d{1,4}).*?|)\"(?P<name>.*?(480|720|810|1080|bluray|dts|dvd|bd25|bd50).*?)\.(info|mkv|Avi|mp4|vol|ogm|par|rar|sfv|nfo|nzb|web|srt|ass|mpg|txt|zip|wmv|ssa|r\d{1,3}|7z|tar|mov|divx|m2ts|rmvb|iso|dmg|sub|idx|rm|ac3|t\d{1,2}|u\d{1,3}
MY SIZE • root@nnplus:/var/www/newznab# du -k * | sort -nr | cut -f2 | xargs -d '\n' du -sh | head -n 100 • 27G nzbfiles • 9.5G db • 907M www • 3.6M misc
EXAMPLE SIZE • Mysql • 4.2G ./newznab • Covers 9.3G ./preview 1.1G ./music 303M ./book 29M ./anime 24G ./audio 93M ./console 2.2G ./movies Site 28G ./nzbs 60G ./www 8.0K ./docs 1.3M ./misc 1.4G ./db
MYSQL SIZE • +------------------+------------+-------------+--------------+------------+ • | TABLE_NAME | table_rows | data_length | index_length | Size in MB | • +------------------+------------+-------------+--------------+------------+ • | releasenfo | 462776 | 849947636 | 14172160 | 824.09 | • | parts | 5615341 | 686534620 | 579502080 | 1207.39 | • | releases | 1513851 | 368774104 | 344612864 | 680.34 | • | tvrage | 11932 | 70222096 | 350208 | 67.30 | • | episodeinfo | 82856 | 27310000 | 4425728 | 30.27 | • | binaries | 46474 | 20506068 | 9103360 | 28.24 | • | releasefiles | 111556 | 10732348 | 7620608 | 17.50 |
BASIC UPDATE SCRIPT cd /var/www/newznab/misc/sphinx php ./nnindexer.php daemon # start indexer php ./nnindexer.php index delta all # update db set –e export NEWZNAB_PATH="/var/www/newznab/misc/update_scripts/" export NEWZNAB_SLEEP_TIME="3600" # in seconds LASTOPTIMIZE=`date +%s` while : do CURRTIME=`date +%s` cd ${NEWZNAB_PATH} /usr/bin/php5 ${NEWZNAB_PATH}/update_binaries_threaded.php sleep 10 /usr/bin/php5 ${NEWZNAB_PATH}/update_releases.php DIFF=$(($CURRTIME-$LASTOPTIMIZE)) if [ "$DIFF" -gt 43200 ] || [ "$DIFF" -lt 1 ] then LASTOPTIMIZE=`date +%s` /usr/bin/php5 ${NEWZNAB_PATH}/optimise_db.php true /usr/bin/php5 ${NEWZNAB_PATH}/update_tvschedule.php /usr/bin/php5 ${NEWZNAB_PATH}/update_theaters.php fi echo "waiting ${NEWZNAB_SLEEP_TIME} seconds..." sleep ${NEWZNAB_SLEEP_TIME} done
CLEANUP SCRIPT # cleanup cd /var/www/newznab/misc/testing/ #php memcache.php #php update_binaries_threaded.php php removespecial.php php updateAllMiscOther.php php updateCategories.php php update_cleanup.php php updateMiscOtherNameswithnfo.php php update_parsing.php cd /var/www/newznab/misc/update_scripts/ php update_predb.php php optimise_db.php true #php /var/www/newznab/misc/update_scripts/update_releases.php
BACKFILL ? # Lets not import them all at once … 1K at a time nzb-importmodified.php /home/nnplus/MoviesHD/ • NZB’s are compressed localy • Import takes a lot of time / space • Turn off all lookup before mass import when using normal import script • Don’t let MYSQL db bloat! optimise_db.php true
SPHINX SETTINGS Sphinx Settings
NOTES/CONTACT • http://rmccurdy.com /scripts/newznab/ • NN IRC channel logs