Exemplo n.º 1
0
    def test_pull(self):
        tivopuller.initialize()
        fetcher = tivoFetcher.TivoFetcher("", "")
        fetcher.FetchPlayList = self.returnVals
        fetcher.Download = self.download

        tivopuller.QUEUE.addToQueue('1')

        down = tivoEpisodeDownloader.TivoEpisodeDownloader(fetcher)
        down.run()
Exemplo n.º 2
0
    def test_addToQueue(self):
        tivopuller.initialize()
        myDB = db.DBConnection()

        myDB.action("Update tivo_episode set Status = ? WHERE EpisodeId = '1'", [episodeStatus.getStatusCode('Wanted')])

        adder = tivoQueueAdder.TivoQueueAdder()

        adder.run()

        self.assertEqual(1, len(tivopuller.QUEUE))
Exemplo n.º 3
0
import os
import cherrypy

import tivopuller
from tivopuller import root, db, mainDB, playlistEntry, tivoFetcher, tivoPoller

import urllib2
import xml.etree.ElementTree as ET
from bs4 import BeautifulSoup
import datetime
import html_unescape
import Cookie

APPDIR = os.path.dirname(os.path.abspath(__file__))

tivopuller.initialize()

tivopuller.PROG_DIR = APPDIR

#INI_FILENAME = os.path.join(APPDIR, "cp.ini")

options = {'server.socket_port': 8777 , 'server.socket_host': '0.0.0.0'}

app = cherrypy.tree.mount(root.Root())
cherrypy.config.update(options)
cherrypy.server.start()
cherrypy.server.wait()

tivopuller.start()