Skip to main content

What are providers?

Providers in Cricfy are sources that host collections of streaming channels. Each provider maintains its own M3U playlist file containing channel information and stream URLs. The plugin fetches these providers from a remote API and caches them locally for better performance. Providers contain the following information:
  • title: The name of the provider
  • image: A thumbnail/logo representing the provider
  • catLink: The URL to the provider’s M3U playlist file

How providers are fetched and cached

The plugin uses an intelligent caching system to minimize network requests and improve performance. Here’s how it works:
  1. Initial fetch: When you first open the plugin, it fetches the provider list from the remote API (/cats.txt)
  2. Decryption: The encrypted provider data is decrypted using the plugin’s crypto utilities
  3. Caching: The provider list is cached locally with the key cricfy_providers
  4. Subsequent loads: On future launches, the plugin serves providers from cache instead of making network requests
The provider cache persists across Kodi sessions, making the plugin faster to launch after the first use.
When you launch the Cricfy plugin from Kodi’s Video Add-ons menu, you’ll see a list of available providers:
  1. Open Kodi and navigate to Add-ons > Video add-ons
  2. Select Cricfy from the list
  3. You’ll see a folder view with all available providers
  4. Each provider is displayed with its title and thumbnail image
  5. Select any provider to view its channel list
Providers without a valid catLink (HTTP URL) are automatically filtered out and won’t appear in the list.

Implementation details

The provider listing is handled by the list_providers() function in main.py:19. Here’s how it works:
def list_providers():
  """
  Lists the providers from Cricfy
  """
  provider_list = get_providers()

  for prov in provider_list:
    title = prov.get('title', 'Unknown')
    image = prov.get(
      'image', 'https://www.iconexperience.com/_img/v_collection_png/256x256/shadow/unknown.png')
    cat_link = prov.get('catLink', '')

    if not cat_link or not cat_link.startswith('http'):
      continue

    # Create a folder item for this provider
    li = xbmcgui.ListItem(label=title)
    li.setArt({'icon': image, 'thumb': image})

    url = build_url({'mode': 'list_channels', 'url': cat_link, 'title': title})
    xbmcplugin.addDirectoryItem(
      handle=ADDON_HANDLE, url=url, listitem=li, isFolder=True)
The plugin validates that each provider has a valid HTTP URL before displaying it. If a provider lacks a title, it defaults to “Unknown”, and if no image is provided, a default unknown icon is used.

Cache management

The caching mechanism in providers.py:22 ensures efficient operation:
def get_providers():
  """
  Fetches and decrypts the list of providers from Cricfy.
  Uses caching to avoid repeated network calls.
  """
  cached_providers = cache.get(PROVIDERS_CACHE_KEY)
  if cached_providers and isinstance(cached_providers, str):
    return json.loads(cached_providers)

  log_info("providers", "[Cache Miss] Fetching providers from remote URL")
  # ... fetch and decrypt logic
If you’re experiencing issues with outdated or missing providers, clearing Kodi’s cache may help refresh the provider list.

Build docs developers (and LLMs) love