Examples of TitleInfo


Examples of net.pms.external.xbmc.info.TitleInfo

  }

  @Override
  public void discoverChildren() {
    XBMCLog.logTimeStart("loading movie info from DB");
    final TitleInfo info = dao.getTitleByID(titleId);
    XBMCLog.logTimeStop();

    if (info == null) {
      addChild(new VirtualFolder("NOT FOUND CHECK LOG", null));
      return;
    }

    if (!info.getFile().exists()) {
      addChild(new VirtualFolder("<FILE IS MISSING>", null));
      return;
    }
    addChild(new VirtualFolder("Title: " + info.getName(), null));

    XBMCLog.logTimeStart("adding title file");
    addChild(new RealFile(info.getFile()) {
      @Override
      public String getName() {
        return "Play";
      }

      @Override
      public void startPlaying(String rendererId) {
        super.startPlaying(rendererId);
        info.setWatched(info.getWatched() + 1);
        dao.updateWatched(info);
      }
    });
    XBMCLog.logTimeStop();

   
    if (info.getTagline() != null && info.getTagline().length() > 0) {
      addChild(new VirtualFolder("Tagline: " + info.getTagline(), null));
    }
    if (info.getRunningTime() != null && info.getRunningTime().length() > 0) {
      addChild(new VirtualFolder("Running Time: " + info.getRunningTime() + "min", null));
    }
    if (info.getAge() != null && info.getAge().length() > 0) {
      addChild(new VirtualFolder("Age: " + info.getAge(), null));
    }
    if (info.getGenre() != null && info.getGenre().length() > 0) {
      addChild(new VirtualFolder("Genre: " + info.getGenre(), null));
    }
    if (info.getSinopsis() != null && info.getSinopsis().length() > 0) {
      addChild(new VirtualFolder("Sinopsis: " + info.getSinopsis(), null));
    }
    if (info.getDirector() != null && info.getDirector().length() > 0) {
      addChild(new VirtualFolder("Director: " + info.getDirector(), null));
    }
    if (info.getWriter() != null && info.getWriter().length() > 0) {
      addChild(new VirtualFolder("Writer: " + info.getWriter(), null));
    }
    if (info.getRating() != null && info.getRating().length() > 0) {
      addChild(new VirtualFolder("IMDB Rating: " + info.getRating(), null));
    }
    if (info.getCountry() != null && info.getCountry().length() > 0) {
      addChild(new VirtualFolder("Country: " + info.getCountry(), null));
    }
    if (info.getStudio() != null && info.getStudio().length() > 0) {
      addChild(new VirtualFolder("Studio: " + info.getStudio(), null));
    }
    if (info.getVideoCodec() != null && info.getVideoCodec().length() > 0) {
      addChild(new VirtualFolder("Video CODEC: " + info.getVideoCodec(), null));
    }
    if (info.getVideoRes() != null && info.getVideoRes().length() > 0) {
      addChild(new VirtualFolder("Video Size: " + info.getVideoRes(), null));
    }
    if (info.getAudioCodec() != null && info.getAudioCodec().length() > 0) {
      addChild(new VirtualFolder("Audio CODEC: " + info.getAudioCodec(), null));
    }
    if (info.getAudioChannels() != null && info.getAudioChannels().length() > 0) {
      addChild(new VirtualFolder("Audio Channels: " + info.getAudioChannels(), null));
    }
    if (info.getEpisode() != null && info.getEpisode().length() > 0) {
      addChild(new VirtualFolder("Season/Episode: " + info.getEpisode(), null));
    }
    addChild(new VirtualFolder("Watched: ", info.getWatched() + " times") {
      @Override
      public String getName() {
        return "Watched: " + info.getWatched() + " times";
      }
    });
    addChild(new VirtualVideoAction("Reset watched count: ", true) {
      @Override
      public boolean enable() {
        info.setWatched(0);
        dao.updateWatched(info);
        XBMCLog.info("watched reset");
        return true;
      }
    });

    addThumbnails(info.getPosters(), Consts.POSTER);
    addThumbnails(info.getFanart(), Consts.FANART);
   
  }
View Full Code Here

Examples of net.pms.external.xbmc.info.TitleInfo

    try {
      String stStr = "select * from episodeview where idEpisode = ?";
      st = getConnection().prepareStatement(stStr);
      st.setInt(1, episodeId);
      rs = st.executeQuery();
      TitleInfo mi = null;
      if (rs.next()) {
        mi = new TitleInfo();
        mi.setPosters(getPosterURLs(episodeId));
        mi.setFanart(getFanartURLs(episodeId));
        mi.setActors(getActors(episodeId));
        mi.setTitleId(episodeId);
        mi.setFileId(rs.getInt("idFile"));
        mi.setFile(new File(rs.getString("strPath") + rs.getString("strFileName")));
        mi.setSinopsis(rs.getString("c01"));
        mi.setName(rs.getString("c00"));
        mi.setDirector(rs.getString("c06"));
        mi.setGenre(rs.getString("c14"));
        mi.setAge(rs.getString("c12"));
        mi.setRunningTime(rs.getString("c11"));
        mi.setTagline(rs.getString("c03"));
        mi.setRating(rs.getString("c05"));
        mi.setWatched(rs.getInt("playCount"));
        mi.setEpisode(rs.getString("c12") + "x" + rs.getString("c13"));
      }
      return mi;
    } catch (SQLException e) {
      XBMCLog.error(e);
      return null;
View Full Code Here

Examples of net.pms.external.xbmc.info.TitleInfo

    try {
      String stStr = "select *, movieview.idFile fi from movieview left join streamdetails on streamdetails.idFile = movieview.idFile where movieview.idMovie = ?";
      st = getConnection().prepareStatement(stStr);
      st.setInt(1, titleId);
      rs = st.executeQuery();
      TitleInfo mi = null;
      while (rs.next()) {
        if (mi == null) {
          mi = new TitleInfo();

        }
        if (rs.getInt("iStreamType") == 0) { // video stream
          mi.setTitleId(titleId);
          mi.setFileId(rs.getInt("fi"));
          mi.setFile(new File(rs.getString("strPath") + rs.getString("strFileName")));
          mi.setSinopsis(rs.getString("c01"));
          mi.setName(rs.getString("c00"));
          mi.setDirector(rs.getString("c15"));
          mi.setWriter(rs.getString("c06"));
          mi.setGenre(rs.getString("c14"));
          mi.setAge(rs.getString("c12"));
          mi.setRunningTime(rs.getString("c11"));
          mi.setTagline(rs.getString("c03"));
          mi.setRating(rs.getString("c05"));
          mi.setWatched(rs.getInt("playCount"));
          mi.setCountry(rs.getString("c21"));
          mi.setStudio(rs.getString("c18"));
          mi.setVideoCodec(rs.getString("strVideoCodec"));
          mi.setVideoRes(rs.getString("iVideoWidth") + "x" + rs.getString("iVideoHeight"));
        } else { // audio stream
          mi.setAudioCodec(rs.getString("strAudioCodec"));
          mi.setAudioChannels(rs.getString("iAudioChannels"));
        }
      }
      disconnect(st, rs);
      mi.setPosters(getPosterURLs(titleId));
      mi.setFanart(getFanartURLs(titleId));
      mi.setActors(getActors(titleId));
      return mi;
    } catch (SQLException e) {
      XBMCLog.error(e);
      return null;
    } finally {
View Full Code Here

Examples of org.olat.core.gui.control.generic.title.TitleInfo

          listenTo(forumCtr);
          content.contextPut("hasInlineForum", Boolean.TRUE);
          content.put("forum", forumCtr.getInitialComponent());
        } else {
          content.contextPut("hasInlineForum", Boolean.FALSE);         
          TitleInfo titleInfo = new TitleInfo(translate("dialog.selected.element"), selectedElement.getFilename());
          PopupBrowserWindow pbw = ForumUIFactory.getPopupableForumController(ureq, getWindowControl(), forum, forumCallback, titleInfo);
          pbw.open(ureq);
        }

      } else if (command.equals(ACTION_SHOW_FILE)) {
View Full Code Here

Examples of org.olat.core.gui.control.generic.title.TitleInfo

   
    String displayOption = courseNode.getDisplayOption();
    if(CourseNode.DISPLAY_OPTS_CONTENT.equals(displayOption)) {
      return controller;
    } else if (CourseNode.DISPLAY_OPTS_TITLE_CONTENT.equals(displayOption)) {
      TitleInfo titleInfo = new TitleInfo(null, courseNode.getShortTitle(), null, courseNode.getIdent());
      titleInfo.setDescriptionCssClass("o_course_run_objectives");
      TitledWrapperController titledController = new TitledWrapperController(ureq, wControl, controller, "o_course_run", titleInfo);
      if (StringHelper.containsNonWhitespace(iconCssClass)) {
        titledController.setTitleCssClass(" b_with_small_icon_left " + iconCssClass + " ");
      }
      return titledController;
    } else if (CourseNode.DISPLAY_OPTS_TITLE_DESCRIPTION_CONTENT.equals(displayOption)) {

      String longTitle = courseNode.getLongTitle();
      String description = null;
      if (StringHelper.containsNonWhitespace(courseNode.getLearningObjectives())) {
        if (StringHelper.containsNonWhitespace(longTitle)) {
          description = "<h4>" + longTitle + "</h4>" + courseNode.getLearningObjectives();
        } else {
          description = courseNode.getLearningObjectives();
        }
      }
     
      TitleInfo titleInfo = new TitleInfo(null, courseNode.getShortTitle(), description, courseNode.getIdent());
      titleInfo.setDescriptionCssClass("o_course_run_objectives");
      TitledWrapperController titledController = new TitledWrapperController(ureq, wControl, controller, "o_course_run", titleInfo);
      if (StringHelper.containsNonWhitespace(iconCssClass)) {
        titledController.setTitleCssClass(" b_with_small_icon_left " + iconCssClass + " ");
      }
      return titledController;
View Full Code Here

Examples of org.olat.core.gui.control.generic.title.TitleInfo

        Codepoint.codepoint(CollaborationTools.class, "sync_exit");
        return aforum;
      }});
   
    Translator trans = Util.createPackageTranslator(this.getClass(), ureq.getLocale());
    TitleInfo titleInfo = new TitleInfo(null, trans.translate("collabtools.named.hasForum"));
    titleInfo.setSeparatorEnabled(true);
    Controller forumController = ForumUIFactory.getTitledForumController(ureq, wControl, forum, new ForumCallback() {

      public boolean mayOpenNewThread() {
        return true;
      }
View Full Code Here

Examples of org.olat.core.gui.control.generic.title.TitleInfo

      // Init reply workflow
      replyCommentFormCtr = new UserCommentFormController(ureq, getWindowControl(), userComment, null, commentManager);
      listenTo(replyCommentFormCtr);
      User parentUser = userComment.getCreator().getUser();
      String title = translate("comments.coment.reply.title", new String[]{parentUser.getProperty(UserConstants.FIRSTNAME, null), parentUser.getProperty(UserConstants.LASTNAME, null)});
      TitleInfo titleInfo = new TitleInfo(null, title);
      replyTitledWrapperCtr = new TitledWrapperController(ureq, getWindowControl(), replyCommentFormCtr, null, titleInfo);
      listenTo(replyTitledWrapperCtr);
      replyCmc = new CloseableModalController(getWindowControl(), "close", replyTitledWrapperCtr.getInitialComponent());
      replyCmc.activate();     
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.