Skip to content

Use Cases

Montellese edited this page Apr 5, 2020 · 4 revisions

This page contains some use cases which are and / or might be covered by the media import feature.

There are two types of use cases:

  • Media source focused use cases describe use cases based on where the media items are imported from.
  • Synchronization focused use cases describe use cases based on how the media items are imported.

Media source focused use cases

Import media items from external source

Probably the most common use case is to import media items from an external source like another existing tool to manage media items (e.g. Emby or Plex). It requires the media importer to be able to

  • discover the external source / provider
  • configure the provider with the necessary details
  • specify which media types it supports
  • configure the media type specific imports with the necessary details
  • import media items from the provider and pass them to Kodi

Import media items from another Kodi installation

For users with multiple Kodi installations in the same network which are not able to run a centralized machine / service with a MySQL database it could be useful to be able to import media items discovered on one Kodi installation into another Kodi installation. Since both installations run Kodi there would be no need for special metadata handling.

Importing could also happen both ways where each Kodi installation imports the media items from other Kodi installations. Therefore Kodi must make sure not to provide imported media items as importable media items to other Kodi installations.

This requires the media importer to be able to

  • detect other Kodi instances
  • configure how to access the Kodi instance (provider)
  • specify which media types it can import
  • import media items from the Kodi instance and pass them to Kodi

Import media items from installed Kodi plugins

There are already a myriad of content plugins available for Kodi. For some of them it could be more intuitive for users if their content is directly available in Kodi's library instead of having to manually open the plugin.

Plugins supporting media importing could indicate this as part of their addon.xml so that Kodi can automatically provide them as potential providers. Additional provider configuration is probably not necessary because the user can already configure the provider by configuring the plugin. Therefore the plugin would only need to specify which media types it supports and properly pass its media items to Kodi as imported media items.

Import media items from a filesystem

Since most users use Kodi by importing media items from some filesystem it might be useful to integrate this into the whole media import logic because it would make it much easier for users to setup and configure providers.

Filesystem importers would have to be able to

  • configure the filesystem path as a provider and / or import
  • configure the provider / import with the necessary details
  • discover media items from the filesystem
  • enrich the discovered media items with additional metadata from online services (scraping)
  • pass the enriched media items to Kodi

Synchronization focused use cases

Synchronize all media items from a source

The simplest way of importing media items is to provide Kodi the full list of media items to import. Kodi then takes care of comparing the list of media items to import with the list of previously imported media items. This way Kodi determines the differences and only adds, updates and removes media items which have changed.

Synchronize a subset of media items from a source

A more advanced way of importing media items is to provide Kodi with a partial list of media items to import. Similar to processing a full list of media items to import Kodi compares and synchronizes the changed items. It however cannot determine if any previously imported items have been removed.

Synchronize changed items from a source

The most advanced and most efficient way of importing media items is to only provide Kodi with media items which have been newly added, changed or removed. This way Kodi doesn't have to compare against the previously imported items and can simply apply the changed items.