本文整理汇总了Java中sagex.phoenix.vfs.IMediaResource.getMediaObject方法的典型用法代码示例。如果您正苦于以下问题:Java IMediaResource.getMediaObject方法的具体用法?Java IMediaResource.getMediaObject怎么用?Java IMediaResource.getMediaObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sagex.phoenix.vfs.IMediaResource
的用法示例。
在下文中一共展示了IMediaResource.getMediaObject方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: GetLastWatchedTimeStamp
import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
public static long GetLastWatchedTimeStamp(IMediaResource o) {
if (o instanceof IMediaFile) {
Object theairing = o.getMediaObject();
Object thisAiring = phoenix.media.GetMediaObject(theairing);
//LOG.debug("IMediaFile found - realwatched from thisAiring '" + AiringAPI.GetRealWatchedStartTime(thisAiring) + "' for S" + phoenix.metadata.GetSeasonNumber(thisAiring) + "E" + phoenix.metadata.GetEpisodeNumber(thisAiring));
return AiringAPI.GetRealWatchedStartTime(thisAiring);
}
if (o instanceof IMediaFolder) {
//LOG.debug("IMediaFolder found - searching");
return searchFolderForLastWatchedTimeStamp((IMediaFolder) o);
}
// If it's not a File or Folder just return a 0
//LOG.debug("Neither found - class is '" + o.getClass() + "'");
return 0;
}
示例2: canAccept
import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
public boolean canAccept(IMediaResource res) {
if (res instanceof IMediaFolder)
return true;
if (res instanceof IMediaFile) {
Object o = res.getMediaObject();
return (MediaFileAPI.IsDVD(o) && !MediaFileAPI.IsBluRay(o));
} else {
return false;
}
}
示例3: canAccept
import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
@Override
public boolean canAccept(IMediaResource res) {
if (res instanceof IMediaFile) {
Object sageobject = res.getMediaObject();
if (AiringAPI.IsFavorite(sageobject)) {
return true;
}
}
// if there is a folder in the view it will return false - this only
// works
// for flat views.
return false;
}
示例4: getLastWatchedTimeStamp
import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
private long getLastWatchedTimeStamp(IMediaResource o) {
if (o instanceof IMediaFile) {
Object theairing = o.getMediaObject();
return AiringAPI.GetRealWatchedStartTime(theairing);
}
if (o instanceof IMediaFolder) {
return searchFolderForLastWatchedTimeStamp((IMediaFolder) o);
}
// If it's not a File or Folder just return a 0
return 0;
}
示例5: getFavoritePriority
import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
private int getFavoritePriority(IMediaResource o) {
if (sortedFavorites == null) {
Object favs[] = (Object[]) Database.Sort(FavoriteAPI.GetFavorites(), true, "FavoritePriority");
sortedFavorites = new ArrayList<Object>(Arrays.asList(favs));
}
if (sortedFavorites.isEmpty()) {
return -1;
}
if (o instanceof IMediaFile) {
Object theairing = o.getMediaObject();
if (AiringAPI.IsFavorite(theairing)) {
Object thefav = FavoriteAPI.GetFavoriteForAiring(theairing);
return sortedFavorites.indexOf(thefav);
}
// If it's not a favorite, give it the lowest priority
return -1;
}
if (o instanceof IMediaFolder) {
// look at the first child
// this assumes that all members of the folder are the same
// 'Favorite'
IMediaResource res = ((IMediaFolder) o).getChildren().get(0);
return this.getFavoritePriority(res);
}
// If it's not a File or Folder just return a -1
return -1;
}