当前位置: 首页>>代码示例>>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;未经允许,请勿转载。