本文整理匯總了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;
}