@christianriedl/media 1.0.290 → 1.0.292
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.
- package/dist/mediaService.d.ts +90 -0
- package/dist/mediaService.js +714 -0
- package/dist/mediaService.js.map +1 -0
- package/dist/mediaServiceBin.d.ts +1 -0
- package/dist/mediaServiceBin.js +8 -2
- package/dist/mediaServiceBin.js.map +1 -1
- package/package.json +2 -2
- package/src/views/DocumentsPage.vue +107 -40
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { IRest, IRestResult } from '@christianriedl/rest';
|
|
2
|
+
import { ILogger, Dictionary, InjectionKey, IStatistics, IStatisticsValue } from '@christianriedl/utils';
|
|
3
|
+
import { IMediaItem, IMediaFolder, IMediaListEntry, IMediaService, IPhotoSelection, IPictureFile, IAudioFile, EMediaType, IMediaInfo, IDocumentInfo } from "./iMedia";
|
|
4
|
+
export declare const getMediaSymbol: InjectionKey<() => MediaService>;
|
|
5
|
+
export interface IVirtualMediaFolder extends IMediaItem {
|
|
6
|
+
childCount: number;
|
|
7
|
+
files: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface IRealFilesResult {
|
|
10
|
+
folder: IMediaFolder;
|
|
11
|
+
privateCreatorIdx: number;
|
|
12
|
+
lists: IMediaListEntry[];
|
|
13
|
+
status: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class MediaService implements IMediaService {
|
|
16
|
+
rest: IRest;
|
|
17
|
+
mediaUrl: string;
|
|
18
|
+
log: ILogger;
|
|
19
|
+
user: string;
|
|
20
|
+
mainRoot: IMediaFolder;
|
|
21
|
+
roots: Dictionary<IMediaFolder>;
|
|
22
|
+
folders: Dictionary<IMediaFolder>;
|
|
23
|
+
realPictureAlbums: Dictionary<IMediaFolder>;
|
|
24
|
+
medialists: Dictionary<IMediaListEntry>;
|
|
25
|
+
pictureLocation: IMediaListEntry;
|
|
26
|
+
listsInitialized: number;
|
|
27
|
+
lastFolderId: string;
|
|
28
|
+
realFolderId: string;
|
|
29
|
+
referenceDict: Set<string>;
|
|
30
|
+
privateIdx: number;
|
|
31
|
+
pictureParentLimit: number;
|
|
32
|
+
statistics: IStatistics;
|
|
33
|
+
countFolders: IStatisticsValue;
|
|
34
|
+
countFiles: IStatisticsValue;
|
|
35
|
+
countList: IStatisticsValue;
|
|
36
|
+
countReferences: IStatisticsValue;
|
|
37
|
+
photoSelection: IPhotoSelection;
|
|
38
|
+
constructor(rest: IRest, user: string, statistics: IStatistics, pictureParentLimit: number, log: ILogger);
|
|
39
|
+
prepareFolders(folder: IMediaFolder): boolean;
|
|
40
|
+
initialize(mediaType?: EMediaType): Promise<boolean>;
|
|
41
|
+
getFolder(id: string): IMediaFolder;
|
|
42
|
+
prepare(folder: IMediaFolder): void;
|
|
43
|
+
getRoot(mediaType: EMediaType): IMediaFolder | undefined;
|
|
44
|
+
getPhotosByCriteria(stars: string, criteria: string): Promise<IMediaFolder>;
|
|
45
|
+
initializeAudios(): Promise<IMediaFolder>;
|
|
46
|
+
initializeVideos(): Promise<IMediaFolder>;
|
|
47
|
+
getRecordedTVs(): Promise<IMediaFolder>;
|
|
48
|
+
getOnlineTVs(): Promise<IMediaFolder>;
|
|
49
|
+
getOnlineRadios(): Promise<IMediaFolder>;
|
|
50
|
+
getListEntry(name: string, idx: number): string;
|
|
51
|
+
getPhotos(folder: IMediaFolder): Promise<IMediaFolder>;
|
|
52
|
+
private processPhotos;
|
|
53
|
+
private removePrivate;
|
|
54
|
+
getAudios(folder: IMediaFolder): Promise<IMediaFolder>;
|
|
55
|
+
getVideos(folder: IMediaFolder): Promise<IMediaFolder>;
|
|
56
|
+
getPhotoTitles(): Promise<string[]>;
|
|
57
|
+
getPhotoUrl(folderUrl: string, url: string, format: string): string;
|
|
58
|
+
getPhotoDisplayName(folder: IMediaFolder, picture: IPictureFile, album?: IMediaFolder): string;
|
|
59
|
+
getAudioUrl(item: IAudioFile): string;
|
|
60
|
+
getVideoUrl(url: string): string;
|
|
61
|
+
getAlbumArtUrl(folderUrl: string): string;
|
|
62
|
+
getAlbumDownloadUrl(folderUrl: string, codec?: string, param?: string): string;
|
|
63
|
+
getPhotosDownloadUrl(folder: IMediaFolder, resy?: number, quality?: number, photoIds?: string[]): string;
|
|
64
|
+
browse(id: string, depth: number, onlyFolder: boolean, onlyReal: boolean, selectFolder?: string): Promise<IMediaFolder>;
|
|
65
|
+
browseRealFiles(dlnaid: string, listMediaType?: EMediaType, realFolderPrefix?: string): Promise<IRealFilesResult>;
|
|
66
|
+
getPhotoService(id: string): Promise<IRealFilesResult>;
|
|
67
|
+
addPhotoService(id: string, user: string, dlnaid: string, daysValid?: number, photoIds?: string[]): Promise<IRestResult<string>>;
|
|
68
|
+
private buildStatistics;
|
|
69
|
+
browseReferences(id: string): Promise<IVirtualMediaFolder>;
|
|
70
|
+
getExifInfo(folderId: string, mediaId: string): Promise<Dictionary<any>>;
|
|
71
|
+
getSatIpProbe(channelName: string, urlOrFileName: string): Promise<IMediaInfo>;
|
|
72
|
+
stopSatIpStream(channelName: string, media: string): Promise<boolean>;
|
|
73
|
+
ping(): Promise<boolean>;
|
|
74
|
+
getImage(url: string): Promise<Blob>;
|
|
75
|
+
getLists(mediaType: EMediaType): Promise<boolean>;
|
|
76
|
+
initializeLists(mediaType: EMediaType, entries: IMediaListEntry[], privateCreator: number): void;
|
|
77
|
+
upload(form: FormData): Promise<boolean>;
|
|
78
|
+
uploadBigFile(file: File, directory: string, progress: (pos: string) => void): Promise<boolean>;
|
|
79
|
+
getDirectories(path: string): Promise<string[]>;
|
|
80
|
+
getFiles(path: string): Promise<string[]>;
|
|
81
|
+
getDirectoriesFull(path: string): Promise<IDocumentInfo[]>;
|
|
82
|
+
getFilesFull(path: string): Promise<IDocumentInfo[]>;
|
|
83
|
+
speedTest(blockSize: number, numBlocks: number): Promise<IRestResult<string>>;
|
|
84
|
+
getCloudUrl(folder: string, name: string): Promise<string>;
|
|
85
|
+
getFileUrl(path: string): string;
|
|
86
|
+
get audioRoot(): IMediaFolder;
|
|
87
|
+
get videoRoot(): IMediaFolder;
|
|
88
|
+
get pictureRoot(): IMediaFolder;
|
|
89
|
+
get onlineRoot(): IMediaFolder;
|
|
90
|
+
}
|