Skip to content

Commit

Permalink
DailyMotion handler added to publishtoyoutubedialog.py
Browse files Browse the repository at this point in the history
  • Loading branch information
feroze committed Aug 26, 2011
1 parent 0eaabee commit a7ba243
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions pitivi/ui/publishtoyoutubedialog.py
Expand Up @@ -30,7 +30,7 @@
from pitivi.log.loggable import Loggable
from pitivi.ui.glade import GladeWindow
from pitivi.actioner import Renderer
from pitivi.youtube_glib import YTUploader
from pitivi.youtube_glib import YTUploader, DMUploader
from gettext import gettext as _
from gobject import timeout_add
from string import ascii_lowercase, ascii_uppercase, maketrans, translate
Expand All @@ -40,6 +40,7 @@
unsecure_storing = False
except :
unsecure_storing = True
import pycurl

catlist = ['Film', 'Autos', 'Music', 'Animals', 'Sports', 'Travel', 'Games', 'Comedy', 'People', 'News', 'Entertainment', 'Education', 'Howto', 'Nonprofit', 'Tech']

Expand Down Expand Up @@ -250,6 +251,12 @@ def _newTagCb(self, entry):
self.taglist.append(text)
entry.set_text('')

def _videositeChangedCb(self, combo):
if combo.get_active_text() == "YouTube":
self.uploader=YTUploader()
else:
self.uploader = DMUploader()

def _categoryChangedCb(self, combo):
self.metadata["category"] = combo.get_active_text()

Expand Down Expand Up @@ -282,9 +289,11 @@ def _uploadProgressCb(self, done, total):
self.updatePosition(fraction, text, uploading = True)

def _uploadDoneCb(self, video_entry):
print "done !"
self.entry = gtk.Entry()
link = video_entry.find_html_link().split("&")[0]
try:
link = video_entry.find_html_link().split("&")[0]
except:
link = video_entry
self.entry.set_text(link)
self.uploadbar.destroy()
self.hbox.pack_start (self.entry)
Expand Down

0 comments on commit a7ba243

Please sign in to comment.