- increase search history to 30 entries and add the last search as first history entry and not reversed as it was before. This should be more intuitive. Thx Helge Böhme.
from urllib2 import Request, URLError, HTTPError, urlopen as urlopen2
from socket import gaierror,error
import re, os, sys, socket
from urllib2 import Request, URLError, HTTPError, urlopen as urlopen2
from socket import gaierror,error
import re, os, sys, socket
from urllib import quote, unquote_plus, unquote #FancyURLopener,
import cookielib
from httplib import HTTPConnection,CannotSendRequest,BadStatusLine,HTTPException
from urllib import quote, unquote_plus, unquote #FancyURLopener,
import cookielib
from httplib import HTTPConnection,CannotSendRequest,BadStatusLine,HTTPException
print "[MyTube] No valid mp4-url found"
return mrl
print "[MyTube] No valid mp4-url found"
return mrl
- if "isHDAvailable = true" in watchvideopage:
+ if "'IS_HD_AVAILABLE': true" in watchvideopage:
isHDAvailable = True
print "HD AVAILABLE"
else:
isHDAvailable = True
print "HD AVAILABLE"
else:
if self.History[0] == '':
del self.History[0]
print "self.History im add",self.History
if self.History[0] == '':
del self.History[0]
print "self.History im add",self.History
- if config.plugins.mytube.search.searchTerm.value not in self.History:
- self.History.append((config.plugins.mytube.search.searchTerm.value))
- self.History.reverse()
- if len(self.History) == 15:
+ if config.plugins.mytube.search.searchTerm.value in self.History:
+ self.History.remove((config.plugins.mytube.search.searchTerm.value))
+ self.History.insert(0,(config.plugins.mytube.search.searchTerm.value))
+ if len(self.History) == 30:
self.History.pop()
config.plugins.mytube.general.history.value = ",".join(self.History)
config.plugins.mytube.general.history.save()
self.History.pop()
config.plugins.mytube.general.history.value = ",".join(self.History)
config.plugins.mytube.general.history.save()