@christianriedl/media 1.0.148 → 1.0.149
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/iMedia.d.ts +50 -50
- package/dist/locationHelper.js +133 -133
- package/dist/mediaHelper.js +5 -5
- package/dist/mediaService.js +199 -199
- package/dist/mediaServiceBin.js +164 -164
- package/package.json +1 -1
- package/src/components/PhotoDownload.vue +3 -3
- package/src/views/MusicPage.vue +35 -35
- package/src/views/OnlineRadiosPage.vue +13 -13
- package/src/views/OnlineTVsPage.vue +16 -16
- package/src/views/PhotoAlbumPage.vue +27 -27
- package/src/views/PhotosGridPage.vue +24 -24
- package/src/views/PhotosPage.vue +27 -27
- package/src/views/RecordedVideosPage.vue +15 -15
- package/src/views/ThumbnailsPage.vue +10 -10
- package/src/views/VideosPage.vue +35 -35
package/dist/iMedia.d.ts
CHANGED
|
@@ -96,38 +96,38 @@ export declare enum EState {
|
|
|
96
96
|
MarkedForDownload = 128
|
|
97
97
|
}
|
|
98
98
|
export interface IMediaItem {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
99
|
+
itemType: EItemType;
|
|
100
|
+
state: EState;
|
|
101
|
+
rating: number;
|
|
102
|
+
genreIdx: number;
|
|
103
|
+
creatorIdx: number;
|
|
104
|
+
name: string;
|
|
105
|
+
description: string;
|
|
106
|
+
dlnaid: string;
|
|
107
|
+
dlnaParentId: string;
|
|
108
|
+
year: number;
|
|
109
|
+
date: Date;
|
|
110
|
+
url: string;
|
|
111
|
+
thumbnailUrl: string;
|
|
112
112
|
title?: string;
|
|
113
113
|
subTitle?: string;
|
|
114
114
|
info?: string;
|
|
115
115
|
}
|
|
116
116
|
export interface IMediaListEntry {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
name: string;
|
|
118
|
+
values: string[];
|
|
119
|
+
parents?: number[];
|
|
120
|
+
children?: number[][];
|
|
121
121
|
}
|
|
122
122
|
export interface IMediaLists {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
modificationTime: Date;
|
|
124
|
+
privateCreatorIdx: number;
|
|
125
|
+
lists: IMediaListEntry[];
|
|
126
126
|
}
|
|
127
127
|
export interface IMediaFolder extends IMediaItem {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
childCount: number;
|
|
129
|
+
folders: IMediaFolder[];
|
|
130
|
+
files: IMediaFile[];
|
|
131
131
|
prepared?: boolean;
|
|
132
132
|
subfolderPrepared?: boolean;
|
|
133
133
|
altColor?: boolean;
|
|
@@ -135,8 +135,8 @@ export interface IMediaFolder extends IMediaItem {
|
|
|
135
135
|
populated?: boolean;
|
|
136
136
|
}
|
|
137
137
|
export interface IMediaFile extends IMediaItem {
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
extension: number;
|
|
139
|
+
size: number;
|
|
140
140
|
}
|
|
141
141
|
export declare enum EOrientation {
|
|
142
142
|
None = 0,
|
|
@@ -161,37 +161,37 @@ export declare enum EPictureFlags {
|
|
|
161
161
|
Mask = 240
|
|
162
162
|
}
|
|
163
163
|
export interface IPictureFile extends IMediaFile {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
164
|
+
eventIdx: number;
|
|
165
|
+
locationIdx: number;
|
|
166
|
+
personIdxs: number[];
|
|
167
|
+
height: number;
|
|
168
|
+
width: number;
|
|
169
|
+
orientation: EOrientation;
|
|
170
|
+
flags: EPictureFlags;
|
|
171
|
+
thumbHeight: number;
|
|
172
|
+
thumbWidth: number;
|
|
173
173
|
selected?: boolean;
|
|
174
174
|
blob?: string;
|
|
175
175
|
}
|
|
176
176
|
export interface IAudioFile extends IMediaFile {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
177
|
+
bitRate: number;
|
|
178
|
+
duration: number;
|
|
179
|
+
extension: number;
|
|
180
|
+
sampleRate: number;
|
|
181
|
+
size: number;
|
|
182
|
+
trackNo: number;
|
|
183
183
|
}
|
|
184
184
|
export interface IVideoFile extends IMediaFile {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
185
|
+
actorIdxs: number[];
|
|
186
|
+
bitRate: number;
|
|
187
|
+
frameRate: number;
|
|
188
|
+
countryIdx: number;
|
|
189
|
+
duration: number;
|
|
190
|
+
extension: number;
|
|
191
|
+
size: number;
|
|
192
|
+
height: number;
|
|
193
|
+
width: number;
|
|
194
|
+
audioStreams: string;
|
|
195
195
|
}
|
|
196
196
|
export interface IAudioInfo {
|
|
197
197
|
codec: string;
|
package/dist/locationHelper.js
CHANGED
|
@@ -8,15 +8,15 @@ export class LocationHelper {
|
|
|
8
8
|
}
|
|
9
9
|
static addLocationParents(mediaService, list, rating, ratingMap) {
|
|
10
10
|
const parentFolder = mediaService.getFolder(`ph.${rating}.lo`);
|
|
11
|
-
parentFolder.
|
|
12
|
-
for (let i = 0; i < list.
|
|
13
|
-
if (list.
|
|
14
|
-
LocationHelper.addLocationParent(mediaService, parentFolder, i, list.
|
|
11
|
+
parentFolder.folders.length = 0;
|
|
12
|
+
for (let i = 0; i < list.parents.length; i++) {
|
|
13
|
+
if (list.parents[i] < 0)
|
|
14
|
+
LocationHelper.addLocationParent(mediaService, parentFolder, i, list.values[i], list.children[i], rating, ratingMap);
|
|
15
15
|
}
|
|
16
|
-
parentFolder.
|
|
17
|
-
for (let i = 0; i < parentFolder.
|
|
16
|
+
parentFolder.folders.sort((x1, x2) => x1.name.localeCompare(x2.name));
|
|
17
|
+
for (let i = 0; i < parentFolder.folders.length; i++) {
|
|
18
18
|
if ((i % 2) != 0)
|
|
19
|
-
parentFolder.
|
|
19
|
+
parentFolder.folders[i].altColor = true;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
static addLocationParent(mediaService, parentFolder, index, name, children, rating, ratingMap) {
|
|
@@ -26,58 +26,58 @@ export class LocationHelper {
|
|
|
26
26
|
if (!folder) {
|
|
27
27
|
folder =
|
|
28
28
|
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
29
|
+
creatorIdx: -1,
|
|
30
|
+
genreIdx: -1,
|
|
31
|
+
childCount: 0,
|
|
32
|
+
description: "",
|
|
33
|
+
files: null,
|
|
34
|
+
url: null,
|
|
35
|
+
thumbnailUrl: null,
|
|
36
|
+
year: 1970,
|
|
37
|
+
date: new Date(1970, 0, 1),
|
|
38
|
+
itemType: EItemType.PictureCategory,
|
|
39
|
+
dlnaParentId: `ph.${rating}.lo`,
|
|
40
|
+
dlnaid: folderId,
|
|
41
|
+
name: name,
|
|
42
|
+
rating: ratingMap,
|
|
43
|
+
folders: [],
|
|
44
|
+
state: EState.FolderVirtual
|
|
45
45
|
};
|
|
46
|
-
allFolders[folder.
|
|
46
|
+
allFolders[folder.dlnaid] = folder;
|
|
47
47
|
}
|
|
48
|
-
folder.info = folder.
|
|
49
|
-
folder.
|
|
48
|
+
folder.info = folder.name;
|
|
49
|
+
folder.creatorIdx = index; // !! used to store Location Index
|
|
50
50
|
if (children && children.length > 0)
|
|
51
51
|
folder.mustExpand = true;
|
|
52
|
-
parentFolder.
|
|
52
|
+
parentFolder.folders.push(folder);
|
|
53
53
|
}
|
|
54
54
|
static expandLocationFolder(mediaService, parentFolder, expandFolder) {
|
|
55
55
|
const altColor = expandFolder.altColor;
|
|
56
56
|
const pictureLocations = mediaService.pictureLocation;
|
|
57
|
-
const locationIdx = expandFolder.
|
|
57
|
+
const locationIdx = expandFolder.creatorIdx; // Used to store locationIdx !!
|
|
58
58
|
if (locationIdx >= 0) {
|
|
59
|
-
const children = pictureLocations.
|
|
59
|
+
const children = pictureLocations.children[locationIdx];
|
|
60
60
|
if (!children || !children.length)
|
|
61
61
|
return;
|
|
62
62
|
const expandedList = [];
|
|
63
63
|
const hasChildrenList = [];
|
|
64
64
|
for (let i = 0; i < children.length; i++) {
|
|
65
65
|
const childIdx = children[i];
|
|
66
|
-
var folder = mediaService.getFolder(`${expandFolder.
|
|
66
|
+
var folder = mediaService.getFolder(`${expandFolder.dlnaParentId}.${childIdx}|`);
|
|
67
67
|
if (folder) {
|
|
68
|
-
if (pictureLocations.
|
|
68
|
+
if (pictureLocations.children[childIdx] && pictureLocations.children[childIdx].length)
|
|
69
69
|
hasChildrenList.push(folder);
|
|
70
|
-
folder.
|
|
70
|
+
folder.creatorIdx = childIdx; // used to store location index !!
|
|
71
71
|
expandedList.push(folder);
|
|
72
|
-
expandFolder.
|
|
72
|
+
expandFolder.folders.push(folder);
|
|
73
73
|
folder.altColor = altColor;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
expandFolder.mustExpand = false;
|
|
77
|
-
expandFolder.
|
|
78
|
-
expandFolder.info = `${expandFolder.
|
|
79
|
-
const idx = parentFolder.
|
|
80
|
-
parentFolder.
|
|
77
|
+
expandFolder.childCount = expandFolder.folders.length;
|
|
78
|
+
expandFolder.info = `${expandFolder.name} (${expandFolder.childCount})`;
|
|
79
|
+
const idx = parentFolder.folders.indexOf(expandFolder);
|
|
80
|
+
parentFolder.folders.splice(idx + 1, 0, ...expandedList);
|
|
81
81
|
for (let i = 0; i < hasChildrenList.length; i++) {
|
|
82
82
|
LocationHelper.expandLocationFolder(mediaService, parentFolder, hasChildrenList[i]);
|
|
83
83
|
}
|
|
@@ -88,12 +88,12 @@ export class LocationHelper {
|
|
|
88
88
|
const childAlbums = {};
|
|
89
89
|
var childYears = new Set();
|
|
90
90
|
// Take direct subfolders
|
|
91
|
-
if (folder.
|
|
91
|
+
if (folder.folders) {
|
|
92
92
|
LocationHelper.collectAlbums(childAlbums, childYears, folder);
|
|
93
|
-
folder.
|
|
93
|
+
folder.folders.length = 0;
|
|
94
94
|
}
|
|
95
95
|
else
|
|
96
|
-
folder.
|
|
96
|
+
folder.folders = [];
|
|
97
97
|
if (Object.keys(childAlbums).length < maxAlbums) {
|
|
98
98
|
// Create Direct Album Children
|
|
99
99
|
const albumNames = Object.keys(childAlbums);
|
|
@@ -101,40 +101,40 @@ export class LocationHelper {
|
|
|
101
101
|
for (let i = 0; i < albumNames.length; i++) {
|
|
102
102
|
const albumName = albumNames[i];
|
|
103
103
|
const album = {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
104
|
+
creatorIdx: -1,
|
|
105
|
+
genreIdx: -1,
|
|
106
|
+
childCount: 0,
|
|
107
|
+
description: "",
|
|
108
|
+
folders: null,
|
|
109
|
+
url: "",
|
|
110
|
+
thumbnailUrl: null,
|
|
111
|
+
year: 1970,
|
|
112
|
+
date: new Date(1970, 0, 1),
|
|
113
|
+
itemType: EItemType.PictureAlbum,
|
|
114
|
+
dlnaParentId: folder.dlnaid,
|
|
115
|
+
dlnaid: `${folder.dlnaid}v${i}`,
|
|
116
|
+
name: albumName,
|
|
117
|
+
rating: 0,
|
|
118
|
+
files: [],
|
|
119
|
+
state: EState.FolderVirtual
|
|
120
120
|
};
|
|
121
121
|
var folders = childAlbums[albumName];
|
|
122
122
|
for (let j = 0; j < folders.length; j++) {
|
|
123
123
|
const subFolder = folders[j];
|
|
124
|
-
album.
|
|
125
|
-
album.
|
|
124
|
+
album.rating |= subFolder.rating;
|
|
125
|
+
album.files.splice(0, 0, ...subFolder.files);
|
|
126
126
|
}
|
|
127
|
-
album.
|
|
128
|
-
if (x1.
|
|
127
|
+
album.files.sort((x1, x2) => {
|
|
128
|
+
if (x1.date < x2.date)
|
|
129
129
|
return -1;
|
|
130
|
-
if (x1.
|
|
130
|
+
if (x1.date > x2.date)
|
|
131
131
|
return 1;
|
|
132
132
|
return 0;
|
|
133
133
|
});
|
|
134
|
-
album.
|
|
135
|
-
album.info = `${album.
|
|
136
|
-
allFolders[album.
|
|
137
|
-
folder.
|
|
134
|
+
album.childCount = album.files.length;
|
|
135
|
+
album.info = `${album.name} (${album.childCount})`;
|
|
136
|
+
allFolders[album.dlnaid] = album;
|
|
137
|
+
folder.folders.push(album);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
else {
|
|
@@ -145,18 +145,18 @@ export class LocationHelper {
|
|
|
145
145
|
const childAlbumGroup = childAlbums[key];
|
|
146
146
|
for (let i = 0; i < childAlbumGroup.length; i++) {
|
|
147
147
|
const childAlbum = childAlbumGroup[i];
|
|
148
|
-
let yearAlbums = yearDict[childAlbum.
|
|
148
|
+
let yearAlbums = yearDict[childAlbum.year];
|
|
149
149
|
if (yearAlbums) {
|
|
150
|
-
albums = yearAlbums[childAlbum.
|
|
150
|
+
albums = yearAlbums[childAlbum.name];
|
|
151
151
|
if (albums)
|
|
152
152
|
albums.push(childAlbum);
|
|
153
153
|
else
|
|
154
|
-
yearAlbums[childAlbum.
|
|
154
|
+
yearAlbums[childAlbum.name] = [childAlbum];
|
|
155
155
|
}
|
|
156
156
|
else {
|
|
157
157
|
yearAlbums = {};
|
|
158
|
-
yearAlbums[childAlbum.
|
|
159
|
-
yearDict[childAlbum.
|
|
158
|
+
yearAlbums[childAlbum.name] = [childAlbum];
|
|
159
|
+
yearDict[childAlbum.year] = yearAlbums;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
|
@@ -164,89 +164,89 @@ export class LocationHelper {
|
|
|
164
164
|
years.sort();
|
|
165
165
|
for (let i = 0; i < years.length; i++) {
|
|
166
166
|
var yearCategory = {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
167
|
+
creatorIdx: -1,
|
|
168
|
+
genreIdx: -1,
|
|
169
|
+
childCount: 0,
|
|
170
|
+
description: "",
|
|
171
|
+
url: null,
|
|
172
|
+
thumbnailUrl: null,
|
|
173
|
+
year: 1970,
|
|
174
|
+
date: new Date(1970, 0, 1),
|
|
175
|
+
files: null,
|
|
176
|
+
itemType: EItemType.PictureCategory,
|
|
177
|
+
dlnaParentId: folder.dlnaid,
|
|
178
|
+
dlnaid: `${folder.dlnaid}y${i}`,
|
|
179
|
+
name: years[i].toString(),
|
|
180
|
+
rating: 0,
|
|
181
|
+
folders: [],
|
|
182
|
+
state: EState.FolderVirtual
|
|
183
183
|
};
|
|
184
|
-
allFolders[yearCategory.
|
|
185
|
-
folder.
|
|
184
|
+
allFolders[yearCategory.dlnaid] = yearCategory;
|
|
185
|
+
folder.folders.push(yearCategory);
|
|
186
186
|
const yearAlbums = yearDict[years[i]];
|
|
187
187
|
let j = 0;
|
|
188
188
|
for (const yearAlbumKey in yearAlbums) {
|
|
189
189
|
var album = {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
190
|
+
creatorIdx: -1,
|
|
191
|
+
genreIdx: -1,
|
|
192
|
+
childCount: 0,
|
|
193
|
+
description: "",
|
|
194
|
+
folders: null,
|
|
195
|
+
url: "",
|
|
196
|
+
thumbnailUrl: null,
|
|
197
|
+
year: 1970,
|
|
198
|
+
date: new Date(1970, 0, 1),
|
|
199
|
+
itemType: EItemType.PictureAlbum,
|
|
200
|
+
dlnaParentId: yearCategory.dlnaid,
|
|
201
|
+
dlnaid: `${yearCategory.dlnaid}v${j}`,
|
|
202
|
+
name: yearAlbumKey,
|
|
203
|
+
rating: 0,
|
|
204
|
+
files: [],
|
|
205
|
+
state: EState.FolderVirtual
|
|
206
206
|
};
|
|
207
207
|
const subFolders = yearAlbums[yearAlbumKey];
|
|
208
208
|
for (let k = 0; k < subFolders.length; k++) {
|
|
209
209
|
const subFolder = subFolders[k];
|
|
210
|
-
album.
|
|
211
|
-
album.
|
|
210
|
+
album.rating |= subFolder.rating;
|
|
211
|
+
album.files.splice(0, 0, ...subFolder.files);
|
|
212
212
|
}
|
|
213
|
-
album.
|
|
214
|
-
if (x1.
|
|
213
|
+
album.files.sort((x1, x2) => {
|
|
214
|
+
if (x1.date < x2.date)
|
|
215
215
|
return -1;
|
|
216
|
-
if (x1.
|
|
216
|
+
if (x1.date > x2.date)
|
|
217
217
|
return 1;
|
|
218
218
|
return 0;
|
|
219
219
|
});
|
|
220
|
-
album.
|
|
221
|
-
album.info = `${album.
|
|
222
|
-
yearCategory.
|
|
223
|
-
allFolders[album.
|
|
224
|
-
yearCategory.
|
|
220
|
+
album.childCount = album.files.length;
|
|
221
|
+
album.info = `${album.name} (${album.childCount})`;
|
|
222
|
+
yearCategory.rating |= album.rating;
|
|
223
|
+
allFolders[album.dlnaid] = album;
|
|
224
|
+
yearCategory.folders.push(album);
|
|
225
225
|
j++;
|
|
226
226
|
}
|
|
227
|
-
yearCategory.
|
|
228
|
-
yearCategory.info = `${yearCategory.
|
|
227
|
+
yearCategory.childCount = yearCategory.folders.length;
|
|
228
|
+
yearCategory.info = `${yearCategory.name} (${yearCategory.childCount})`;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
folder.
|
|
232
|
-
folder.info = `${folder.
|
|
231
|
+
folder.childCount = folder.folders.length;
|
|
232
|
+
folder.info = `${folder.name} (${folder.childCount})`;
|
|
233
233
|
folder.mustExpand = false;
|
|
234
234
|
folder.populated = true;
|
|
235
235
|
return true;
|
|
236
236
|
}
|
|
237
237
|
static collectAlbums(albums, years, folder) {
|
|
238
|
-
for (let i = 0; i < folder.
|
|
239
|
-
const album = folder.
|
|
240
|
-
if (album.
|
|
238
|
+
for (let i = 0; i < folder.folders.length; i++) {
|
|
239
|
+
const album = folder.folders[i];
|
|
240
|
+
if (album.itemType == EItemType.PictureAlbum) {
|
|
241
241
|
LocationHelper.collectAlbum(albums, years, album);
|
|
242
242
|
}
|
|
243
|
-
else if (album.
|
|
244
|
-
for (let j = 0; j < album.
|
|
245
|
-
const subalbum = album.
|
|
246
|
-
if (subalbum.
|
|
243
|
+
else if (album.folders != null) {
|
|
244
|
+
for (let j = 0; j < album.folders.length; j++) {
|
|
245
|
+
const subalbum = album.folders[j];
|
|
246
|
+
if (subalbum.itemType == EItemType.PictureAlbum) {
|
|
247
247
|
LocationHelper.collectAlbum(albums, years, subalbum);
|
|
248
248
|
}
|
|
249
|
-
else if (subalbum.
|
|
249
|
+
else if (subalbum.itemType == EItemType.PictureCategory) {
|
|
250
250
|
LocationHelper.collectAlbums(albums, years, subalbum);
|
|
251
251
|
}
|
|
252
252
|
}
|
|
@@ -254,18 +254,18 @@ export class LocationHelper {
|
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
static collectAlbum(albums, years, album) {
|
|
257
|
-
const folders = albums[album.
|
|
257
|
+
const folders = albums[album.name];
|
|
258
258
|
if (folders)
|
|
259
259
|
folders.push(album);
|
|
260
260
|
else
|
|
261
|
-
albums[album.
|
|
262
|
-
years.add(album.
|
|
263
|
-
if (album.
|
|
261
|
+
albums[album.name] = [album];
|
|
262
|
+
years.add(album.year);
|
|
263
|
+
if (album.files) {
|
|
264
264
|
// This required because different albums are collected
|
|
265
|
-
for (let i = 0; i < album.
|
|
266
|
-
album.
|
|
265
|
+
for (let i = 0; i < album.files.length; i++) {
|
|
266
|
+
album.files[i].url = album.url + album.files[i].url;
|
|
267
267
|
}
|
|
268
|
-
album.
|
|
268
|
+
album.url = "";
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
}
|
package/dist/mediaHelper.js
CHANGED
|
@@ -61,14 +61,14 @@ export class MediaHelper {
|
|
|
61
61
|
}
|
|
62
62
|
static getPhotoDisplayName(folder, pictureFile, pictureLocations, album) {
|
|
63
63
|
let emptyName = "|";
|
|
64
|
-
const url = folder.
|
|
65
|
-
const name = pictureFile.
|
|
64
|
+
const url = folder.url + pictureFile.url;
|
|
65
|
+
const name = pictureFile.name;
|
|
66
66
|
if (!url.includes(name)) {
|
|
67
67
|
return name;
|
|
68
68
|
}
|
|
69
|
-
if (pictureFile.
|
|
70
|
-
let location = pictureLocations.
|
|
71
|
-
if (!album || !album.
|
|
69
|
+
if (pictureFile.locationIdx >= 0 && pictureLocations) {
|
|
70
|
+
let location = pictureLocations.values[pictureFile.locationIdx];
|
|
71
|
+
if (!album || !album.name.includes(location)) {
|
|
72
72
|
return location;
|
|
73
73
|
}
|
|
74
74
|
}
|