mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Solving a bug with collections
This commit is contained in:
parent
994992c9aa
commit
e8510a55c0
@ -149,7 +149,6 @@ namespace Kyoo.Controllers
|
||||
if (!libraryManager.IsCollectionRegistered(Utility.ToSlug(collectionName), out long collectionID))
|
||||
{
|
||||
Collection collection = await metadataProvider.GetCollectionFromName(collectionName, library);
|
||||
collection.Name = collection.Name ?? collectionName;
|
||||
collectionID = libraryManager.RegisterCollection(collection);
|
||||
}
|
||||
libraryManager.AddShowToCollection(showID, collectionID);
|
||||
|
@ -53,7 +53,10 @@ namespace Kyoo.Controllers
|
||||
|
||||
public async Task<Collection> GetCollectionFromName(string name, Library library)
|
||||
{
|
||||
return await GetMetadata(provider => provider.GetCollectionFromName(name), library, $"the collection {name}");
|
||||
Collection collection = await GetMetadata(provider => provider.GetCollectionFromName(name), library, $"the collection {name}");
|
||||
collection.Name ??= name;
|
||||
collection.Slug ??= Utility.ToSlug(name);
|
||||
return collection;
|
||||
}
|
||||
|
||||
public async Task<Show> GetShowFromName(string showName, string showPath, Library library)
|
||||
|
Loading…
x
Reference in New Issue
Block a user