Browse Source

Merge changes from branch sabnzbd-0.5.x Rev 3195-3223 to trunk.

tags/0.6.0
shypike 16 years ago
parent
commit
ddc5b9dc9c
  1. 14
      main/CHANGELOG.txt
  2. 2
      main/COPYRIGHT.txt
  3. 2
      main/INSTALL.txt
  4. 7
      main/ISSUES.txt
  5. 4
      main/PKG-INFO
  6. 10
      main/README.txt
  7. 4
      main/SABnzbd.py
  8. 10
      main/language/de-de.txt
  9. 17
      main/language/fr-fr.txt
  10. 9
      main/language/nl-du.txt
  11. 9
      main/language/sv-se.txt
  12. 9
      main/language/us-en.txt
  13. 10
      main/osx/osx/par2/LICENSE
  14. BIN
      main/osx/osx/par2/par2-sl
  15. 4
      main/osx/resources/update
  16. 7
      main/sabnzbd/__init__.py
  17. 3
      main/sabnzbd/cfg.py
  18. 3
      main/sabnzbd/constants.py
  19. 19
      main/sabnzbd/interface.py
  20. 18
      main/sabnzbd/misc.py
  21. 38
      main/sabnzbd/newsunpack.py
  22. 3
      main/sabnzbd/newswrapper.py
  23. 9
      main/sabnzbd/nzbqueue.py
  24. 5
      main/sabnzbd/nzbstuff.py
  25. 5
      main/sabnzbd/postproc.py
  26. 2
      main/sabnzbd/utils/osx.py
  27. BIN
      main/win/par2/tbbmalloc.dll
  28. BIN
      main/win/par2/x64/tbbmalloc.dll

14
main/CHANGELOG.txt

@ -1,4 +1,18 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
0.5.0RC1 by The SABnzbd-Team
-------------------------------------------------------------------------------
Fixes:
- Fix broken server test in Wizard and Config->Servers
- Add tbbmalloc.dll to par2 program (prevents problems when you have
another version of that file on your system)
- Fix uneven download speed of very large NZBs
- Include special par2 variant for OSX 10.6+ (automatically selected)
- Fix problem with the script folder path containing a space
- Fix disabling of RSS feeds when changing settings
- When forcing disconnect don't try to send "Quit" to a non-responding server
- Warn user (once) about presence of old queue file
- Updated German texts
-------------------------------------------------------------------------------
0.5.0Beta6 by The SABnzbd-Team 0.5.0Beta6 by The SABnzbd-Team
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Fixes: Fixes:

2
main/COPYRIGHT.txt

@ -1,5 +1,5 @@
(c) Copyright 2007-2009 by "The SABnzbd-team". (c) Copyright 2007-2010 by "The SABnzbd-team".
The SABnzbd-team is: The SABnzbd-team is:

2
main/INSTALL.txt

@ -4,7 +4,7 @@
0) LICENSE 0) LICENSE
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
(c) Copyright 2008-2009 The SABnzbd-Team <team@sabnzbd.org> (c) Copyright 2008-2010 The SABnzbd-Team <team@sabnzbd.org>
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License modify it under the terms of the GNU General Public License

7
main/ISSUES.txt

@ -40,10 +40,3 @@ as possibe (OS, amount of usenet servers etc.)
function as normal. If you run from sources or use the --console option with the function as normal. If you run from sources or use the --console option with the
Win32-binary, you will see that logging continues in the console window, but Win32-binary, you will see that logging continues in the console window, but
nothing will be written to the log-files. nothing will be written to the log-files.
- Some people have reported problems with very large jobs (think 50G +)
Especially on low memory systems.
The is a work-around for this. Find the sabnzbd.ini file and find this line:
save_interval = 1
This is the minimum amount of minutes between subsequent saves of the
internal administration to disk. For very large downloads, 10 minutes is good setting.

4
main/PKG-INFO

@ -1,7 +1,7 @@
Metadata-Version: 1.0 Metadata-Version: 1.0
Name: SABnzbd Name: SABnzbd
Version: 0.6.0Alpha0 Version: 0.5.0RC1
Summary: SABnzbd-0.6.0ALpha0 Summary: SABnzbd-0.5.0RC1
Home-page: http://sourceforge.net/projects/sabnzbdplus Home-page: http://sourceforge.net/projects/sabnzbdplus
Author: The SABnzbd Team Author: The SABnzbd Team
Author-email: team@sabnzbd.org Author-email: team@sabnzbd.org

10
main/README.txt

@ -1,5 +1,5 @@
******************************************* *******************************************
*** This is SABnzbd 0.6.0 Alpha0 *** *** This is SABnzbd 0.5.0 RC1 ***
******************************************* *******************************************
SABnzbd is an open-source cross-platform binary newsreader. SABnzbd is an open-source cross-platform binary newsreader.
It simplifies the process of downloading from Usenet dramatically, It simplifies the process of downloading from Usenet dramatically,
@ -12,13 +12,13 @@ and offers a complete API for third-party applications to hook into.
There is an extensive Wiki on the use of SABnzbd. There is an extensive Wiki on the use of SABnzbd.
http://wiki.sabnzbd.org/ http://wiki.sabnzbd.org/
>>> PLEASE ALSO READ THE FILE "ISSUES.txt" <<<
******************************************* *******************************************
*** Beta Software *** *** Release Candidate Software ***
******************************************* *******************************************
This is Beta software, it�s almost mature. This is RC software, it´s almost the real thing.
We are quite confident, but not enough people
have used it yet.
You are invited to file problem reports on our forum: You are invited to file problem reports on our forum:
http://forums.sabnzbd.org http://forums.sabnzbd.org

4
main/SABnzbd.py

@ -1,5 +1,5 @@
#!/usr/bin/python -OO #!/usr/bin/python -OO
# Copyright 2008-2009 The SABnzbd-Team <team@sabnzbd.org> # Copyright 2008-2010 The SABnzbd-Team <team@sabnzbd.org>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
@ -205,7 +205,7 @@ def print_version():
print """ print """
%s-%s %s-%s
Copyright (C) 2008-2009, The SABnzbd-Team <team@sabnzbd.org> Copyright (C) 2008-2010, The SABnzbd-Team <team@sabnzbd.org>
SABnzbd comes with ABSOLUTELY NO WARRANTY. SABnzbd comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it This is free software, and you are welcome to redistribute it
under certain conditions. It is licensed under the under certain conditions. It is licensed under the

10
main/language/de-de.txt

@ -766,11 +766,15 @@ error-tvTemp@1 Temporäre Datei für %s konnte nicht angelegt werden.
warn-matrixBadRep@1 Ungültige nzbmatrix.com-Bericht-ID %s. warn-matrixBadRep@1 Ungültige nzbmatrix.com-Bericht-ID %s.
warn-matrixFail@1 Problem beim Zugriff auf den nzbmatrix.com-Server (%s) warn-matrixFail@1 Problem beim Zugriff auf den nzbmatrix.com-Server (%s)
warn-noRepair Kein PAR2-Programm gefunden. Eine Reparatur ist nicht möglich\n warn-noRepair Kein PAR2-Programm gefunden. Eine Reparatur ist nicht möglich\n
warn-noUnpack Kein UNRAR-Programm gefunden. Das Entpacken von RAR-Dateien ist nicht möglich\n
warn-badUnrar Das verwendete UNRAR-Programm wird nicht empfohlen.\
Laden Sie UNRAR stattdessen herunter von\
http://www.rarlab.com/rar_add.htm\n
warn-missingFiles \nWarnung: Nicht alle Dateien wurden entpackt. Beachten Sie das Protokoll. warn-missingFiles \nWarnung: Nicht alle Dateien wurden entpackt. Beachten Sie das Protokoll.
error-joinMismatch Die tatsächliche Grösse entsprach nicht der erwarteten Grösse. error-joinMismatch Die tatsächliche Grösse entsprach nicht der erwarteten Grösse.
error-joinFail@1 Fehler beim Zusammenfügen von %s error-joinFail@1 Fehler beim Zusammenfügen von %s
error-joinFail@2 [%s] Fehler "%s" beim Zusammenfügen der Dateien error-joinFail@2 [%s] Fehler "%s" beim Zusammenfügen der Dateien
msg-joinOK@3 [%s] %s Datei%s zusammengefügt msg-joinOK@2 [%s] %s Dateien zusammengefügt
error-unpackFail@1 Entpacken fehlgeschlagen. %s error-unpackFail@1 Entpacken fehlgeschlagen. %s
error-unpackFail@2 [%s] Fehler "%s" beim Entpacken der RAR-Dateien error-unpackFail@2 [%s] Fehler "%s" beim Entpacken der RAR-Dateien
error-badArchive Öffnen des Hauptarchivs fehlgeschlagen. Es ist verschlüsselt oder beschädigt. error-badArchive Öffnen des Hauptarchivs fehlgeschlagen. Es ist verschlüsselt oder beschädigt.
@ -780,8 +784,8 @@ error-unpackFull Entpacken fehlgeschlagen. Fehler beim Schreiben oder vo
error-unpackFailLog Entpacken fehlgeschlagen. Beachten Sie das Protokoll. error-unpackFailLog Entpacken fehlgeschlagen. Beachten Sie das Protokoll.
error-unpackPassword Entpacken fehlgeschlagen. Archiv benötigt ein Passwort. error-unpackPassword Entpacken fehlgeschlagen. Archiv benötigt ein Passwort.
error-unpackMissing Entpacken fehlgeschlagen. Eine erwartete Datei wurde nicht entpackt. error-unpackMissing Entpacken fehlgeschlagen. Eine erwartete Datei wurde nicht entpackt.
msg-unpackDone@4 %s Datei%s/Ordner%s entpackt in %s msg-unpackDone@2 %s Datei(en)/Ordner entpackt in %s
msg-unzipDone@3 %s Datei %s in %s msg-unzipDone@2 %s Dateien in %s
msg-QuickCheck Ausführen der schnellen Überprüfung... msg-QuickCheck Ausführen der schnellen Überprüfung...
msg-QuickChecking Schnelle Überprüfung msg-QuickChecking Schnelle Überprüfung
msg-QuickOK@1 [%s] Schnelle Überprüfung erfolgreich msg-QuickOK@1 [%s] Schnelle Überprüfung erfolgreich

17
main/language/fr-fr.txt

@ -208,9 +208,9 @@ explain-enable_https Active l'acc
opt-https_port Port HTTPS opt-https_port Port HTTPS
explain-https_port Port sur lequel SABnzbd doit attendre les connexions HTTPS. explain-https_port Port sur lequel SABnzbd doit attendre les connexions HTTPS.
opt-https_cert Certificat HTTPS opt-https_cert Certificat HTTPS
explain-https_cert Fichier or chemin du certificat HTTPS. explain-https_cert Fichier ou chemin du certificat HTTPS.
opt-https_key Clé HTTPS opt-https_key Clé HTTPS
explain-https_key Fichier or chemin de la clé HTTPS. explain-https_key Fichier ou chemin de la clé HTTPS.
tuning Tuning tuning Tuning
opt-refresh_rate Intervalle de rafraîchissement de la file d'attente : opt-refresh_rate Intervalle de rafraîchissement de la file d'attente :
explain-refresh_rate Intervalle de rafraichissement dans l'interface web (en sec, 0=aucun). explain-refresh_rate Intervalle de rafraichissement dans l'interface web (en sec, 0=aucun).
@ -223,7 +223,7 @@ explain-cache_limitstr Permet de mettre en cache en RAM les articles pour r
<i>En bytes, peut être suivi de K,M,G. Par exemple : "64M" ou "128M"</i> <i>En bytes, peut être suivi de K,M,G. Par exemple : "64M" ou "128M"</i>
opt-cleanup_list Liste de nettoyage opt-cleanup_list Liste de nettoyage
explain-cleanup_list Liste des extensions de fichiers qui doivent être supprimés après téléchargement\n\ explain-cleanup_list Liste des extensions de fichiers qui doivent être supprimés après téléchargement\n\
Par exemple: <b>.nfo</b> or <b>.nfo, .sfv</b> Par exemple: <b>.nfo</b> ou <b>.nfo, .sfv</b>
button-saveChanges Enregistrer les modifications button-saveChanges Enregistrer les modifications
opt-language Langage opt-language Langage
explain-language Séléction la langue de l'interface web. explain-language Séléction la langue de l'interface web.
@ -713,11 +713,14 @@ error-tvTemp@1 Impossible de cr
warn-matrixBadRep@1 Numéro de rapport nzbmatrix invalide %s warn-matrixBadRep@1 Numéro de rapport nzbmatrix invalide %s
warn-matrixFail@1 Problème d'accès au serveur nzbmatrix (%s) warn-matrixFail@1 Problème d'accès au serveur nzbmatrix (%s)
warn-noRepair Le binaire PAR2 n'a pas été trouvé, les réparations ne sont pas possibles\n warn-noRepair Le binaire PAR2 n'a pas été trouvé, les réparations ne sont pas possibles\n
warn-noUnpack Le binaire UNRAR n'a pas été trouvé, la décompression des fichiers RAR n'est pas possible\n
warn-badUnrar La version de votre binaire UNRAR n'est pas recommandée,\
Vous pouvez l'obtenir ici http://www.rarlab.com/rar_add.htm\n
warn-missingFiles \nAttention : tous les fichiers n'ont pas été décompressés, voir le log warn-missingFiles \nAttention : tous les fichiers n'ont pas été décompressés, voir le log
error-joinMismatch La taille ne correspond pas à la taille attendue error-joinMismatch La taille ne correspond pas à la taille attendue
error-joinFail@1 La concaténation du fichier %s a echoué error-joinFail@1 La concaténation du fichiers %s a echoué
error-joinFail@2 [%s] Erreur "%s" lors de la concaténation des fichiers error-joinFail@2 [%s] Erreur "%s" lors de la concaténation des fichiers
msg-joinOK@3 [%s] Concaténation %s fichier%s msg-joinOK@2 [%s] Concaténation %s fichiers
error-unpackFail@1 Echec de la décompression, %s error-unpackFail@1 Echec de la décompression, %s
error-unpackFail@2 [%s] Erreur "%s" lors de la décompression des fichiers RAR error-unpackFail@2 [%s] Erreur "%s" lors de la décompression des fichiers RAR
error-badArchive Impossible d'ouvrir l'archive principale (encryptée ou corrompue) error-badArchive Impossible d'ouvrir l'archive principale (encryptée ou corrompue)
@ -727,8 +730,8 @@ error-unpackFull Echec de la d
error-unpackFailLog Echec de la décompression, voir log error-unpackFailLog Echec de la décompression, voir log
error-unpackPassword Echec de la décompression, l'archive nécessite un mot de passe error-unpackPassword Echec de la décompression, l'archive nécessite un mot de passe
error-unpackMissing Echec de la décompression, un fichier attendu n'a pas été décompressé error-unpackMissing Echec de la décompression, un fichier attendu n'a pas été décompressé
msg-unpackDone@4 %s fichier%s/dossier%s décompressés en %s msg-unpackDone@2 %s fichier(s)/dossier(s) décompressés en %s
msg-unzipDone@3 %s fichier%s en %s msg-unzipDone@2 %s fichiers en %s
msg-QuickCheck Contrôle Rapide... msg-QuickCheck Contrôle Rapide...
msg-QuickChecking Contrôle Rapide en cours msg-QuickChecking Contrôle Rapide en cours
msg-QuickOK@1 [%s] Contrôle Rapide OK msg-QuickOK@1 [%s] Contrôle Rapide OK

9
main/language/nl-du.txt

@ -694,11 +694,14 @@ error-tvTemp@1 Aanmaken tijdelijk bestand %s mislukt
warn-matrixBadRep@1 Ongeldig nzbmatrix rapport nummer %s warn-matrixBadRep@1 Ongeldig nzbmatrix rapport nummer %s
warn-matrixFail@1 Geen toegang tot nzbmatrix (%s) warn-matrixFail@1 Geen toegang tot nzbmatrix (%s)
warn-noRepair Geen PAR2 programma, kan geen reparaties uitvoeren\n warn-noRepair Geen PAR2 programma, kan geen reparaties uitvoeren\n
warn-noUnpack Geen UNRAR programma gevonden, uitpakken van RAR bestanden niet mogelijk\n
warn-badUnrar Versie van UNRAR wordt niet aanbevolen,\
download UNRAR van http://www.rarlab.com/rar_add.htm\n
warn-missingFiles \nLet op: niet alle bestanded zijn uitgepakt, zie log warn-missingFiles \nLet op: niet alle bestanded zijn uitgepakt, zie log
error-joinMismatch Verwachte lengte ongelijk aan echte lengte error-joinMismatch Verwachte lengte ongelijk aan echte lengte
error-joinFail@1 Samenvoegen van Bestanden %s is mislukt error-joinFail@1 Samenvoegen van Bestanden %s is mislukt
error-joinFail@2 [%s] Fout "%s" bij samenvoegen van bestanden error-joinFail@2 [%s] Fout "%s" bij samenvoegen van bestanden
msg-joinOK@3 [%s] %s bestand%s samengevoegd msg-joinOK@2 [%s] %s bestanden samengevoegd
error-unpackFail@1 Uitpakken mislukt, %s error-unpackFail@1 Uitpakken mislukt, %s
error-unpackFail@2 [%s] Fout "%s" bij het uitpakken van RAR bestanden error-unpackFail@2 [%s] Fout "%s" bij het uitpakken van RAR bestanden
error-badArchive Kan hoofd archief bestand niet openen (beschadigd of versleuteld) error-badArchive Kan hoofd archief bestand niet openen (beschadigd of versleuteld)
@ -708,8 +711,8 @@ error-unpackFull Uitpakken mislukt, schrijffout of schijf vol?
error-unpackFailLog Uitpakken mislukt, zie log error-unpackFailLog Uitpakken mislukt, zie log
error-unpackPassword Uitpakken mislukt, archief heeft wachtwoord nodig error-unpackPassword Uitpakken mislukt, archief heeft wachtwoord nodig
error-unpackMissing Uitpakken mislukt, er zijn te weinig bestanden uitgepakt error-unpackMissing Uitpakken mislukt, er zijn te weinig bestanden uitgepakt
msg-unpackDone@4 %s bestand%s/map%s uitgepakt in %s msg-unpackDone@2 %s bestanden/mappen uitgepakt in %s
msg-unzipDone@3 %s bestand%s in %s msg-unzipDone@2 %s bestanden in %s
msg-QuickCheck Snelle Controle... msg-QuickCheck Snelle Controle...
msg-QuickChecking Snelle Controle uitvoeren msg-QuickChecking Snelle Controle uitvoeren
msg-QuickOK@1 [%s] Snelle Controle OK msg-QuickOK@1 [%s] Snelle Controle OK

9
main/language/sv-se.txt

@ -710,11 +710,14 @@ error-tvTemp@1 Kan inte skapa temporär fil för %s
warn-matrixBadRep@1 Ogiltigt nzbmatrix rapporteringsnummer %s warn-matrixBadRep@1 Ogiltigt nzbmatrix rapporteringsnummer %s
warn-matrixFail@1 Anslutningsproblem till nzbmatrix server (%s) warn-matrixFail@1 Anslutningsproblem till nzbmatrix server (%s)
warn-noRepair Inget PAR2 program funnet, reparation ej möjlig\n warn-noRepair Inget PAR2 program funnet, reparation ej möjlig\n
warn-noUnpack Inget UNRAR program funnet, uppackning ej möjlig\n
warn-badUnrar Din version av UNRAR rekommenderas inte,\
få UNRAR från http://www.rarlab.com/rar_add.htm\n
warn-missingFiles \nVarning: alla filer blev inte uppackade, se logg warn-missingFiles \nVarning: alla filer blev inte uppackade, se logg
error-joinMismatch Förväntad storlek är inte lika verklig storlek error-joinMismatch Förväntad storlek är inte lika verklig storlek
error-joinFail@1 Filsammanslagning av %s misslyckades error-joinFail@1 Filsammanslagning av %s misslyckades
error-joinFail@2 [%s] Fel "%s" under filsammanslagning error-joinFail@2 [%s] Fel "%s" under filsammanslagning
msg-joinOK@3 [%s] Slår ihop %s fil(er)%s msg-joinOK@2 [%s] Slår ihop %s filer
error-unpackFail@1 Uppackning misslyckades, %s error-unpackFail@1 Uppackning misslyckades, %s
error-unpackFail@2 [%s] Fel "%s" under uppackning av RAR fil(er) error-unpackFail@2 [%s] Fel "%s" under uppackning av RAR fil(er)
error-badArchive Öppnande av huvudarkiv misslyckades (krypterat eller trasigt) error-badArchive Öppnande av huvudarkiv misslyckades (krypterat eller trasigt)
@ -724,8 +727,8 @@ error-unpackFull Uppackning misslyckades, skrivfel eller disken full?
error-unpackFailLog Uppackning misslyckades, se logg error-unpackFailLog Uppackning misslyckades, se logg
error-unpackPassword Uppackning misslyckades, arkivet kräver lösenord error-unpackPassword Uppackning misslyckades, arkivet kräver lösenord
error-unpackMissing Uppackning misslyckades, en väntad fil är inte uppackad error-unpackMissing Uppackning misslyckades, en väntad fil är inte uppackad
msg-unpackDone@4 Uppackad %s fil%s/mapp%s i %s msg-unpackDone@2 Uppackad %s filer/mappar i %s
msg-unzipDone@3 %s filer%s i %s msg-unzipDone@2 %s filer i %s
msg-QuickCheck Snabbkontroll... msg-QuickCheck Snabbkontroll...
msg-QuickChecking Snabbkontrollerar msg-QuickChecking Snabbkontrollerar
msg-QuickOK@1 [%s] Snabbkontroll OK msg-QuickOK@1 [%s] Snabbkontroll OK

9
main/language/us-en.txt

@ -709,11 +709,14 @@ error-tvTemp@1 Cannot create temp file for %s
warn-matrixBadRep@1 Invalid nzbmatrix report number %s warn-matrixBadRep@1 Invalid nzbmatrix report number %s
warn-matrixFail@1 Problem accessing nzbmatrix server (%s) warn-matrixFail@1 Problem accessing nzbmatrix server (%s)
warn-noRepair No PAR2 program found, repairs not possible\n warn-noRepair No PAR2 program found, repairs not possible\n
warn-noUnpack No UNRAR program found, unpacking RAR files is not possible\n
warn-badUnrar Your UNRAR version is not recommended,\
get it from http://www.rarlab.com/rar_add.htm\n
warn-missingFiles \nWarning: not all files were unpacked, see log warn-missingFiles \nWarning: not all files were unpacked, see log
error-joinMismatch Expected size did not equal actual size error-joinMismatch Expected size did not equal actual size
error-joinFail@1 File join of %s failed error-joinFail@1 File join of %s failed
error-joinFail@2 [%s] Error "%s" while joining files error-joinFail@2 [%s] Error "%s" while joining files
msg-joinOK@3 [%s] Joined %s file%s msg-joinOK@2 [%s] Joined %s files
error-unpackFail@1 Unpacking failed, %s error-unpackFail@1 Unpacking failed, %s
error-unpackFail@2 [%s] Error "%s" while unpacking RAR files error-unpackFail@2 [%s] Error "%s" while unpacking RAR files
error-badArchive Failed opening main archive (encrypted or damaged) error-badArchive Failed opening main archive (encrypted or damaged)
@ -723,8 +726,8 @@ error-unpackFull Unpacking failed, write error or disk is full?
error-unpackFailLog Unpacking failed, see log error-unpackFailLog Unpacking failed, see log
error-unpackPassword Unpacking failed, archive requires a password error-unpackPassword Unpacking failed, archive requires a password
error-unpackMissing Unpacking failed, an expected file was not unpacked error-unpackMissing Unpacking failed, an expected file was not unpacked
msg-unpackDone@4 Unpacked %s file%s/folder%s in %s msg-unpackDone@2 Unpacked %s files/folders in %s
msg-unzipDone@3 %s file%s in %s msg-unzipDone@2 %s files in %s
msg-QuickCheck Quick check... msg-QuickCheck Quick check...
msg-QuickChecking Quick Checking msg-QuickChecking Quick Checking
msg-QuickOK@1 [%s] Quick Check OK msg-QuickOK@1 [%s] Quick Check OK

10
main/osx/osx/par2/LICENSE

@ -0,0 +1,10 @@
par2SL version 1.0, Copyright (C) 2003 Peter Brian Clements.
Adapted for use with MacPar deLuxe by Gerard Putter.
This program is compatible with Mac OS X Snow Leopard or later.
It uses Grand Central Dispatch to optimize the speed and processor load.
This is free software, and you are welcome to redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version. See COPYING for details.

BIN
main/osx/osx/par2/par2-sl

Binary file not shown.

4
main/osx/resources/update

@ -17,8 +17,8 @@ if [ -d $DIR_TMP ]; then
fi fi
echo "2/5 > Exporting last svn revision..." echo "2/5 > Exporting last svn revision..."
svn export http://svn2.assembla.com/svn/SABnzbd/trunk/main/ $DIR_TMP>/dev/null svn export http://svn2.assembla.com/svn/SABnzbd/branches/sabnzbd-0.5.x/ $DIR_TMP>/dev/null
SVN_REV=`svn info http://svn2.assembla.com/svn/SABnzbd/trunk/main/ | awk '$1 == "Revision:" {print $2}'` SVN_REV=`svn info http://svn2.assembla.com/svn/SABnzbd/branches/sabnzbd-0.5.x/ | awk '$1 == "Revision:" {print $2}'`
echo " done." echo " done."
echo "3/5 > Cleaning up for OSX binary..." echo "3/5 > Cleaning up for OSX binary..."

7
main/sabnzbd/__init__.py

@ -123,6 +123,7 @@ SABSTOP = False
RESTART_REQ = False RESTART_REQ = False
OSX_ICON = 1 OSX_ICON = 1
PAUSED_ALL = False PAUSED_ALL = False
OLD_QUEUE = False
__INITIALIZED__ = False __INITIALIZED__ = False
__SHUTTING_DOWN__ = False __SHUTTING_DOWN__ = False
@ -163,7 +164,7 @@ def initialize(pause_downloader = False, clean_up = False, evalSched=False):
DEBUG_DELAY, \ DEBUG_DELAY, \
DAEMON, MY_NAME, MY_FULLNAME, NEW_VERSION, \ DAEMON, MY_NAME, MY_FULLNAME, NEW_VERSION, \
DIR_HOME, DIR_APPDATA, DIR_LCLDATA, DIR_PROG , DIR_INTERFACES, \ DIR_HOME, DIR_APPDATA, DIR_LCLDATA, DIR_PROG , DIR_INTERFACES, \
DARWIN, RESTART_REQ, OSX_ICON DARWIN, RESTART_REQ, OSX_ICON, OLD_QUEUE
if __INITIALIZED__: if __INITIALIZED__:
return False return False
@ -209,6 +210,10 @@ def initialize(pause_downloader = False, clean_up = False, evalSched=False):
### Set language files ### Set language files
lang.install_language(DIR_LANGUAGE, cfg.LANGUAGE.get()) lang.install_language(DIR_LANGUAGE, cfg.LANGUAGE.get())
### Check for old queue (when a new queue is not present)
if not os.path.exists(os.path.join(cfg.CACHE_DIR.get_path(), QUEUE_FILE_NAME)):
OLD_QUEUE = bool(glob.glob(os.path.join(cfg.CACHE_DIR.get_path(), QUEUE_FILE_TMPL % '?')))
### ###
### Initialize threads ### Initialize threads
### ###

3
main/sabnzbd/cfg.py

@ -84,6 +84,7 @@ enable_par_cleanup = OptionBool('misc', 'enable_par_cleanup', True)
par_option = OptionStr('misc', 'par_option', '', validation=no_nonsense) par_option = OptionStr('misc', 'par_option', '', validation=no_nonsense)
nice = OptionStr('misc', 'nice', '', validation=no_nonsense) nice = OptionStr('misc', 'nice', '', validation=no_nonsense)
ionice = OptionStr('misc', 'ionice', '', validation=no_nonsense) ionice = OptionStr('misc', 'ionice', '', validation=no_nonsense)
ignore_wrong_unrar = OptionBool('misc', 'ignore_wrong_unrar', False)
USERNAME_NEWZBIN = OptionStr('newzbin', 'username') USERNAME_NEWZBIN = OptionStr('newzbin', 'username')
PASSWORD_NEWZBIN = OptionPassword('newzbin', 'password') PASSWORD_NEWZBIN = OptionPassword('newzbin', 'password')
@ -137,7 +138,6 @@ ADMIN_DIR = OptionDir('misc', 'admin_dir', 'admin', validation=validate_safedir)
#LOG_DIR = OptionDir('misc', 'log_dir', 'logs') #LOG_DIR = OptionDir('misc', 'log_dir', 'logs')
DIRSCAN_DIR = OptionDir('misc', 'dirscan_dir', create=False) DIRSCAN_DIR = OptionDir('misc', 'dirscan_dir', create=False)
DIRSCAN_SPEED = OptionNumber('misc', 'dirscan_speed', DEF_SCANRATE, 1, 3600) DIRSCAN_SPEED = OptionNumber('misc', 'dirscan_speed', DEF_SCANRATE, 1, 3600)
SAVE_INTERVAL = OptionNumber('misc', 'save_interval', 1*60)
CHERRYHOST = OptionStr('misc','host', DEF_HOST) CHERRYHOST = OptionStr('misc','host', DEF_HOST)
if sabnzbd.WIN32: if sabnzbd.WIN32:
@ -160,6 +160,7 @@ WEB_DIR2 = OptionStr('misc', 'web_dir2')
WEB_COLOR = OptionStr('misc', 'web_color', '') WEB_COLOR = OptionStr('misc', 'web_color', '')
WEB_COLOR2 = OptionStr('misc', 'web_color2') WEB_COLOR2 = OptionStr('misc', 'web_color2')
CLEANUP_LIST = OptionList('misc', 'cleanup_list') CLEANUP_LIST = OptionList('misc', 'cleanup_list')
warned_old_queue = OptionBool('misc', 'warned_old_queue', False)
LOG_WEB = OptionBool('logging', 'enable_cherrypy_logging', False) LOG_WEB = OptionBool('logging', 'enable_cherrypy_logging', False)
LOG_DIR = OptionDir('misc', 'log_dir', 'logs') LOG_DIR = OptionDir('misc', 'log_dir', 'logs')

3
main/sabnzbd/constants.py

@ -51,7 +51,8 @@ MEBI = float(2 ** 20)
KIBI = float(2 ** 10) KIBI = float(2 ** 10)
BYTES_FILE_NAME = 'bytes%s.sab' % QUEUE_VERSION BYTES_FILE_NAME = 'bytes%s.sab' % QUEUE_VERSION
QUEUE_FILE_NAME = 'queue%s.sab' % QUEUE_VERSION QUEUE_FILE_TMPL = 'queue%s.sab'
QUEUE_FILE_NAME = QUEUE_FILE_TMPL % QUEUE_VERSION
POSTPROC_QUEUE_FILE_NAME = 'postproc%s.sab' % POSTPROC_QUEUE_VERSION POSTPROC_QUEUE_FILE_NAME = 'postproc%s.sab' % POSTPROC_QUEUE_VERSION
RSS_FILE_NAME = 'rss_data.sab' RSS_FILE_NAME = 'rss_data.sab'
BOOKMARK_FILE_NAME = 'bookmarks.sab' BOOKMARK_FILE_NAME = 'bookmarks.sab'

19
main/sabnzbd/interface.py

@ -39,7 +39,7 @@ from Cheetah.Template import Template
import sabnzbd.emailer as emailer import sabnzbd.emailer as emailer
from sabnzbd.misc import real_path, loadavg, \ from sabnzbd.misc import real_path, loadavg, \
to_units, diskfree, disktotal, get_ext, sanitize_foldername, \ to_units, diskfree, disktotal, get_ext, sanitize_foldername, \
get_filename, cat_to_opts, IntConv get_filename, cat_to_opts, IntConv, panic_old_queue
from sabnzbd.newswrapper import GetServerParms from sabnzbd.newswrapper import GetServerParms
import sabnzbd.newzbin as newzbin import sabnzbd.newzbin as newzbin
from sabnzbd.codecs import TRANS, xml_name, LatinFilter, unicoder, special_fixer from sabnzbd.codecs import TRANS, xml_name, LatinFilter, unicoder, special_fixer
@ -357,6 +357,11 @@ class MainPage:
@cherrypy.expose @cherrypy.expose
def index(self, **kwargs): def index(self, **kwargs):
if sabnzbd.OLD_QUEUE and not cfg.warned_old_queue.get():
cfg.warned_old_queue.set(True)
config.save_config()
return panic_old_queue()
if kwargs.get('skip_wizard') or config.get_servers(): if kwargs.get('skip_wizard') or config.get_servers():
info, pnfo_list, bytespersec = build_header(self.__prim) info, pnfo_list, bytespersec = build_header(self.__prim)
@ -369,9 +374,13 @@ class MainPage:
info['cat'] = 'Default' info['cat'] = 'Default'
info['cat_list'] = ListCats(True) info['cat_list'] = ListCats(True)
if sabnzbd.newsunpack.PAR2_COMMAND: info['warning'] = ''
info['warning'] = "" if cfg.enable_unrar.get():
else: if sabnzbd.newsunpack.RAR_PROBLEM:
info['warning'] = T('warn-badUnrar')
if not sabnzbd.newsunpack.RAR_COMMAND:
info['warning'] = T('warn-noUnpack')
if not sabnzbd.newsunpack.PAR2_COMMAND:
info['warning'] = T('warn-noRepair') info['warning'] = T('warn-noRepair')
template = Template(file=os.path.join(self.__web_dir, 'main.tmpl'), template = Template(file=os.path.join(self.__web_dir, 'main.tmpl'),
@ -1953,6 +1962,8 @@ class ConfigRss:
def upd_rss_feed(self, **kwargs): def upd_rss_feed(self, **kwargs):
msg = check_session(kwargs) msg = check_session(kwargs)
if msg: return msg if msg: return msg
if kwargs.get('enable') is not None:
del kwargs['enable']
try: try:
cfg = config.get_rss()[kwargs.get('feed')] cfg = config.get_rss()[kwargs.get('feed')]
except KeyError: except KeyError:

18
main/sabnzbd/misc.py

@ -430,7 +430,7 @@ MSG_BAD_NEWS = r'''
<blockquote> <blockquote>
%s %s
</blockquote> </blockquote>
<br>Program did not start!<br> <br>%s<br>
</body> </body>
</html> </html>
''' '''
@ -494,6 +494,14 @@ MSG_OTHER = r'''
%s<br> %s<br>
''' '''
MSG_OLD_QUEUE = r'''
SABnzbd detected a Queue and History from an older (0.4.x) release.<br><br>
Both queue and history will be ignored and may get lost!<br><br>
You may choose to stop SABnzbd and finish the queue with the older program.<br><br>
Click OK to continue to SABnzbd<br><br>
<FORM><input type="button" onclick="this.form.action='/.'; this.form.submit(); return false;" value="OK"/></FORM>
'''
def panic_message(panic, a=None, b=None): def panic_message(panic, a=None, b=None):
"""Create the panic message from templates """Create the panic message from templates
""" """
@ -527,8 +535,8 @@ def panic_message(panic, a=None, b=None):
else: else:
msg = MSG_OTHER % (a, b) msg = MSG_OTHER % (a, b)
msg = MSG_BAD_NEWS % (sabnzbd.MY_NAME, sabnzbd.__version__, sabnzbd.MY_NAME, sabnzbd.__version__,
msg = MSG_BAD_NEWS % (sabnzbd.MY_NAME, sabnzbd.__version__, sabnzbd.MY_NAME, sabnzbd.__version__, msg) msg, 'Program did not start!')
if sabnzbd.WIN_SERVICE: if sabnzbd.WIN_SERVICE:
sabnzbd.WIN_SERVICE.ErrLogger('Panic exit', msg) sabnzbd.WIN_SERVICE.ErrLogger('Panic exit', msg)
@ -558,6 +566,10 @@ def panic_queue(name):
def panic_tmpl(name): def panic_tmpl(name):
launch_a_browser(panic_message(PANIC_TEMPL, name, 0)) launch_a_browser(panic_message(PANIC_TEMPL, name, 0))
def panic_old_queue():
msg = MSG_OLD_QUEUE
return MSG_BAD_NEWS % (sabnzbd.MY_NAME, sabnzbd.__version__, sabnzbd.MY_NAME, sabnzbd.__version__, msg, '')
def panic(reason, remedy=""): def panic(reason, remedy=""):
print "\nFatal error:\n %s\n%s" % (reason, remedy) print "\nFatal error:\n %s\n%s" % (reason, remedy)
launch_a_browser(panic_message(PANIC_OTHER, reason, remedy)) launch_a_browser(panic_message(PANIC_OTHER, reason, remedy))

38
main/sabnzbd/newsunpack.py

@ -35,6 +35,7 @@ from sabnzbd.lang import T, Ta
if sabnzbd.WIN32: if sabnzbd.WIN32:
try: try:
import win32api
from win32con import SW_HIDE from win32con import SW_HIDE
from win32process import STARTF_USESHOWWINDOW, IDLE_PRIORITY_CLASS from win32process import STARTF_USESHOWWINDOW, IDLE_PRIORITY_CLASS
except ImportError: except ImportError:
@ -60,6 +61,7 @@ RAR_COMMAND = None
NICE_COMMAND = None NICE_COMMAND = None
ZIP_COMMAND = None ZIP_COMMAND = None
IONICE_COMMAND = None IONICE_COMMAND = None
RAR_PROBLEM = False
def find_programs(curdir): def find_programs(curdir):
"""Find external programs """Find external programs
@ -72,7 +74,16 @@ def find_programs(curdir):
return None return None
if sabnzbd.DARWIN: if sabnzbd.DARWIN:
try:
os_version = subprocess.Popen("sw_vers -productVersion", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).stdout.read()
#par2-sl from Macpar Deluxe 4.1 is only 10.6 and later
if int(os_version.split('.')[1]) >= 6:
sabnzbd.newsunpack.PAR2_COMMAND = check(curdir, 'osx/par2/par2-sl')
else:
sabnzbd.newsunpack.PAR2_COMMAND = check(curdir, 'osx/par2/par2-classic')
except:
sabnzbd.newsunpack.PAR2_COMMAND = check(curdir, 'osx/par2/par2-classic') sabnzbd.newsunpack.PAR2_COMMAND = check(curdir, 'osx/par2/par2-classic')
sabnzbd.newsunpack.RAR_COMMAND = check(curdir, 'osx/unrar/unrar') sabnzbd.newsunpack.RAR_COMMAND = check(curdir, 'osx/unrar/unrar')
if sabnzbd.WIN32: if sabnzbd.WIN32:
@ -93,7 +104,8 @@ def find_programs(curdir):
sabnzbd.newsunpack.NICE_COMMAND = find_on_path('nice') sabnzbd.newsunpack.NICE_COMMAND = find_on_path('nice')
sabnzbd.newsunpack.IONICE_COMMAND = find_on_path('ionice') sabnzbd.newsunpack.IONICE_COMMAND = find_on_path('ionice')
sabnzbd.newsunpack.ZIP_COMMAND = find_on_path('unzip') sabnzbd.newsunpack.ZIP_COMMAND = find_on_path('unzip')
if not cfg.ignore_wrong_unrar.get():
sabnzbd.newsunpack.RAR_PROBLEM = not unrar_check(sabnzbd.newsunpack.RAR_COMMAND)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
def external_processing(extern_proc, complete_dir, filename, msgid, nicename, cat, group, status): def external_processing(extern_proc, complete_dir, filename, msgid, nicename, cat, group, status):
@ -326,7 +338,7 @@ def file_join(nzo, workdir, workdir_complete, delete, joinables):
joined_file.flush() joined_file.flush()
joined_file.close() joined_file.close()
msg = T('msg-joinOK@3') % (unicoder(joinable_set), i, add_s(i)) msg = T('msg-joinOK@2') % (unicoder(joinable_set), i)
nzo.set_unpack_info('Filejoin', msg, set=joinable_set) nzo.set_unpack_info('Filejoin', msg, set=joinable_set)
newfiles.append(joinable_set) newfiles.append(joinable_set)
except: except:
@ -551,7 +563,7 @@ def RAR_Extract(rarfile, numrars, nzo, setname, extraction_path):
else: else:
logging.info('Skipping unrar file check due to unreliable file names') logging.info('Skipping unrar file check due to unreliable file names')
msg = T('msg-unpackDone@4') % (str(len(extracted)), add_s(len(extracted)), add_s(len(extracted)), format_time_string(time() - start)) msg = T('msg-unpackDone@2') % (str(len(extracted)), format_time_string(time() - start))
nzo.set_unpack_info('Unpack', '[%s] %s' % (unicoder(setname), msg), set=setname) nzo.set_unpack_info('Unpack', '[%s] %s' % (unicoder(setname), msg), set=setname)
logging.info('%s', msg) logging.info('%s', msg)
@ -580,7 +592,7 @@ def unzip(nzo, workdir, workdir_complete, delete, zips):
else: else:
i += 1 i += 1
msg = T('msg-unzipDone@3') % (str(i),add_s(i), format_time_string(time() - tms)) msg = T('msg-unzipDone@2') % (str(i), format_time_string(time() - tms))
nzo.set_unpack_info('Unpack', msg) nzo.set_unpack_info('Unpack', msg)
# Delete the old files if we have to # Delete the old files if we have to
@ -1018,6 +1030,11 @@ def build_command(command):
stup.wShowWindow = SW_HIDE stup.wShowWindow = SW_HIDE
creationflags = IDLE_PRIORITY_CLASS creationflags = IDLE_PRIORITY_CLASS
# Work-around for bug in Python's Popen function,
# scripts with spaces in the path don't work.
if need_shell and ' ' in command[0]:
command[0] = win32api.GetShortPathName(command[0])
return (stup, need_shell, command, creationflags) return (stup, need_shell, command, creationflags)
# Sort the various RAR filename formats properly :\ # Sort the various RAR filename formats properly :\
@ -1155,3 +1172,16 @@ def add_s(i):
return 's' return 's'
else: else:
return '' return ''
def unrar_check(rar):
""" Return True if correct version of unrar is found """
if rar:
try:
version = subprocess.Popen(rar, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).stdout.read()
except:
return False
m = re.search("RAR\s(\d+)\.(\d+)\s+.*Alexander Roshal", version)
if m:
return (int(m.group(1)), int(m.group(2))) >= (3, 80)
return False

3
main/sabnzbd/newswrapper.py

@ -133,6 +133,9 @@ class NNTP:
self.blocking = block self.blocking = block
self.error_msg = None self.error_msg = None
if not info: if not info:
if block:
info = GetServerParms(host, port)
else:
raise socket.error(errno.EADDRNOTAVAIL, "Address not available - Check for internet or DNS problems") raise socket.error(errno.EADDRNOTAVAIL, "Address not available - Check for internet or DNS problems")
af, socktype, proto, canonname, sa = info[0] af, socktype, proto, canonname, sa = info[0]

9
main/sabnzbd/nzbqueue.py

@ -435,6 +435,10 @@ class NzbQueue(TryList):
nzo_id_pos1 = i nzo_id_pos1 = i
break break
# Don't change priority and order if priority is the same as asked
if priority == self.__nzo_list[nzo_id_pos1].get_priority():
return nzo_id_pos1
nzo.set_priority(priority) nzo.set_priority(priority)
if nzo_id_pos1 != -1: if nzo_id_pos1 != -1:
@ -573,7 +577,10 @@ class NzbQueue(TryList):
if file_done: if file_done:
if nzo.extra3 is None or time.time() > nzo.extra3: if nzo.extra3 is None or time.time() > nzo.extra3:
sabnzbd.save_data(nzo, nzo.nzo_id) sabnzbd.save_data(nzo, nzo.nzo_id)
nzo.extra3 = time.time() + float(cfg.SAVE_INTERVAL.get()) if nzo.extra4 is None:
nzo.extra3 = None
else:
nzo.extra3 = time.time() + nzo.extra4
_type = nzf.get_type() _type = nzf.get_type()

5
main/sabnzbd/nzbstuff.py

@ -511,7 +511,7 @@ class NzbObject(TryList):
self.extra2 = password self.extra2 = password
self.extra3 = None # Will hold earliest next save time of NZO self.extra3 = None # Will hold earliest next save time of NZO
self.extra4 = None self.extra4 = None # Will hold save timeout for this NZO
self.extra5 = None self.extra5 = None
self.extra6 = None self.extra6 = None
@ -583,6 +583,9 @@ class NzbObject(TryList):
else: else:
self.__files.sort(cmp=_nzf_cmp_name) self.__files.sort(cmp=_nzf_cmp_name)
# Set nzo save-delay to 6 sec per GB with a max of 5 min
self.extra4 = min(6.0 * float(self.__bytes) / GIGI, 300.0)
## begin nzo.Mutators ##################################################### ## begin nzo.Mutators #####################################################
## excluding nzo.__try_list ############################################### ## excluding nzo.__try_list ###############################################
def check_for_dupe(self, nzf): def check_for_dupe(self, nzf):

5
main/sabnzbd/postproc.py

@ -449,10 +449,10 @@ class PostProcessor(Thread):
## Show final status in history ## Show final status in history
if parResult and not unpackError: if parResult and not unpackError:
osx.sendGrowlMsg("Download Completed",filename,osx.NOTIFICATION['pp']) osx.sendGrowlMsg("Download Completed",filename,osx.NOTIFICATION['complete'])
nzo.set_status('Completed') nzo.set_status('Completed')
else: else:
osx.sendGrowlMsg("Download Failed",filename,osx.NOTIFICATION['pp']) osx.sendGrowlMsg("Download Failed",filename,osx.NOTIFICATION['complete'])
nzo.set_status('Failed') nzo.set_status('Failed')
except: except:
@ -463,6 +463,7 @@ class PostProcessor(Thread):
# pass # pass
logging.debug("Traceback: ", exc_info = True) logging.debug("Traceback: ", exc_info = True)
nzo.set_fail_msg(T('warn-PostCrash')) nzo.set_fail_msg(T('warn-PostCrash'))
osx.sendGrowlMsg("Download Failed",filename,osx.NOTIFICATION['complete'])
nzo.set_status('Failed') nzo.set_status('Failed')
# If the folder only contains one file OR folder, have that as the path # If the folder only contains one file OR folder, have that as the path

2
main/sabnzbd/utils/osx.py

@ -21,7 +21,7 @@
# Registration is made too early, the language module has not read the text file yet # Registration is made too early, the language module has not read the text file yet
#from sabnzbd.lang import T #from sabnzbd.lang import T
#NOTIFICATION = {'startup':'grwl-notif-startup','download':'grwl-notif-dl','pp':'grwl-notif-pp','other':'grwl-notif-other'} #NOTIFICATION = {'startup':'grwl-notif-startup','download':'grwl-notif-dl','pp':'grwl-notif-pp','other':'grwl-notif-other'}
NOTIFICATION = {'startup':'1. On Startup/Shutdown','download':'2. On adding NZB','pp':'3. On post-processing','other':'4. Other Messages'} NOTIFICATION = {'startup':'1. On Startup/Shutdown','download':'2. On adding NZB','pp':'3. On post-processing','complete':'4. On download terminated','other':'5. Other Messages'}
try: try:
import Growl import Growl

BIN
main/win/par2/tbbmalloc.dll

Binary file not shown.

BIN
main/win/par2/x64/tbbmalloc.dll

Binary file not shown.
Loading…
Cancel
Save