Check if new videos since last refresh.
556444
def check_new_videos(self):
        """"""
        resp = api.request_videos(self.blink,
                                  time=self.blink.last_refresh,
                                  page=0)

        for camera in self.cameras.keys():
            self.motion[camera] = False

        try:
            info = resp['videos']
        except (KeyError, TypeError):
            _LOGGER.warning("Could not check for motion. Response: %s", resp)
            return False

        for entry in info:
            try:
                name = entry['camera_name']
                clip = entry['address']
                timestamp = entry['created_at']
                self.motion[name] = True
                self.last_record[name] = {'clip': clip, 'time': timestamp}
            except KeyError:
                _LOGGER.debug("No new videos since last refresh.")

        return True
797854
def _refresh_synced(self):
        
        if self.path.startswith('http'):
            juicer.utils.Log.log_debug("%s is not synced" % self.path)
            self.is_synced = False
        else:
            juicer.utils.Log.log_debug("%s is synced" % self.path)
            self.is_synced = True
941460
def unseen_videos_reset(self):
        """"""
        url = RESET_CAM_ENDPOINT.format(self.unique_id)
        ret = self._session.query(url).get('success')
        return ret
113569
def refresh(self, **kwargs):
        """"""
        self.resource.refresh(**kwargs)
        self.rdict = self.resource.entries
        self._update_stats()
885903
def refresh(self):
        """"""
        self._update_id_list()
        for _id in self.history[:]:
            if _id not in self.id_list:
                self.history.remove(_id)
1150061
function refresh() {
    if( active ) {
      requestAnimFrame( refresh );
      
      for( var i = 0, len = lists.length; i < len; i++ ) {
        lists[i].update();
      }
    }
  }
411262
def isVideo(self):
        
        val=False
        if self.__dict__['codec_type']:
            if self.codec_type == 'video':
                val=True
        return val
231552
def refresh(self):
        
        resp = self._imgur._send_request(self._INFO_URL)
        self._populate(resp)
        self._has_fetched = True
829422
def _check_if_all_updated(self):
        """"""
        for g in self.toc.toc:
            if g not in self.values:
                return False
            for n in self.toc.toc[g]:
                if n not in self.values[g]:
                    return False

        return True
346951
def markWatched(self):
        
        key = '/:/scrobble?key=%s&identifier=com.plexapp.plugins.library' % self.ratingKey
        self._server.query(key)
        self.reload()
113864
def check_new_round(hours=24, tournament=1):
    """"""
    click.echo(int(napi.check_new_round(hours=hours, tournament=tournament)))
500335
def _update_metadata_for_video(self, metadata_href, video):
        '''
        
        '''
        current_metadata = self.clarify_client.get_metadata(metadata_href)
        cur_data = current_metadata.get('data')

        if cur_data.get('updated_at') != video['updated_at']:
            self.log('Updating metadata for video {0}'.format(video['id']))
            if not self.dry_run:
                metadata = self._metadata_from_video(video)
                self.clarify_client.update_metadata(metadata_href, metadata=metadata)
            self.sync_stats['updated'] += 1
511902
def is_open(self, refresh=False):
        
        if refresh:
            self.refresh()
        return self.get_level(refresh) > 0
650950
def refresh_plugin(self, new_path=None, force_current=True):
        """"""
        self.fileexplorer.treewidget.update_history(new_path)
        self.fileexplorer.treewidget.refresh(new_path,
                                             force_current=force_current)
912030
def refresh(self, movie):
        
        if '_tmdbtv_id' in movie:
            refreshed = {'_Datasource': self.name}
            tvseries_id = movie['_tmdbtv_id']
            series = self._tmdb_series(tvseries_id)
            alternatives = self._tmdb_alt_titles(tvseries_id)
            refreshed.update({'title': series['original_name'],
                              'year': datetime.strptime(series['first_air_date'], '%Y-%m-%d').year,
                              'genres': [x['name'] for x in series['genres']],
                              'networks': [x['name'] for x in series['networks']],
                              'countries': series['origin_country'],
                              'tmdb_votes': int(round(series.get('vote_average', 0) * 0.5))})
            for alt in alternatives['results']:
                refreshed['title_%s' % alt['iso_3166_1'].lower()] = alt['title']
            if 'season' in movie:
                season_num = movie['season']
                season = self._tmdb_season(tvseries_id, season_num)
                refreshed.update({'season_title': season['name']})
                if 'episode' in movie:
                    episode_num = movie['episode']
                    episode = self._tmdb_episode(tvseries_id, season_num, episode_num)
                    credits = self._tmdb_credits(tvseries_id, season_num, episode_num)
                    refreshed.update({'episode_title': episode['name'],
                                      'directors': [x['name'] for x in credits['crew'] if x['department'] == 'Directing' and x['job'] == 'Director'],
                                      'writers': [x['name'] for x in credits['crew'] if x['department'] == 'Writing'],
                                      'cast': [x['name'] for x in credits['cast']],
                                      'guests': [x['name'] for x in credits['guest_stars']]})
            return refreshed
252247
def recent_uploads(limit = nil, offset = nil, page = nil)
      args = {
        "limit" => limit,
        "offset" => offset,
        "page" => page
      }.reject { |_, v| v.nil? }
      if args.size > 0
        search = "?"
        args.each { |k, v| search += "#{k}=#{v}&" }
      else
        search = ""
      end

      result = access_token.get("#{API_BASE}#{API_PATH}recent_uploads#{search}")
      raise ServiceError.new(result.code, result.body) unless result.code == "200"

      JSON.parse(result.body)["recent_uploads"].map { |icon| Icon.new(icon) }
    end
656649
function isLoadNeeded(newProps, oldProps) {
        return newProps.image.id !== oldProps.image.id || newProps.thumbnail !== oldProps.thumbnail;
      }