Package devplugin

Examples of devplugin.Channel


    FavoritesPlugin.getInstance().waitForFinishingUpdateThreads();
  }

  public synchronized void setDayProgram(MutableChannelDayProgram prog) {
    Date date = prog.getDate();
    Channel channel = prog.getChannel();
    String key = getDayProgramKey(date, channel);

    if(prog.getProgramCount() > 0) {
      prog.setLastProgramHadEndOnUpdate(prog.getProgramAt(prog.getProgramCount() - 1).getLength() > 0);
    }
View Full Code Here


    boolean somethingDeleted = false;

    if (fileList != null && fileList.length > 0) {
      somethingDeleted = true;
      for (File deleteFile : fileList) {
        Channel ch = getChannelFromFileName(deleteFile.getName(), channelArr, channelIdArr);
        Date date = getDateFromFileName(deleteFile.getName());

        if(ch != null && date != null) {
          if(informPlugins) {
            ChannelDayProgram dayProgram = getDayProgram(date, ch);
View Full Code Here

  private void handleKnownStatus(int knownStatus, ChannelDayProgram newDayProg,
      int version) {
    if (knownStatus != TvDataInventory.KNOWN) {
      Date date = newDayProg.getDate();
      Channel channel = newDayProg.getChannel();

      if (knownStatus == TvDataInventory.OTHER_VERSION) {
        // The day program was replaced -> fire a deleted event
        // (And later an added event)
View Full Code Here

    return somethingChanged;
  }

  private Program getFirstNextDayProgram(ChannelDayProgram channelProg) {
    Date nextDate = channelProg.getDate().addDays(1);
    Channel channel = channelProg.getChannel();
    TvDataBase db = TvDataBase.getInstance();
    ChannelDayProgram nextDayProg = db.getDayProgram(nextDate, channel, true);

    if ((nextDayProg != null) && (nextDayProg.getProgramCount() > 0)) {
      return (nextDayProg.getProgramAt(0));
View Full Code Here

    // must have a date)
    FilenameFilter filter = new FilenameFilter() {

      @Override
      public boolean accept(File dir, String name) {
        Channel ch = getChannelFromFileName(name, channelArr, channelIdArr);
        Date date = getDateFromFileName(name);

        return ch != null && date != null;
      }
    };
View Full Code Here

      if (version == 1) {
        certainChannelId = Integer.toString(in.readInt());
      } else {
        certainChannelId = (String) in.readObject();
      }
      Channel ch = Channel.getChannel(certainChannelServiceClassName, null, null, certainChannelId);
      if (ch != null) {
        getLimitationConfiguration().setChannels(new Channel[]{ch});
      }
    }
    else {
      if (useCertainChannel) {
        int cnt = in.readInt();
        ArrayList<Channel> list = new ArrayList<Channel>();
        for (int i = 0; i < cnt; i++) {
          String certainChannelServiceClassName = (String) in.readObject();
          String certainChannelId;
          if (version == 1) {
            certainChannelId = Integer.toString(in.readInt());
          }else{
            certainChannelId = (String) in.readObject();
          }

          Channel channel = Channel.getChannel(certainChannelServiceClassName, null, null, certainChannelId);
          if (channel != null) {
            list.add(channel);
          }
        }
View Full Code Here

        if(version >= 2) {
          channelGroupId = (String) in.readObject();
        }
     
        String channelId=(String)in.readObject();
        Channel ch = Channel.getChannel(channelServiceClassName, channelGroupId, null, channelId);
       
        mChannel = new ChannelItem(ch);
      }
      else if (version < 5) {
        Channel ch = Channel.readData(in, true);
        mChannel = new ChannelItem(ch);
      }
      else {
        mChannel = new ChannelItem(in,3);
      }
View Full Code Here

    if(isInvalid()) {
      return false;
    }
   
    if (mChannel != null && !mChannel.isNullChannel()) {
      Channel ch = prog.getChannel();
      if (ch.equals(mChannel.getChannel())) {
        channelExcl = true;
      }
    }
    else {
      channelExcl = true;
View Full Code Here

      Exclusion excl = (Exclusion) value;

      String title = excl.getTitle();
      String topic = excl.getTopic();
      ProgramFilter filter = excl.getFilter();
      Channel channel = excl.getChannel();
      String timeMsg = createTimeMessage(excl.getTimeLowerBound(), excl.getTimeUpperBound(), excl.getDayOfWeek());
     
      StringBuilder textValue = new StringBuilder();
     
      if(title != null) {
        textValue.append(mLocalizer.msg("exclude.title","Exclude all programs with title '")).append(title).append("'");
      }
      if(topic != null && title != null) {
        textValue.append(" ").append(mLocalizer.msg("appendTopic","with topic '")).append(topic).append("'");
      }
      else if (topic != null) {
        textValue.append(mLocalizer.msg("exclude.topic","Exclude all programs with topic '")).append(topic).append("'");
      }
      if(filter != null && (title != null || topic != null)) {
        textValue.append(" ").append(mLocalizer.msg("appendFilter","of the filter '")).append(filter.getName()).append("'");
      }
      else if(filter != null) {
        textValue.append(mLocalizer.msg("exclude.filter","Exclude all programs of the filter '")).append(filter.getName()).append("'");
      }
      if(channel != null && (title != null || topic != null || filter != null)) {
        textValue.append(" ").append(mLocalizer.msg("exclude.appendChannel","on channel '")).append(channel.getName()).append("'");
      }
      else if(channel != null) {
        textValue.append(mLocalizer.msg("exclude.channel","Exclude all programs on channel '")).append(channel.getName()).append("'");
      }
      if(timeMsg != null && (title != null || topic != null || filter != null || channel != null)) {
        textValue.append(" ").append(timeMsg);
      }
      else if(timeMsg != null) {
View Full Code Here

              short n = in.readShort(); // write number of channels

              for (int i = 0; i < n; i++) {
                try {
                  Channel ch = Channel.readData(in, true);
                  short startTimeLimit = in.readShort();
                  short endTimeLimit = in.readShort();

                  if (ch != null) {
                    ch.setStartTimeLimit(startTimeLimit);
                    ch.setEndTimeLimit(endTimeLimit);
                  }
                } catch (ClassNotFoundException e) {
                  e.printStackTrace();
                }
View Full Code Here

TOP

Related Classes of devplugin.Channel

Copyright © 2018 www.massapicom. 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.