未验证 提交 0ab839d6 编写于 作者: O openharmony_ci 提交者: Gitee

!4829 增加medialibrary文件、音频资源查询条件

Merge pull request !4829 from 秦莉文/OpenHarmony-3.1-Release
......@@ -23,8 +23,8 @@ const imageType = mediaLibrary.MediaType.IMAGE;
const videoType = mediaLibrary.MediaType.VIDEO;
const audioType = mediaLibrary.MediaType.AUDIO;
const fileFetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs: [fileType.toString()],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs: [fileType.toString(), 'Documents/'],
};
const imageFetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
......@@ -35,8 +35,8 @@ const videoFetchOp = {
selectionArgs: [videoType.toString()],
};
const audioFetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs: [audioType.toString()],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs: [audioType.toString(), 'Camera'],
};
describe('favoriteTestCallBack.test.js', function () {
......
......@@ -23,8 +23,8 @@ const imageType = mediaLibrary.MediaType.IMAGE;
const videoType = mediaLibrary.MediaType.VIDEO;
const audioType = mediaLibrary.MediaType.AUDIO;
const fileFetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs: [fileType.toString()],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs: [fileType.toString(), 'Documents/'],
};
const imageFetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
......@@ -35,8 +35,8 @@ const videoFetchOp = {
selectionArgs: [videoType.toString()],
};
const audioFetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs: [audioType.toString()],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs: [audioType.toString(), 'Camera'],
};
describe('favoriteTestPromise.test.js', function () {
......
......@@ -466,11 +466,11 @@ describe('fetchFileResultCallback.test.js', async function() {
if (firstObject.uri == undefined) {
console.info('MediaLibraryTest :firstObject.uri === undefined');
}
expect(firstObject.mimeType == 'image/*').assertTrue();
if (firstObject.mimeType != 'image/*') {
console.info('MediaLibraryTest :firstObject.mimeType:' + firstObject.mimeType);
}
expect(firstObject.mimeType.startsWith('image/')).assertTrue();
if (!firstObject.mimeType.startsWith('image/')) {
console.info('Test MediaLibraryTest :firstObject.mimeType:' + firstObject.mimeType);
}
expect(firstObject.mediaType == imageType).assertTrue();
if (firstObject.mediaType != imageType) {
......@@ -571,4 +571,4 @@ describe('fetchFileResultCallback.test.js', async function() {
done();
}
});
});
\ No newline at end of file
});
......@@ -578,11 +578,11 @@ describe('fetchFileResultPromise.test.js', async function() {
if (firstObject.uri == undefined) {
console.info('MediaLibraryTest :firstObject.uri === undefined');
}
expect(firstObject.mimeType == 'image/*').assertTrue();
if (firstObject.mimeType != 'image/*') {
console.info('MediaLibraryTest :firstObject.mimeType:' + firstObject.mimeType);
}
expect(firstObject.mimeType.startsWith('image/')).assertTrue();
if (!firstObject.mimeType.startsWith('image/')) {
console.info('Test MediaLibraryTest :firstObject.mimeType:' + firstObject.mimeType);
}
expect(firstObject.mediaType == imageType).assertTrue();
if (firstObject.mediaType != imageType) {
......@@ -681,4 +681,4 @@ describe('fetchFileResultPromise.test.js', async function() {
done();
}
});
});
\ No newline at end of file
});
......@@ -40,6 +40,9 @@ function checkAttrs(done, asset, tNum) {
done();
}
}
function sleep(time){
for (let t = Date.now(); Date.now() - t <= time;);
}
describe('fileAsset2.test.js', async function () {
let fileKeyObj = mediaLibrary.FileKey;
......@@ -83,7 +86,7 @@ describe('fileAsset2.test.js', async function () {
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
const newName = 'newName';
const newName = 'newName' + new Date().getTime() + '.jpg';
asset.displayName = newName;
const id = asset.id;
await asset.commitModify();
......@@ -200,14 +203,14 @@ describe('fileAsset2.test.js', async function () {
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
let neworientation = 1;
if (asset.orientation == 1) {
let neworientation = 90;
if (asset.orientation == 90) {
neworientation = 0;
}
asset.orientation = neworientation;
const id = asset.id;
await asset.commitModify();
sleep(1000);
const fetchFileResult2 = await media.getFileAssets(imagesfetchOp);
const dataList = await fetchFileResult2.getAllObject();
let passed = false;
......
......@@ -40,6 +40,9 @@ function checkAttrs(done, asset, tNum) {
done();
}
}
function sleep(time){
for (let t = Date.now(); Date.now() - t <= time;);
}
describe('fileAssetCallBack2.test.js', async function () {
let fileKeyObj = mediaLibrary.FileKey;
......@@ -83,7 +86,7 @@ describe('fileAssetCallBack2.test.js', async function () {
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
const newName = 'newName';
const newName = 'newName' + new Date().getTime() + '.jpg';
asset.displayName = newName;
const id = asset.id;
asset.commitModify(async () => {
......@@ -202,13 +205,14 @@ describe('fileAssetCallBack2.test.js', async function () {
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
let neworientation = 1;
if (asset.orientation == 1) {
let neworientation = 90;
if (asset.orientation == 90) {
neworientation = 0;
}
asset.orientation = neworientation;
const id = asset.id;
asset.commitModify(async () => {
sleep(1000);
const fetchFileResult2 = await media.getFileAssets(imagesfetchOp);
const dataList = await fetchFileResult2.getAllObject();
let passed = false;
......
......@@ -40,6 +40,9 @@ function checkAttrs(done, asset, tNum) {
done();
}
}
function sleep(time){
for (let t = Date.now(); Date.now() - t <= time;);
}
describe('fileAssetPromise2.test.js', async function () {
let fileKeyObj = mediaLibrary.FileKey;
......@@ -83,7 +86,7 @@ describe('fileAssetPromise2.test.js', async function () {
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
const newName = 'newName';
const newName = 'newName' + new Date().getTime() + '.jpg';
asset.displayName = newName;
const id = asset.id;
await asset.commitModify();
......@@ -200,14 +203,14 @@ describe('fileAssetPromise2.test.js', async function () {
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
let neworientation = 1;
if (asset.orientation == 1) {
let neworientation = 90;
if (asset.orientation == 90) {
neworientation = 0;
}
asset.orientation = neworientation;
const id = asset.id;
await asset.commitModify();
sleep(1000);
const fetchFileResult2 = await media.getFileAssets(imagesfetchOp);
const dataList = await fetchFileResult2.getAllObject();
let passed = false;
......
......@@ -42,8 +42,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try {
let fileType = mediaLibrary.MediaType.FILE;
let fileFetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ fileType.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ fileType.toString(), 'Documents/'],
};
let fetchFileResult = await media.getFileAssets(fileFetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -109,8 +109,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try {
let type = mediaLibrary.MediaType.FILE;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ type.toString(), 'Documents/'],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -173,8 +173,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try {
let type = mediaLibrary.MediaType.FILE;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ type.toString(), 'Documents/'],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -438,8 +438,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try {
let fileType = mediaLibrary.MediaType.AUDIO;
let fileFetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ fileType.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs : [ fileType.toString(), 'Camera'],
};
let fetchFileResult = await media.getFileAssets(fileFetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -499,8 +499,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try {
let type = mediaLibrary.MediaType.AUDIO;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs : [ type.toString(), 'Camera'],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -566,8 +566,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try {
let type = mediaLibrary.MediaType.AUDIO;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs : [ type.toString(), 'Camera'],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -845,8 +845,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try {
let type = mediaLibrary.MediaType.FILE;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ type.toString(), 'Documents/'],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -941,8 +941,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try {
let type = mediaLibrary.MediaType.AUDIO;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs : [ type.toString(), 'Camera'],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......
......@@ -42,8 +42,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try {
let fileType = mediaLibrary.MediaType.FILE;
let fileFetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ fileType.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ fileType.toString(), 'Documents/'],
};
let fetchFileResult = await media.getFileAssets(fileFetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -95,8 +95,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try {
let type = mediaLibrary.MediaType.FILE;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ type.toString(), 'Documents/'],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -136,8 +136,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try {
let type = mediaLibrary.MediaType.FILE;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ type.toString(), 'Documents/'],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -183,7 +183,7 @@ describe('fileAssetTestPromise.test.js', async function() {
let fileType = mediaLibrary.MediaType.IMAGE;
let fileFetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ fileType.toString() ],
selectionArgs : [ fileType.toString()],
};
let fetchFileResult = await media.getFileAssets(fileFetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -320,8 +320,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try {
let fileType = mediaLibrary.MediaType.AUDIO;
let fileFetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ fileType.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs : [ fileType.toString(), 'Camera'],
};
let fetchFileResult = await media.getFileAssets(fileFetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -371,8 +371,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try {
let type = mediaLibrary.MediaType.AUDIO;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs : [ type.toString(), 'Camera'],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -412,8 +412,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try {
let type = mediaLibrary.MediaType.AUDIO;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs : [ type.toString(), 'Camera'],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -459,7 +459,7 @@ describe('fileAssetTestPromise.test.js', async function() {
let fileType = mediaLibrary.MediaType.VIDEO;
let fileFetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ fileType.toString() ],
selectionArgs : [ fileType.toString()],
};
let fetchFileResult = await media.getFileAssets(fileFetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -610,8 +610,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try {
let type = mediaLibrary.MediaType.FILE;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ type.toString(), 'Documents/'],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -698,8 +698,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try {
let type = mediaLibrary.MediaType.AUDIO;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs : [ type.toString(), 'Camera'],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......
......@@ -51,12 +51,12 @@ describe('fileAssetUriTestCallback.test.js', async function() {
const uri = firstObject.uri;
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 uri:'
+ uri);
const serachUri = 'dataability:///media/image/' + id;
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 serachUri:'
+ serachUri);
const searchUri = uri.substr(0, uri.lastIndexOf('/') + 1) + id;
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 searchUri:'
+ searchUri);
let serchfetchOp = {
uri:serachUri.toString(),
uri:searchUri.toString(),
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString()],
};
......@@ -64,11 +64,11 @@ describe('fileAssetUriTestCallback.test.js', async function() {
const result = await media.getFileAssets(serchfetchOp);
console.info(
'MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 getFileAssets by uri:'
+ serachUri + ",result.getCount():" + result.getCount());
+ searchUri + ",result.getCount():" + result.getCount());
asset = await result.getFirstObject();
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 asset.uri:'
+ asset.uri);
expect(asset.uri == serachUri).assertTrue();
expect(asset.uri == searchUri).assertTrue();
fd = await asset.open('r');
expect(fd > 0).assertTrue();
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 fd:' + fd);
......
......@@ -50,12 +50,12 @@ describe('fileAssetUriTestPromise.test.js', async function() {
const id = firstObject.id;
const uri = firstObject.uri;
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 uri:' + uri);
const serachUri = 'dataability:///media/image/' + id;
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 serachUri:'
+ serachUri);
const searchUri = uri.substr(0, uri.lastIndexOf('/') + 1) + id;
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 searchUri:'
+ searchUri);
let serchfetchOp = {
uri : serachUri.toString(),
uri : searchUri.toString(),
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs : [ type.toString() ],
};
......@@ -63,11 +63,11 @@ describe('fileAssetUriTestPromise.test.js', async function() {
const result = await media.getFileAssets(serchfetchOp);
console.info(
'MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 getFileAssets by uri:'
+ serachUri + ",result.getCount():" + result.getCount());
+ searchUri + ",result.getCount():" + result.getCount());
asset = await result.getFirstObject();
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 asset.uri:'
+ asset.uri);
expect(asset.uri == serachUri).assertTrue();
expect(asset.uri == searchUri).assertTrue();
fd = await asset.open('r');
expect(fd > 0).assertTrue();
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 fd:' + fd);
......
......@@ -33,12 +33,12 @@ let videosfetchOp = {
selectionArgs: [videoType.toString()],
};
let audiosfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs: [audioType.toString()],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs: [audioType.toString(), 'Camera'],
};
let filesfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs: [fileType.toString()],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs: [fileType.toString(), 'Documents/'],
};
function checkAssetAttr(done, attr, testNum, asset, checkType) {
......
......@@ -33,12 +33,12 @@ let videosfetchOp = {
selectionArgs: [videoType.toString()],
};
let audiosfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs: [audioType.toString()],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs: [audioType.toString(), 'Camera'],
};
let filesfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs: [fileType.toString()],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs: [fileType.toString(), 'Documents/'],
};
function checkAssetAttr(done, attr, testNum, asset, checkType) {
......
......@@ -44,12 +44,12 @@ let videosfetchOp = {
selectionArgs: [videoType.toString()],
};
let audiosfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs: [audioType.toString()],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs: [audioType.toString(), 'Camera'],
};
let filesfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs: [fileType.toString()],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs: [fileType.toString(), 'Documents/'],
};
let imageAndVideofetchOp = {
......
......@@ -44,12 +44,12 @@ let videosfetchOp = {
selectionArgs: [videoType.toString()],
};
let audiosfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs: [audioType.toString()],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
selectionArgs: [audioType.toString(), 'Camera'],
};
let filesfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ?',
selectionArgs: [fileType.toString()],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs: [fileType.toString(), 'Documents/'],
};
let imageAndVideofetchOp = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册