nzbToMedia/tests/general.py
echel0n eb7822b60b Updated logger code to now include the section, formatting has been modified as well.
Logging of debug messages is now optional via log_debug option location in autoProcessMedia.cfg

Lots of code cleanup has been performed including cleanup log messages and corrections of spelling errors.

Improved release lookup code for autoProcessMovie, narrows search results down by making API calls to the download clients to compare results in CouchPotato's database.
2014-04-18 13:23:39 -07:00

40 lines
No EOL
983 B
Python

import os
import sys
import nzbtomedia
import TorrentToMedia
from nzbtomedia.nzbToMediaUtil import find_download, clean_nzbname, listMediaFiles
nzbtomedia.initialize()
download_id = 'SABnzbd_nzo_qhoQ7m'
if find_download('sabnzbd', download_id):
print 'found'
else:
print 'no luck'
print nzbtomedia.CFG['SickBear','NzbDrone']['tv'].isenabled()
print nzbtomedia.CFG['SickBeard','NzbDrone']['tv'].isenabled()
if nzbtomedia.CFG['SickBeard', 'NzbDrone', 'CouchPotato']['tv']:
print True
else:
print False
if nzbtomedia.CFG['SickBeard']['tv']:
print True
else:
print False
print
print nzbtomedia.SUBSECTIONS["SickBeard"]
print
print nzbtomedia.CFG.findsection('tv')
print
print nzbtomedia.CFG.sections
print
sections = ("CouchPotato", "SickBeard", "NzbDrone", "HeadPhones", "Mylar", "Gamez")
print nzbtomedia.CFG[sections].sections
print nzbtomedia.CFG['SickBeard'].sections
print
print nzbtomedia.CFG['SickBeard','NzbDrone']
print nzbtomedia.CFG['SickBeard']