@christianriedl/media 1.0.150 → 1.0.151

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,14 +3,14 @@ import { ILogger, Dictionary, InjectionKey, IStatistics, IStatisticsValue } from
3
3
  import { IMediaItem, IMediaFolder, IMediaListEntry, IMediaService, IPhotoSelection, IPictureFile, IAudioFile, EMediaType, IMediaInfo } from "./iMedia";
4
4
  export declare const getMediaSymbol: InjectionKey<() => MediaService>;
5
5
  export interface IVirtualMediaFolder extends IMediaItem {
6
- ChildCount: number;
7
- Files: string[];
6
+ childCount: number;
7
+ files: string[];
8
8
  }
9
9
  export interface IRealFilesResult {
10
- Folder: IMediaFolder;
11
- PrivateCreatorIdx: number;
12
- Lists: IMediaListEntry[];
13
- Status: string;
10
+ folder: IMediaFolder;
11
+ privateCreatorIdx: number;
12
+ lists: IMediaListEntry[];
13
+ status: string;
14
14
  }
15
15
  export declare class MediaService implements IMediaService {
16
16
  rest: IRest;
@@ -263,13 +263,13 @@ export class MediaService {
263
263
  if (newFolder) {
264
264
  const refs = await this.browseReferences(folder.dlnaid);
265
265
  this.referenceDict.clear();
266
- for (var i = 0; i < refs.Files.length; i++) {
267
- this.referenceDict.add(refs.Files[i]);
266
+ for (var i = 0; i < refs.files.length; i++) {
267
+ this.referenceDict.add(refs.files[i]);
268
268
  }
269
269
  this.realFolderId = folder.dlnaid;
270
270
  var idx = this.realFolderId.indexOf('|');
271
271
  this.realFolderId = 'ph.all.ye' + this.realFolderId.substr(idx);
272
- this.log.trace(`getPhotos virtual ${refs.Files.length} ${this.realFolderId}`);
272
+ this.log.trace(`getPhotos virtual ${refs.files.length} ${this.realFolderId}`);
273
273
  }
274
274
  realPhotos = this.realPictureAlbums[this.realFolderId];
275
275
  if (!realPhotos) {
@@ -461,20 +461,20 @@ export class MediaService {
461
461
  const query = { dlnaid: dlnaid, realFolderPrefix: realFolderPrefix, listMediaType: listMediaType };
462
462
  const res = await this.rest.getData('apimedia/browserealfiles', query);
463
463
  const result = res.result;
464
- if (result.Folder)
465
- this.buildStatistics(result.Folder);
466
- if (listMediaType && result.Lists) {
467
- this.initializeLists(listMediaType, result.Lists, result.PrivateCreatorIdx);
464
+ if (result.folder)
465
+ this.buildStatistics(result.folder);
466
+ if (listMediaType && result.lists) {
467
+ this.initializeLists(listMediaType, result.lists, result.privateCreatorIdx);
468
468
  }
469
469
  return result;
470
470
  }
471
471
  async getPhotoService(id) {
472
472
  const res = await this.rest.getData('apimedia/photoservice', { id: id });
473
473
  const result = res.result;
474
- if (result.Folder)
475
- this.buildStatistics(result.Folder);
476
- if (result.Lists) {
477
- this.initializeLists(EMediaType.Picture, result.Lists, result.PrivateCreatorIdx);
474
+ if (result.folder)
475
+ this.buildStatistics(result.folder);
476
+ if (result.lists) {
477
+ this.initializeLists(EMediaType.Picture, result.lists, result.privateCreatorIdx);
478
478
  }
479
479
  return result;
480
480
  }
@@ -497,8 +497,8 @@ export class MediaService {
497
497
  async browseReferences(id) {
498
498
  const ref = await this.rest.getData('apimedia/browse', { id: id, depth: 1, onlyFolder: false, onlyReal: false });
499
499
  const folders = ref.result;
500
- if (folders.Files)
501
- this.statistics.increment(this.countReferences, folders.Files.length);
500
+ if (folders.files)
501
+ this.statistics.increment(this.countReferences, folders.files.length);
502
502
  return folders;
503
503
  }
504
504
  async getExifInfo(folderId, mediaId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianriedl/media",
3
- "version": "1.0.150",
3
+ "version": "1.0.151",
4
4
  "description": "RIC media interfaces",
5
5
 
6
6
  "main": "dist/index.js",