~gabriel1984sibiu/openshot/openshot

« back to all changes in this revision

Viewing changes to openshot/classes/uploads.py

  • Committer: Jonathan Thomas
  • Date: 2010-11-23 14:46:59 UTC
  • Revision ID: jonathan.oomph@gmail.com-20101123144659-59hrhh5yxlb4ijtg
Added 2 python libraries that will assist with connecting and 
uploading files to Vimeo.com (i.e. oauth2).

Refactored some of the upload methods, to better support having
folders full of python files related to a single upload service.

The vimeo.com upload does not work yet,

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import gtk
2
 
import os
3
 
 
4
 
class UploadManager():
5
 
    def __init__(self, project):
6
 
        self.project = project
7
 
    
8
 
    def get_services(self):
9
 
        return { "YouTube" : YouTube(self.project),
10
 
                      "Vimeo" : Vimeo(self.project),
11
 
                   }
12
 
    
13
 
 
14
 
class YouTube():
15
 
    def __init__(self, project):
16
 
        self.project = project
17
 
        self.filename = None
18
 
    
19
 
    def get_logo(self):
20
 
        logo_path = os.path.join(self.project.IMAGE_DIR, "upload_services", "youtube.png")
21
 
        return gtk.gdk.pixbuf_new_from_file(logo_path)
22
 
    
23
 
    def authenticate(self, username, password):
24
 
        pass
25
 
    
26
 
    def set_file(self, filename):
27
 
        self.filename = filename
28
 
    
29
 
    def start_upload(self):
30
 
        pass
31
 
 
32
 
    
33
 
class Vimeo():
34
 
    def __init__(self, project):
35
 
        self.project = project
36
 
        self.filename = None
37
 
        
38
 
    def get_logo(self):
39
 
        logo_path = os.path.join(self.project.IMAGE_DIR, "upload_services", "vimeo.png")
40
 
        return gtk.gdk.pixbuf_new_from_file(logo_path)
41
 
    
42
 
    def authenticate(self, username, password):
43
 
        pass
44
 
    
45
 
    def set_file(self, filename):
46
 
        self.filename = filename
47
 
    
48
 
    def start_upload(self):
49
 
        pass
 
 
b'\\ No newline at end of file'