2014-03-14 03:07:15 +00:00
|
|
|
from __future__ import with_statement
|
|
|
|
|
|
|
|
import unittest
|
|
|
|
|
|
|
|
import sys
|
2014-03-25 05:57:24 +00:00
|
|
|
import datetime
|
2014-03-14 03:07:15 +00:00
|
|
|
import os.path
|
2014-03-25 05:57:24 +00:00
|
|
|
import string
|
|
|
|
|
2014-03-14 03:07:15 +00:00
|
|
|
sys.path.append(os.path.abspath('..'))
|
2014-03-14 17:15:02 +00:00
|
|
|
sys.path.append(os.path.abspath('../../../lib'))
|
2014-03-14 03:07:15 +00:00
|
|
|
|
2014-03-25 05:57:24 +00:00
|
|
|
import sickbeard
|
2014-03-14 03:07:15 +00:00
|
|
|
|
|
|
|
class APICheck(unittest.TestCase):
|
2014-03-26 19:28:46 +00:00
|
|
|
indexer_id = 2930
|
2014-03-16 11:06:21 +00:00
|
|
|
lang = "en"
|
2014-03-14 03:07:15 +00:00
|
|
|
|
2014-03-26 19:28:46 +00:00
|
|
|
for indexer in sickbeard.indexerApi.indexers():
|
|
|
|
print indexer
|
|
|
|
print sickbeard.indexerApi().config['langabbv_to_id'][lang]
|
|
|
|
print sickbeard.indexerApi(indexer).cache
|
|
|
|
print sickbeard.indexerApi(indexer).name
|
|
|
|
print sickbeard.indexerApi(indexer).config['scene_url']
|
|
|
|
print sickbeard.indexerApi().config['valid_languages']
|
|
|
|
|
|
|
|
lINDEXER_API_PARMS = sickbeard.indexerApi(indexer).api_params.copy()
|
|
|
|
lINDEXER_API_PARMS['cache'] = True
|
|
|
|
t = sickbeard.indexerApi(indexer).indexer(**lINDEXER_API_PARMS)
|
|
|
|
epObj = t[indexer_id].airedOn(1)[0]
|
|
|
|
|
|
|
|
season = int(epObj["seasonnumber"])
|
|
|
|
episodes = [int(epObj["episodenumber"])]
|
2014-03-14 03:07:15 +00:00
|
|
|
|
2014-03-25 05:57:24 +00:00
|
|
|
if __name__ == "__main__":
|
|
|
|
unittest.main()
|