當前位置: 首頁>>代碼示例>>Java>>正文


Java IMediaResource.getMediaObject方法代碼示例

本文整理匯總了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;
}
 
開發者ID:jusjoken,項目名稱:gemstone2,代碼行數:18,代碼來源:MetadataCalls.java

示例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;
    }
}
 
開發者ID:stuckless,項目名稱:sagetv-phoenix-core,代碼行數:12,代碼來源:DVDFilter.java

示例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;
}
 
開發者ID:stuckless,項目名稱:sagetv-phoenix-core,代碼行數:15,代碼來源:FavoriteFilter.java

示例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;
}
 
開發者ID:stuckless,項目名稱:sagetv-phoenix-core,代碼行數:14,代碼來源:RecentlyWatchedSorter.java

示例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;
    }
 
開發者ID:stuckless,項目名稱:sagetv-phoenix-core,代碼行數:33,代碼來源:FavoritePrioritySorter.java


注:本文中的sagex.phoenix.vfs.IMediaResource.getMediaObject方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。