[RELEASE] Just another YouTube (Video) Plugin

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
hani Offline
Junior Member
Posts: 35
Joined: May 2007
Reputation: 0
Post: #1
Hi
I have some free time this week end so I thought about learning Python.
So I started this video plugin.

This plugin is far from being finshed. I have only tested this plugin under linux
I'm not sure if its going to work in the original xbox (path issue).

I just want to share with you so I can learn more from you guys.
Please let me know what do you think about it.
This is a video plugin it uses Google Data API .I use the setting dialog to for (search, login)

Please let me know what do you think aboutSmile
here is some screenshots:
[Image: i44111_Screen2.png]
[Image: i44110_Screen1.png]

and here is the file:
http://www.megafileupload.com/en/file/24...e-zip.html

#Note the download option is not working at the moment.
#My code is too ugly.I'm just learning
#Only up to 50 results can be returned per query.(You tube restriction)
# Video Information Comments and related video not being implemented
find quote
hani Offline
Junior Member
Posts: 35
Joined: May 2007
Reputation: 0
Post: #2
Sorry for the Images. I did not realize their size.I guess should preview my posting before I hit the submit button.
find quote
Rand Al Thor Offline
Collect3 Project Manager
Posts: 916
Joined: Jul 2005
Post: #3
Cool, I'll Give it a shot and let you know how it goes. Cheers!
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 347
Joined: Jul 2007
Reputation: 4
Location: Bremen, Germany
Post: #4
I like the plugin and it's very useful. However, IMHO the "Search" functionality should ask the user for a search term, this should not be done in the plugin settings dialog (Look at the stage6 plugin for a way to do this). Also the plugin has lots of errors if you don't touch the configuration dialog and just browse through it. The default values don't seem to work. The only thing that works then is the search functionality. The others give a lot of python errors in the scripts info screen. Please delete the plugin configuration settings file to reproduce these problems, so the plugin falls back to the default values stored in the plugin settings description file. Also on my xbox, the thumbnails are not displayed. I'm really looking forward to see this working. I'd like to put this into the plugin package once it's ready!
find quote
hani Offline
Junior Member
Posts: 35
Joined: May 2007
Reputation: 0
Post: #5
just a quick for to fix the configuration issue
http://www.megafileupload.com/en/file/24...e-zip.html
find quote
C-Quel Offline
Retired Team-XBMC Member
Posts: 1,375
Joined: Aug 2004
Reputation: 0
Post: #6
Not tested yet but thanks for the contribution Wink

Zotac ID89 + 4GB + 160GB Intel SSD + Samsung UE40D7000 + DS411+II / 2 x 3TB WD RED CAVIAR (TVHeadend Package + 4 Tuners) + Fibaro HC2 Home Automation Intergration!

^^^

Fucking awesome springs to mind :)

iNerd Store

iNerd Forum
find quote
hani Offline
Junior Member
Posts: 35
Joined: May 2007
Reputation: 0
Post: #7
New update
fixed the problem with settings
fixed the issue with thumbnails( maybe!)
added the search dialog to the search item in the main menu(too slow to load)
Download is working (can not play the video until the download finish)

Please let me know what do you think about this version.

http://www.megafileupload.com/en/file/24...e-zip.html

By the way how I can enable edit post in this forum do I need special account.Frown
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 347
Joined: Jul 2007
Reputation: 4
Location: Bremen, Germany
Post: #8
Good work! Works much better now! Something is still wrong with the "download" setting though, because on my box, it tried to download a video when it was set to not do that.
hani Wrote:fixed the issue with thumbnails( maybe!)
No, the thumbnails are still not working. I get a lot of complaints in the log about failed downloads of image files. You can set the thumb to the http image URL, then XBMC automagically downloads them!

hani Wrote:By the way how I can enable edit post in this forum do I need special account.Frown
I think admins give the right to you if you contributed enough.
find quote
shizzle Offline
Senior Member
Posts: 196
Joined: Apr 2007
Reputation: 0
Location: sweden
Post: #9
any way to get this working on xbox??
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 347
Joined: Jul 2007
Reputation: 4
Location: Bremen, Germany
Post: #10
I got thumbnails to work with the following changes in videos.py:
Code:
def get_list( self,movieList ):
        try:
        ok = True
        thumbnailDownloadList = []
        path = os.path.join(os.getcwd()[:-1] , "user_data" )                
       #very ugly  
       #download thumbnail first     
        for movie in movieList:    
        thumb_url = self.get_largest_thumbnail(movie)
        #id = movie.id.text.split("/")[-1]    
        #imgFileName = self.getFileThumbPath('%s.jpg'%(id))
        #dl = downloadURL(thumb_url, imgFileName)
        thumbnailDownloadList.append(thumb_url)
        #dl.start()
        #populate the list first
        i=0
        for movie in movieList:                
        #thumbnailDownloadList[i].join()
        i+=1        
        title = movie.title.text    
        id = movie.id.text.split("/")[-1]
        movie_url = movie.link[1].href
        imgFileName = thumbnailDownloadList[i]#self.getFileThumbPath('%s.jpg'%(id))
        ok = self.addLink(title,movie_url,imgFileName,movieList)    
        if ( not ok ): raise    
        except:
              print "Error"
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 347
Joined: Jul 2007
Reputation: 4
Location: Bremen, Germany
Post: #11
And this is how I changed the playMovie method, don't know if this works, but it doesn't have the always download bug
Code:
def playMovie(self, fileUrl ):
    download  = xbmcplugin.getSetting("download")=="true"
        print download
    status = (_(2031),_(2030))[download]
    self.pDialog.create( "YouTube", status)
    #thumbnailImage= self._get_thumbnail(fileUrl)
    listitem = xbmcgui.ListItem("Movie", "", "","" )
    flv_file = self.get_flv_video_url(fileUrl)    
        flv_url=None
    if(download):
        flv_url = self.downloadMovie(flv_file)
            self.pDialog.close()    
                xbmc.Player().play( flv_url, listitem )
        else:
            self.pDialog.close()    
            if ( flv_file ):
                xbmc.Player().play( flv_file, listitem )
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 347
Joined: Jul 2007
Reputation: 4
Location: Bremen, Germany
Post: #12
shizzle Wrote:any way to get this working on xbox??

it is working on xbox. for thumbs and streaming, you need to apply my fixes tough.
find quote
shizzle Offline
Senior Member
Posts: 196
Joined: Apr 2007
Reputation: 0
Location: sweden
Post: #13
okay thanks
find quote
shizzle Offline
Senior Member
Posts: 196
Joined: Apr 2007
Reputation: 0
Location: sweden
Post: #14
Unbehagen Wrote:I got thumbnails to work with the following changes in videos.py:
Code:
def get_list( self,movieList ):
        try:
        ok = True
        thumbnailDownloadList = []
        path = os.path.join(os.getcwd()[:-1] , "user_data" )                
       #very ugly  
       #download thumbnail first     
        for movie in movieList:    
        thumb_url = self.get_largest_thumbnail(movie)
        #id = movie.id.text.split("/")[-1]    
        #imgFileName = self.getFileThumbPath('%s.jpg'%(id))
        #dl = downloadURL(thumb_url, imgFileName)
        thumbnailDownloadList.append(thumb_url)
        #dl.start()
        #populate the list first
        i=0
        for movie in movieList:                
        #thumbnailDownloadList[i].join()
        i+=1        
        title = movie.title.text    
        id = movie.id.text.split("/")[-1]
        movie_url = movie.link[1].href
        imgFileName = thumbnailDownloadList[i]#self.getFileThumbPath('%s.jpg'%(id))
        ok = self.addLink(title,movie_url,imgFileName,movieList)    
        if ( not ok ): raise    
        except:
              print "Error"

where do i add that??
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 347
Joined: Jul 2007
Reputation: 4
Location: Bremen, Germany
Post: #15
shizzle Wrote:where do i add that??

find the videos.py file and replace the get_list function with the one i supplied. but a lot easier for you would probably be to wait a few days before a truely working version is released.
find quote
Post Reply