当前位置: 首页>>代码示例>>Java>>正文


Java IMediaResource.getTitle方法代码示例

本文整理汇总了Java中sagex.phoenix.vfs.IMediaResource.getTitle方法的典型用法代码示例。如果您正苦于以下问题:Java IMediaResource.getTitle方法的具体用法?Java IMediaResource.getTitle怎么用?Java IMediaResource.getTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sagex.phoenix.vfs.IMediaResource的用法示例。


在下文中一共展示了IMediaResource.getTitle方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: PropertyListContainsBase

import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
public static Boolean PropertyListContainsBase(Boolean bFlow, String PropSection, String PropName, ViewFolder Folder){
    String tProp = "";
    tProp = FormatProp(bFlow,PropSection,PropName);
    List<String> tList = GetPropertyAsList(tProp);
    if (tList.size()>0){
        for (IMediaResource Child: Folder.getChildren()){
            String NewValue = Child.getTitle();
            if (tList.contains(NewValue)){
                return Boolean.TRUE;
            }
        }
        return Boolean.FALSE;
    }else{
        return Boolean.FALSE;
    }
}
 
开发者ID:jusjoken,项目名称:gemstone2,代码行数:17,代码来源:util.java

示例2: getGroupName

import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
public String getGroupName(IMediaResource res) {
    if (res instanceof IMediaFile) {
        String title = null;

        title = res.getTitle();
        if (title == null)
            return null;

        Matcher m = pattern.matcher(title);
        if (m.find()) {
            return title.substring(0, m.start());
        }

        return title;
    }
    return null;
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:18,代码来源:CDGrouper.java

示例3: getName

import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
/**
 * Return the Name of the resource. If the resouce has a filesystem File
 * object, then it will return the name of that File, otherwise it will
 * return the Title of the given resource.
 *
 * @param res
 * @return
 */
public static String getName(IMediaResource res) {
    if (res instanceof IMediaFile) {
        File file = getFirstFile((IMediaFile) res);
        if (file != null) {
            String name = file.getName();
            if ("VIDEO_TS".equals(name) || "BDMV".equals(name)) {
                file = file.getParentFile();
                if (file != null) {
                    name = file.getName();
                }
            }
            return name;
        } else {
            return res.getTitle();
        }
    } else {
        return res.getTitle();
    }
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:28,代码来源:PathUtils.java

示例4: compare

import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
public int compare(IMediaResource o1, IMediaResource o2) {
    if (o1 == null || o2 == null) {
        return -1;
    }
    String t1 = o1.getTitle();
    String t2 = o2.getTitle();
    if (t1 == null || t2 == null) {
        Loggers.LOG.warn("Title should never be null", new Exception());
        return -1;
    }

    if (ignoreThe || ignoreAll) {
        return removeLeadingArticles(t1, ignoreAll).compareToIgnoreCase(removeLeadingArticles(t2, ignoreAll));
    } else {
        return t1.compareToIgnoreCase(t2);
    }
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:18,代码来源:TitleSorter.java

示例5: compare

import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
public int compare(IMediaResource o1, IMediaResource o2) {
    if (o1 == null)
        return 1;
    if (o2 == null)
        return -1;

    if (o1 instanceof IMediaFile && o2 instanceof IMediaFile) {
        long t1 = ((IMediaFile) o1).getStartTime();
        long t2 = ((IMediaFile) o2).getStartTime();
        ;
        if (t1 > t2)
            return 1;
        if (t1 < t2)
            return -1;
    }

    // we are probably comparing folders or items to folders, etc..
    if (o1.getTitle() != null) {
        return o1.getTitle().compareTo(o2.getTitle());
    } else {
        return 1;
    }
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:24,代码来源:StartTimeSorter.java

示例6: GetMediaKey

import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
public static String GetMediaKey(IMediaResource imediaresource){
    if (imediaresource==null){
        return "InvalidMediaItem";
    }
    IMediaResource kMediaresource = imediaresource;
    String kTitle = imediaresource.getTitle();
    String kType = "ITEM";
    String kMediaType = "MEDIA:TV";
    if (phoenix.media.IsMediaType( imediaresource , "FOLDER" )){
        kType = "FOLDER";
        kMediaresource = GetChild(imediaresource, Boolean.FALSE);
        kTitle = kMediaresource.getTitle();
        if (phoenix.media.IsMediaType( kMediaresource , "TV" )){
            kMediaType = "MEDIA:TV";
        }else{
            kMediaType = "MEDIA:OTHER";
        }
    }else{
        kType = "ITEM";
        if (phoenix.media.IsMediaType( imediaresource , "TV" )){
            kMediaType = "MEDIA:TV";
        }else{
            kMediaType = "MEDIA:OTHER";
        }
    }
    String tKey = "MEDIAKEY{" + kTitle + ":" + kType + ":" + kMediaType + "}";
    //LOG.debug("GetMediaKey: '" + tKey + "'");
    return tKey;
}
 
开发者ID:jusjoken,项目名称:gemstone2,代码行数:30,代码来源:ImageCache.java

示例7: getGroupName

import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
@Override
public String getGroupName(IMediaResource res) {
    String group = null;
    if (res instanceof IMediaFile) {
        group = ((IMediaFile) res).getMetadata().getMediaTitle();
    }

    if (group == null || group.isEmpty()) {
        return res.getTitle();
    } else {
        return group;
    }
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:14,代码来源:TitleGrouper.java

示例8: getGroupName

import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
@Override
public String getGroupName(IMediaResource res) {
    String group = null;
    if (res instanceof IMediaFile) {
        group = AiringAPI.GetAiringChannelNumber(res.getMediaObject());
    }

    if (group == null || group.isEmpty()) {
        return res.getTitle();
    } else {
        return group;
    }
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:14,代码来源:ChannelGrouper.java

示例9: findLibrary

import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
private IMediaResource findLibrary(IMediaFolder library, IMediaFile toFind) {
    String toFindSong = toFind.getTitle();
    for (IMediaResource r : library) {
        if (r instanceof IMediaFile) {
            String song = r.getTitle();
            float score = MetadataSearchUtil.calculateScore(song, toFindSong);
            if (score > .95) {
                return r;
            }
        }
    }
    return null;
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:14,代码来源:MusicMapperFactory.java

示例10: compare

import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
public int compare(IMediaResource o1, IMediaResource o2) {
    if (o1 == null)
        return 1;
    if (o2 == null)
        return -1;

    if (o1 instanceof IMediaFile && o2 instanceof IMediaFile) {
        IMediaFile m1 = ((IMediaFile) o1);
        IMediaFile m2 = ((IMediaFile) o2);
        if (m1.getMetadata() == null || m1.getMetadata().getOriginalAirDate() == null)
            return 1;
        if (m2.getMetadata() == null || m2.getMetadata().getOriginalAirDate() == null)
            return -1;
        long t1 = m1.getMetadata().getOriginalAirDate().getTime();
        long t2 = m2.getMetadata().getOriginalAirDate().getTime();
        if (t1 > t2)
            return 1;
        if (t1 < t2)
            return -1;
    }

    // we are probably comparing folders or items to folders, etc..
    if (o1.getTitle() != null) {
        return o1.getTitle().compareTo(o2.getTitle());
    } else {
        return 1;
    }
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:29,代码来源:OriginalAirDateSorter.java

示例11: GetTitle

import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
public static String GetTitle(IMediaResource imediaresource, boolean IncludeDiscNo){
    if (imediaresource==null){
        LOG.debug("GetTitle: null imediaresource");
        return "";
    }
    if (imediaresource.toString().contains("BlankItem")){
        LOG.debug("GetTitle: title request for BlankItem");
        return "";
    }
    String specialType = Source.GetSpecialType(imediaresource);
    String tTitle = imediaresource.getTitle();
    if ("tv".equals(specialType) || "airing".equals(specialType) || "recording".equals(specialType)){  //return the episode name
        String eTitle = null;
        if ("tv".equals(specialType)){
            eTitle = phoenix.metadata.GetEpisodeName(imediaresource);
            //LOG.debug("GetTitle: tv - eTitle from phoenix '" + eTitle + "'");
        }else{ //special handling for airings (EPG) to use the show object
            eTitle = sagex.api.ShowAPI.GetShowEpisode(phoenix.media.GetMediaObject(imediaresource));
            //LOG.debug("GetTitle: airing - eTitle from ShowAPI.GetShowEpisode '" + eTitle + "'");
        }
        if (eTitle==null){
            LOG.debug("GetTitle: sType '" + specialType + "' no episode title so using default Title '" + tTitle + "'");
            return tTitle;
        }else if (eTitle.equals("")){
            LOG.debug("GetTitle: sType '" + specialType + "' no episode title so using default Title '" + tTitle + "'");
            return tTitle;
        }else{
            LOG.debug("GetTitle: sType '" + specialType + "' episode title found '" + eTitle + "'");
            return eTitle;
        }
    }
    if (phoenix.media.IsMediaType( imediaresource , "FOLDER" )){
        LOG.debug("GetTitle: sType '" + specialType + "' FOLDER found so using default Title '" + tTitle + "'");
    }else{
        if (IncludeDiscNo){
            //see if there is a Disc or Part number to append
            int Disc = phoenix.metadata.GetDiscNumber(imediaresource);
            //LOG.debug("GetTitle: Disc '" + Disc + "' for tTitle '" + tTitle + "'");
            if (Disc==0){
                //do not append the Disc/Part
            }else{
                tTitle = tTitle + " (" + Disc + ")";
            }
        }
        LOG.debug("GetTitle: sType '" + specialType + "' non tv type so using default Title '" + tTitle + "'");
    }
    return tTitle;
}
 
开发者ID:jusjoken,项目名称:gemstone2,代码行数:49,代码来源:MetadataCalls.java

示例12: getGroupName

import sagex.phoenix.vfs.IMediaResource; //导入方法依赖的package包/类
public String getGroupName(IMediaResource res) {
    return res.getTitle();
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:4,代码来源:ShowGrouper.java


注:本文中的sagex.phoenix.vfs.IMediaResource.getTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。