Do not check for self._downloader being None in several places
This commit is contained in:
		
							parent
							
								
									73f4e7afba
								
							
						
					
					
						commit
						9bf7fa5213
					
				
					 1 changed files with 6 additions and 12 deletions
				
			
		
							
								
								
									
										18
									
								
								youtube-dl
									
										
									
									
									
								
							
							
						
						
									
										18
									
								
								youtube-dl
									
										
									
									
									
								
							| 
						 | 
					@ -1043,8 +1043,7 @@ class MetacafeIE(InfoExtractor):
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		# At this point we have a new video
 | 
							# At this point we have a new video
 | 
				
			||||||
		if self._downloader is not None:
 | 
							self._downloader.increment_downloads()
 | 
				
			||||||
			self._downloader.increment_downloads()
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		simple_title = mobj.group(2).decode('utf-8')
 | 
							simple_title = mobj.group(2).decode('utf-8')
 | 
				
			||||||
		video_extension = 'flv'
 | 
							video_extension = 'flv'
 | 
				
			||||||
| 
						 | 
					@ -1136,8 +1135,7 @@ class DailymotionIE(InfoExtractor):
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		# At this point we have a new video
 | 
							# At this point we have a new video
 | 
				
			||||||
		if self._downloader is not None:
 | 
							self._downloader.increment_downloads()
 | 
				
			||||||
			self._downloader.increment_downloads()
 | 
					 | 
				
			||||||
		video_id = mobj.group(1)
 | 
							video_id = mobj.group(1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		simple_title = mobj.group(2).decode('utf-8')
 | 
							simple_title = mobj.group(2).decode('utf-8')
 | 
				
			||||||
| 
						 | 
					@ -1224,8 +1222,7 @@ class GoogleIE(InfoExtractor):
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		# At this point we have a new video
 | 
							# At this point we have a new video
 | 
				
			||||||
		if self._downloader is not None:
 | 
							self._downloader.increment_downloads()
 | 
				
			||||||
			self._downloader.increment_downloads()
 | 
					 | 
				
			||||||
		video_id = mobj.group(1)
 | 
							video_id = mobj.group(1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		video_extension = 'mp4'
 | 
							video_extension = 'mp4'
 | 
				
			||||||
| 
						 | 
					@ -1335,8 +1332,7 @@ class PhotobucketIE(InfoExtractor):
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		# At this point we have a new video
 | 
							# At this point we have a new video
 | 
				
			||||||
		if self._downloader is not None:
 | 
							self._downloader.increment_downloads()
 | 
				
			||||||
			self._downloader.increment_downloads()
 | 
					 | 
				
			||||||
		video_id = mobj.group(1)
 | 
							video_id = mobj.group(1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		video_extension = 'flv'
 | 
							video_extension = 'flv'
 | 
				
			||||||
| 
						 | 
					@ -1420,8 +1416,7 @@ class YahooIE(InfoExtractor):
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		# At this point we have a new video
 | 
							# At this point we have a new video
 | 
				
			||||||
		if self._downloader is not None and new_video:
 | 
							self._downloader.increment_downloads()
 | 
				
			||||||
			self._downloader.increment_downloads()
 | 
					 | 
				
			||||||
		video_id = mobj.group(2)
 | 
							video_id = mobj.group(2)
 | 
				
			||||||
		video_extension = 'flv'
 | 
							video_extension = 'flv'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1568,8 +1563,7 @@ class GenericIE(InfoExtractor):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def _real_extract(self, url):
 | 
						def _real_extract(self, url):
 | 
				
			||||||
		# At this point we have a new video
 | 
							# At this point we have a new video
 | 
				
			||||||
		if self._downloader is not None:
 | 
							self._downloader.increment_downloads()
 | 
				
			||||||
			self._downloader.increment_downloads()
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		video_id = url.split('/')[-1]
 | 
							video_id = url.split('/')[-1]
 | 
				
			||||||
		request = urllib2.Request(url)
 | 
							request = urllib2.Request(url)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue