]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-search/find-in-bulk.service.ts
Update angular
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-search / find-in-bulk.service.ts
index d2f8c321369ea31a9a7b0960416ec8c8401b584f..125d5e2b868c5537509d7f63b9abb1dd5bbfb364 100644 (file)
@@ -40,7 +40,7 @@ export class FindInBulkService {
 
     return this.getData({
       observableObject: this.getVideoInBulk,
-      finder: v => v.uuid === uuid,
+      finder: v => v.uuid === uuid || v.shortUUID === uuid,
       param: uuid
     })
   }
@@ -80,13 +80,18 @@ export class FindInBulkService {
           map(result => result.response.data),
           map(data => data.find(finder))
         )
-        .subscribe(result => {
-          if (!result) {
-            obs.error(new Error($localize`Element ${param} not found`))
-          } else {
+        .subscribe({
+          next: result => {
+            if (!result) {
+              obs.error(new Error($localize`Element ${param} not found`))
+              return
+            }
+
             obs.next(result)
             obs.complete()
-          }
+          },
+
+          error: err => obs.error(err)
         })
 
       observableObject.notifier.next(param)