mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-10-30 18:22:41 -04:00 
			
		
		
		
	Finishing up the tasks
This commit is contained in:
		
							parent
							
								
									221b5afb8b
								
							
						
					
					
						commit
						a11c281bcb
					
				| @ -11,7 +11,7 @@ | ||||
| 		<Company>SDG</Company> | ||||
| 		<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression> | ||||
| 		<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> | ||||
| 		<PackageVersion>1.0.12</PackageVersion> | ||||
| 		<PackageVersion>1.0.13</PackageVersion> | ||||
| 	</PropertyGroup> | ||||
| 
 | ||||
| 	<ItemGroup> | ||||
|  | ||||
| @ -87,7 +87,7 @@ namespace Kyoo.Controllers | ||||
| 				} | ||||
| 				catch (Exception ex) | ||||
| 				{ | ||||
| 					Console.Error.WriteLine($"Error loading the plugin at {path}.\nException: {ex.Message}"); | ||||
| 					Console.Error.WriteLine($"Error loading the plugin at {path}.\nException: {ex.Message}\n\n"); | ||||
| 					return null; | ||||
| 				} | ||||
| 			}).Where(x => x != null).ToList(); | ||||
|  | ||||
| @ -36,8 +36,15 @@ namespace Kyoo.Controllers | ||||
| 				{ | ||||
| 					(ITask task, string arguments) = _queuedTasks.Dequeue(); | ||||
| 					_runningTask = task; | ||||
| 					try | ||||
| 					{ | ||||
| 						await task.Run(_serviceProvider, _taskToken.Token, arguments); | ||||
| 					} | ||||
| 					catch (Exception e) | ||||
| 					{ | ||||
| 						Console.Error.WriteLine($"An unhandled exception occured while running the task {task.Name}.\nInner exception: {e.Message}\n\n"); | ||||
| 					} | ||||
| 				} | ||||
| 				else | ||||
| 				{ | ||||
| 					await Task.Delay(10, cancellationToken); | ||||
| @ -106,6 +113,7 @@ namespace Kyoo.Controllers | ||||
| 			foreach (ITask task in prerunTasks) | ||||
| 				task.Run(_serviceProvider, _taskToken.Token); | ||||
| 			foreach (IPlugin plugin in _pluginManager.GetAllPlugins()) | ||||
| 				if (plugin.Tasks != null) | ||||
| 					_tasks.AddRange(plugin.Tasks.Select(x => (x, DateTime.Now + GetTaskDelay(x.Slug)))); | ||||
| 		} | ||||
| 
 | ||||
|  | ||||
| @ -26,5 +26,5 @@ | ||||
|   "profilePicturePath": "users/", | ||||
|   "plugins": "plugins/", | ||||
|   "defaultPermissions": "read,play", | ||||
|   "regex": "(\\/(?<Collection>.*)\\/)?.*\\/(?<ShowTitle>.+?)(( S(?<Season>\\d+)E(?<Episode>\\d+)| (?<Absolute>\\d+)))?\\.", | ||||
|   "regex": "(\\/(?<Collection>.*)\\/)?.*\\/(?<ShowTitle>.+?)(( S(?<Season>\\d+)E(?<Episode>\\d+)| (?<Absolute>\\d+)))?\\." | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user