Let default state of automark be pending, not None.
This commit is contained in:
		
							parent
							
								
									af494e2684
								
							
						
					
					
						commit
						34f24d9940
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		|  | @ -21,7 +21,7 @@ class Channel(Base): | |||
|         self.id = db_row['id'] | ||||
|         self.name = db_row['name'] | ||||
|         self.directory = db_row['directory'] | ||||
|         self.automark = db_row['automark'] | ||||
|         self.automark = db_row['automark'] or "pending" | ||||
| 
 | ||||
|     def has_pending(self): | ||||
|         query = 'SELECT 1 FROM videos WHERE author_id == ? AND download == "pending" LIMIT 1' | ||||
|  | @ -37,7 +37,7 @@ class Channel(Base): | |||
|             status = self.ycdldb.insert_video(video, commit=False) | ||||
| 
 | ||||
|             video = status['video'] | ||||
|             if status['new'] and self.automark is not None: | ||||
|             if status['new'] and self.automark not in [None, "pending"]: | ||||
|                 video.mark_state(self.automark, commit=False) | ||||
|                 if self.automark == 'downloaded': | ||||
|                     self.ycdldb.download_video(video.id, commit=False) | ||||
|  |  | |||
|  | @ -131,7 +131,7 @@ class YCDLDBChannelMixin: | |||
|             'id': channel_id, | ||||
|             'name': name, | ||||
|             'directory': download_directory, | ||||
|             'automark': None, | ||||
|             'automark': "pending", | ||||
|         } | ||||
|         self.sql_insert(table='channels', data=data) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue