# Path: dj/scripts/post_blip.py
# class post(process):
#   def process_ep(self, ep):
#   def add_more_options(self, parser):


import os
import xml.etree.ElementTree
from . import blip_uploader
from .post_blip import roles
from . import pw
from process import process
from main.models import Episode
    fields = {
            # "post": "1",
            "cmd":"delete",
            "skin": "xmlhttprequest",
            "userlogin": user,
            "password": password,
            "item_type": "file",
            "reason": reason,
            "id": file_id
            }

    blip_cli=blip_uploader.Blip_CLI()
    # blip_delete_url="http://blip.tv/file/delete/%s" % file_id
    blip_delete_url="http://blip.tv/"
    # print blip_delete_url
    response = blip_cli.PostMultipart(blip_delete_url, fields)
 
    response_xml = response.read()
    if self.options.verbose: print(response_xml)
    tree = xml.etree.ElementTree.fromstring(response_xml)
    response = tree.find('response')
    if self.options.verbose: print("response.txt", response.text)
    notice=response.find('notice')
    if xml.etree.ElementTree.iselement(notice):
        print("notice.text", notice.text)

    return response

  def up_missing_files(self,ep):
        type_map = (

# Path: dj/scripts/post_blip.py
# class post(process):
#   def process_ep(self, ep):
#   def add_more_options(self, parser):


# Path: dj/scripts/ckblip.py
import os
import xml.etree.ElementTree
from . import blip_uploader
from .post_blip import roles
from . import pw
from process import process
from main.models import Episode

    fields = {
            # "post": "1",
            "cmd":"delete",
            "skin": "xmlhttprequest",
            "userlogin": user,
            "password": password,
            "item_type": "file",
            "reason": reason,
            "id": file_id
            }

    blip_cli=blip_uploader.Blip_CLI()
    # blip_delete_url="http://blip.tv/file/delete/%s" % file_id
    blip_delete_url="http://blip.tv/"
    # print blip_delete_url
    response = blip_cli.PostMultipart(blip_delete_url, fields)
 
    response_xml = response.read()
    if self.options.verbose: print(response_xml)
    tree = xml.etree.ElementTree.fromstring(response_xml)
    response = tree.find('response')
    if self.options.verbose: print("response.txt", response.text)
    notice=response.find('notice')
    if xml.etree.ElementTree.iselement(notice):
        print("notice.text", notice.text)

    return response

  def up_missing_files(self,ep):
        type_map = (

            {'ext':'ogv','mime':'video/ogg'},