结果是我需要传入一个查询来限制从grabbag返回的结果。我在事件播放列表(grabbag)中的歌曲比与之相关的图片中的歌曲要多得多。
传递给grabBagGetAllForQuery的查询语法是什么?我基本上需要查看并查看grabbag中的特定WNTrack是否有反向引用。如果不是,那么它还没有关联到照片,不应该包含在返回的结果集中。
// FFDL SNIPPET
#
#
# WNPhoto
#
# event: reference back to EVENT object
# owner: reference back to FFUser
# trackTag: reference back to TRACK
# accessGroup: FFUserGroup
# location: reference back to VENUE object
# image: BYTEARRAY
# previewImage: BYTEARRAY
# thumbnailImage: BYTEARRAY
#
CREATE OBJECTTYPE WNPhoto (event REFERENCE /Events, owner REFERENCE /UserProfiles, trackTag REFERENCE /Tracks, accessGroup REFERENCE /FFUserGroup, image BYTEARRAY, previewImage BYTEARRAY, thumbnailImage BYTEARRAY)
#
# WNTrack
#
# title: "My Way"
# artist: reference to an object in /Artists
# duration: 297
# albumCover: BLOB
# album: "The Main Event - Live"
#
CREATE OBJECTTYPE WNTrack (title STRING, artist REFERENCE /Artists, duration NUMERIC, albumCover BYTEARRAY, album STRING)发布于 2013-01-15 01:54:31
所以-如果我理解正确的话,你想从抓包中排除任何与照片没有关联的项目??
使用: playlistForEvent = ff.grabBagGetAll(evnt.ffUrl,"playlist");
我想我会做的就是得到你现在的照片:
photosForEventsUri = "/ff/resources/Events/" + evnt.guid + "/photos";
photosForEvent = ff.getArrayFromUri(photosForEventsUri);然后循环遍历并创建一个引用的轨迹数组。
for (var i=0;i< photosForEvent.length;i++) {
var track = ff.getReferredObject("trackTag", photosForEvent[i]);
playlistForEvent.push(track);
}https://stackoverflow.com/questions/14311747
复制相似问题