Package devplugin

Examples of devplugin.Channel


    }

    properties.setProperty("NumberOfChannels", Integer.toString(mChannels.size()));

    for (int i = 0; i < mChannels.size(); i++) {
      final Channel channel = mChannels.get(i);
      DataHydraChannelContainer container = mInternalChannels.get(channel);
      properties.setProperty("ChannelId-" + i, container.getId());
      properties.setProperty("ChannelTitle-" + i, container.getName());
      properties.setProperty("ChannelBaseUrl-" + i, container.getBaseUrl());
      properties.setProperty("ChannelIconUrl-" + i, container.getIconUrl());
      properties.setProperty("ChannelLastUpdate-" + i, container.getLastUpdateString());
      properties.setProperty("ChannelGroup-" + i, channel.getGroup().getId());
    }
    properties.setProperty(SweDBTvDataService.SHOW_REGISTER_TEXT, String.valueOf(mSettings.getShowRegisterText()));

    mLog.info("Finished storing settings for DataHydraTvDataService. Returning properties...");
    return properties;
View Full Code Here


          ArrayList<Channel> loadedChannels = new ArrayList<Channel>();

          for (DataHydraChannelContainer container : DataHydracontainers) {
            initializeIconLoader(hydraGroup);
            Channel ch = createTVBrowserChannel(hydraGroup, container);
            closeIconLoader(hydraGroup);
            mInternalChannels.put(ch, container);
            loadedChannels.add(ch);
          }
View Full Code Here

          container.setName(container.getName().substring(4));
          category = Channel.CATEGORY_RADIO;
        }
      }

      Channel channel = new Channel(this, container.getName(),
              container.getId(), TimeZone.getTimeZone("UTC"), group.getCountry(),
              group.getCopyright(), group.getUrl(), group, null, category);

      if (StringUtils.isNotEmpty(container.getIconUrl())) {
        try {
          Icon icon = iconLoader.getIcon(container.getId(), container.getIconUrl());
          channel.setDefaultIcon(icon);
        } catch (IOException e) {
          mLog.severe("Unable to load icon for "
                  + container.getId() + " on URL "
                  + container.getIconUrl());
        }
View Full Code Here

    // E.g. '2003-10-04_de_premiere-1_base_full.prog.gz'
    Date date = DayProgramFile.getDateFromFileName(fileName);
    String country = DayProgramFile.getCountryFromFileName(fileName);
    String channelName = DayProgramFile.getChannelNameFromFileName(fileName);
   
    Channel channel = mDataService.getChannel(country, channelName);
    if (channel == null) {
      throw new TvBrowserException(TvDataBaseUpdater.class, "error.1",
        "Channel not found: {0} from {1}", channelName, country);
    }
   
View Full Code Here

        mCache[row][column] = null;
      }
    }

    if (value instanceof Channel) {
      Channel channel = (Channel) value;

      ChannelLabel channelLabel = new ChannelLabel();

      channelLabel.setChannel(channel);
      channelLabel.setOpaque(label.isOpaque());
View Full Code Here

          channelMap.put(ch.getId(), ch);
        }

        mChannelMap = new HashMap<Channel, Map<devplugin.Date, MutableChannelDayProgram>>();
        for (Schedule schedule : schedules) {
          Channel ch = channelMap.get(Integer.toString(schedule.getStation()));
          if (ch != null) {
            Calendar cal = Calendar.getInstance();
            cal.setTime(schedule.getTime().getLocalDate());
            devplugin.Date programDate = new Date(cal);
            MutableChannelDayProgram chDayProgram = getMutableDayProgram(ch, programDate);
View Full Code Here

    int numChannels = Integer.parseInt(settings.getProperty("NumberOfChannels", "0"));

    mChannels = new ArrayList<Channel>();

    for (int i = 0; i < numChannels; i++) {
      Channel ch = new Channel(this, settings.getProperty("ChannelTitle-" + i, ""), settings.getProperty("ChannelId-"
              + i, ""),  TimeZone.getDefault(), "US", "(c) SchedulesDirect", "", mChannelGroup, null, Channel.CATEGORY_TV);

      mChannels.add(ch);
    }
  }
View Full Code Here

    if (mChannels != null) {
      prop.setProperty("NumberOfChannels", Integer.toString(mChannels.size()));
      int max = mChannels.size();
      for (int i = 0; i < max; i++) {
        Channel ch = mChannels.get(i);
        prop.setProperty("ChannelId-" + i, ch.getId());
        prop.setProperty("ChannelTitle-" + i, ch.getName());
      }
    } else {
      prop.setProperty("NumberOfChannels", "0");
    }
View Full Code Here

      Map<Integer, Station> stations = xtvd.getStations();

      for (final Entry<Integer, Station> entry : stations.entrySet()) {
        final Station station = entry.getValue();
        allChannels.add(
                new Channel(this, station.getName(), Integer.toString(station.getId()), TimeZone.getTimeZone("UTC"), "US", "(c) SchedulesDirect", "", mChannelGroup, null, Channel.CATEGORY_TV)
        );
      }

    } catch (DataDirectException e) {
      e.printStackTrace();
View Full Code Here

          String channelName = channel[1].trim();
          int categories = Channel.CATEGORY_NONE;
          if (StringUtils.containsIgnoreCase(channelName, "TV") || StringUtils.containsIgnoreCase(channelName, "HD")) {
            categories = Channel.CATEGORY_TV;
          }
          Channel ch = null;
          // try to find this channel in the known channels so we can reuse its user settings
          for (Channel knownChannel : mChannels) {
            if (knownChannel.getId().equals(fullChannelId) && knownChannel.getDefaultName().equalsIgnoreCase(channelName)) {
              ch = knownChannel;
              break;
            }
          }
          if (ch == null) {
            ch = new Channel(this, channelName, fullChannelId, TimeZone.getTimeZone("GMT+0:00"), "gb",
                "(c) Radio Times", "http://www.radiotimes.co.uk", mRadioTimesChannelGroup, null, categories);
          }
          channels.add(ch);
          mLog.fine("Channel : " + ch.getName() + "{" + ch.getId() + "}");
        }

      }

      reader.close();
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.