2 '''A line-based interface to Movies2HDD.'''
4 print (
"Movies2HDD's line-based interface Copyright (C) 2013 Niklas Sombert")
5 print (
"This program comes with ABSOLUTELY NO WARRANTY.")
6 print (
"This is free software, and you are welcome to redistribute it")
7 print (
"under certain conditions.")
11 print (
"Loading libraries...")
14 from getpass
import getpass
16 if sys.version_info.major == 2:
18 elif sys.version_info.major == 3:
21 print (
"What version of Python are you using?!")
27 print (
"Connect to your DreamBox")
30 print (
"Your password will be sent unencryptedly!!!")
31 print (
"Don't do this if you don't trust this network.")
32 print (
"Otherwise, please tunnel this connection via SSH.")
33 pwd = getpass(
"Password: ")
34 print (
"Connecting...")
35 Movies2HDD.connect(host, user, pwd)
38 print (
"Disconnecting...")
39 Movies2HDD.disconnect()
42 print (
"Search for movies")
43 search =
ask(
"Search for: ")
45 result = Movies2HDD.getAviableMovies(search)
46 print (
"The following movies were found:")
50 print (
" [" + str(i) +
"] " + x)
52 print (
"Which of them do you want to download?")
53 print (
"Please type in the numbers and seperate them with a ',' (e.g. '1,5,7,42,1234').")
54 selection_input =
ask(
"> ")
56 for x
in selection_input.split(
","):
58 movies_to_get.append(result[x])
60 print (
"The following movies are selected to be downloaded:")
61 for x
in movies_to_get:
63 movies = movies_to_get
70 print (
"Where do you want to save the movies?")
84 Movies2HDD.convertMovie(x)
85 elif filetype ==
"mpg":
86 print (
"The files are already .mpg.")
89 print (
"... file type are you using?")
98 print (
"What do you want to do next?")
99 print (
" [1] Connect to your DreamBox")
100 print (
" [2] Disconnect from your DreamBox")
101 print (
" [3] Search for movies (needs a connection)")
102 print (
" [4] Select movies from your disk (not implemented yet!)")
103 print (
" [5] Save movies to your disk (needs a list of movies)")
104 print (
" [6] Download movies (needs a connection and a list of movies)")
105 print (
" [7] Rename movies (needs a list of movies)")
106 print (
" [8] Convert movies (needs a list of movies)")
107 print (
" [9] Quit (disconnect first!)")