Movies2HDD
A simple set of python scripts and libraries to work with movies. I use it with my DreamBox.
 All Classes Namespaces Files Functions Variables Pages
Functions | Variables
movies2hdd.lbi Namespace Reference

Functions

def connect
 
def disconnect
 
def search
 
def select
 
def save
 
def download
 
def rename
 
def convert
 
def quit
 

Variables

tuple Movies2HDD = movies2hdd.Movies2HDD()
 
 ask = raw_input
 
tuple answer = int(ask("> "))
 

Function Documentation

def movies2hdd.lbi.connect ( )

Definition at line 26 of file lbi.py.

26 
27 def connect():
28  print ("Connect to your DreamBox")
29  host = ask("Host: ")
30  user = ask("User: ")
31  print ("Your password will be sent unencryptedly!!!")
32  print ("Don't do this if you don't trust this network.")
33  print ("Otherwise, please tunnel this connection via SSH.")
34  pwd = getpass("Password: ")
35  print ("Connecting...")
36  Movies2HDD.connect(host, user, pwd)
#
def movies2hdd.lbi.convert ( )

Definition at line 81 of file lbi.py.

81 
82 def convert():
83  if filetype == "ts":
84  for x in movies:
85  Movies2HDD.convertMovie(x)
86  elif filetype == "mpg":
87  print ("The files are already .mpg.")
88  else:
89  print ("What?!")
90  print ("... file type are you using?")
91  quit()
#
def movies2hdd.lbi.disconnect ( )

Definition at line 37 of file lbi.py.

37 
38 def disconnect():
39  print ("Disconnecting...")
40  Movies2HDD.disconnect()
#
def movies2hdd.lbi.download ( )

Definition at line 74 of file lbi.py.

74 
75 def download():
76  pass
77  #filetype = "ts"
#
def movies2hdd.lbi.quit ( )

Definition at line 92 of file lbi.py.

92 
93 def quit():
94  print ("Exiting...")
95  sys.exit()
#
def movies2hdd.lbi.rename ( )

Definition at line 78 of file lbi.py.

78 
79 def rename():
80  pass
#
def movies2hdd.lbi.save ( )

Definition at line 69 of file lbi.py.

69 
70 def save():
71  print ("Where do you want to save the movies?")
72  path = ask("> ")
73  #do something
#
def movies2hdd.lbi.search ( )

Definition at line 41 of file lbi.py.

41 
42 def search():
43  print ("Search for movies")
44  search = ask("Search for: ")
45  print ("")
46  result = Movies2HDD.getAviableMovies(search)
47  print ("The following movies were found:")
48  i = 0
49  for x in result:
50  i += 1
51  print (" [" + str(i) + "] " + x)
52  print ("")
53  print ("Which of them do you want to download?")
54  print ("Please type in the numbers and seperate them with a ',' (e.g. '1,5,7,42,1234').")
55  selection_input = ask("> ")
56  movies_to_get = []
57  for x in selection_input.split(","):
58  x = int(x)-1
59  movies_to_get.append(result[x])
60  print ("")
61  print ("The following movies are selected to be downloaded:")
62  for x in movies_to_get:
63  print (" * " + x)
64  movies = movies_to_get
#
def movies2hdd.lbi.select ( )

Definition at line 65 of file lbi.py.

65 
66 def select():
67  pass
68  #filetype = ?
#

Variable Documentation

tuple movies2hdd.lbi.answer = int(ask("> "))

Definition at line 109 of file lbi.py.

movies2hdd.lbi.ask = raw_input

Definition at line 17 of file lbi.py.

tuple movies2hdd.lbi.Movies2HDD = movies2hdd.Movies2HDD()

Definition at line 13 of file lbi.py.