예제 #1
0
def save_strm(nzbname, url):
    log("save_strm: nzbname: %s url: %s" % (nzbname, url))
    strm2lib.save_strm(__settings__, nzbname, url)
    if SAVE_NZB and utils.exists(NZB_CACHE):
        nzb_path = utils.join(NZB_CACHE, '%s%s' % (nzbname, '.nzb'))
        log("save_strm: nzb_path: %s" % nzb_path)
        m_nzb.save(url, nzb_path)
예제 #2
0
def save_strm(nzbname, url):
    log("save_strm: nzbname: %s url: %s" % (nzbname, url))
    strm2lib.save_strm(__settings__, nzbname, url)
    if SAVE_NZB and utils.exists(NZB_CACHE):
        nzb_path = utils.join(NZB_CACHE, '%s%s' % (nzbname, '.nzb'))
        log("save_strm: nzb_path: %s" % nzb_path)
        m_nzb.save(url, nzb_path)
예제 #3
0
 def save(self):
     strm_path = utils.join(self.folder, ('%s.strm' % self.nzbname))
     nzb_path = utils.join(self.folder, ('%s.nzb' % self.nzbname))
     nzb = urllib.quote_plus(self.nzb)
     nzbname = urllib.quote_plus(self.nzbname)
     if utils.exists(strm_path):
         log("StrmFile: save: replacing .strm file: %s" % strm_path.encode("utf_8"))
     line = "plugin://plugin.program.pneumatic/?mode=strm&nzb=" + nzb +\
                    "&nzbname=" + nzbname
     try: 
         utils.write(strm_path, line, 'wb')
     except:
         log("StrmFile: save: failed to create .strm file: %s" % strm_path.encode("utf_8"))
     if utils.exists(nzb_path):
         log("StrmFile: save: replacing .nzb file: %s" % nzb_path.encode("utf_8"))
     m_nzb.save(self.nzb, nzb_path)
예제 #4
0
 def save(self):
     strm_path = utils.join(self.folder, ('%s.strm' % self.nzbname))
     nzb_path = utils.join(self.folder, ('%s.nzb' % self.nzbname))
     nzb = urllib.quote_plus(self.nzb)
     nzbname = urllib.quote_plus(self.nzbname)
     if utils.exists(strm_path):
         log("StrmFile: save: replacing .strm file: %s" %
             strm_path.encode("utf_8"))
     line = "plugin://plugin.program.pneumatic/?mode=strm&nzb=" + nzb +\
                    "&nzbname=" + nzbname
     try:
         utils.write(strm_path, line, 'wb')
     except:
         log("StrmFile: save: failed to create .strm file: %s" %
             strm_path.encode("utf_8"))
     if utils.exists(nzb_path):
         log("StrmFile: save: replacing .nzb file: %s" %
             nzb_path.encode("utf_8"))
     m_nzb.save(self.nzb, nzb_path)
예제 #5
0
def save_strm(nzbname, url):
    strm2lib.save_strm(__settings__, nzbname, url)
    if SAVE_NZB and os.path.exists(NZB_CACHE):
        nzb_path = os.path.join(NZB_CACHE, '%s%s' % (nzbname, '.nzb'))
        m_nzb.save(url, nzb_path)