Repository: xbmc/xbmc
File: xbmc/video/VideoDatabase.h (C/C++)

Code before:
  void UpdateVideoVersionTypeTable();
  bool GetVideoVersionsNav(const std::string& strBaseDir,
                           CFileItemList& items,
                           VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
                           const Filter& filter = Filter());
  VideoAssetInfo GetVideoVersionInfo(const std::string& filenameAndPath);
  bool UpdateAssetsOwner(const std::string& mediaType, int dbIdSource, int dbIdTarget);

  int GetMovieId(const std::string& strFilenameAndPath);
  std::string GetMovieTitle(int idMovie);
  void GetSameVideoItems(const CFileItem& item, CFileItemList& items);
  int GetFileIdByMovie(int idMovie);
  int GetFileIdByFile(const std::string& fullpath);
  std::string GetFileBasePathById(int idFile);

  /*!
   * @brief Check the passed in list of images if used in this database. Used to clean the image cache.
   * @param imagesToCheck
   * @return a list of the passed in images used by this database.
   */
  std::vector<std::string> GetUsedImages(const std::vector<std::string>& imagesToCheck);

  /*! \brief Find a playlist path for a removable bluray disc.
   \param originalPath A path in the format of bluray://removable://<title_ID>/BDMV/index.bdmv
   \return A path in the format of bluray://removable://<ttile_ID>/BDMV/PLAYLIST/00000.mpls if found, otherwise an empty string.
   */
  std::string GetRemovableBlurayPath(std::string originalPath);

protected:
  int AddNewMovie(CVideoInfoTag& details);
  int AddNewMusicVideo(CVideoInfoTag& details);

  int GetMusicVideoId(const std::string& strFilenameAndPath);

  /*! \brief Get the id of this fileitem
   Works for both videodb:// items and normal fileitems
   \param item CFileItem to grab the fileid of
   \return id of the file, -1 if it is not in the db.
   */
  int GetFileId(const CFileItem &item);
  int GetFileId(const CVideoInfoTag& details);

  /*! \brief Get the id of the file of this item and store it in the item
   \param details CVideoInfoTag for which to get and store the id of the file
   \return id of the file, -1 if it is not in the db.
   */
  int GetAndFillFileId(CVideoInfoTag& details);

  /*! \brief Get the id of a file from path
   \param url full path to the file
   \return id of the file, -1 if it is not in the db.

Review comment (suggestion):
Typo in documentation: 'ttile_ID' should be 'title_ID'.
```suggestion
   \return A path in the format of bluray://removable://<title_ID>/BDMV/PLAYLIST/00000.mpls if found, otherwise an empty string.
```

Code after:
  void UpdateVideoVersionTypeTable();
  bool GetVideoVersionsNav(const std::string& strBaseDir,
                           CFileItemList& items,
                           VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
                           const Filter& filter = Filter());
  VideoAssetInfo GetVideoVersionInfo(const std::string& filenameAndPath);
  bool UpdateAssetsOwner(const std::string& mediaType, int dbIdSource, int dbIdTarget);

  int GetMovieId(const std::string& strFilenameAndPath);
  std::string GetMovieTitle(int idMovie);
  void GetSameVideoItems(const CFileItem& item, CFileItemList& items);
  int GetFileIdByMovie(int idMovie);
  int GetFileIdByFile(const std::string& fullpath);
  std::string GetFileBasePathById(int idFile);

  /*!
   * @brief Check the passed in list of images if used in this database. Used to clean the image cache.
   * @param imagesToCheck
   * @return a list of the passed in images used by this database.
   */
  std::vector<std::string> GetUsedImages(const std::vector<std::string>& imagesToCheck);

  /*! \brief Find a playlist path for a removable bluray disc.
   \param originalPath A path in the format of bluray://removable://<title_ID>/BDMV/index.bdmv
   \return A path in the format of bluray://removable://<title_ID>/BDMV/PLAYLIST/00000.mpls if found, otherwise an empty string.
   */
  std::string GetRemovableBlurayPath(std::string originalPath);

protected:
  int AddNewMovie(CVideoInfoTag& details);
  int AddNewMusicVideo(CVideoInfoTag& details);

  int GetMusicVideoId(const std::string& strFilenameAndPath);

  /*! \brief Get the id of this fileitem
   Works for both videodb:// items and normal fileitems
   \param item CFileItem to grab the fileid of
   \return id of the file, -1 if it is not in the db.
   */
  int GetFileId(const CFileItem &item);
  int GetFileId(const CVideoInfoTag& details);

  /*! \brief Get the id of the file of this item and store it in the item
   \param details CVideoInfoTag for which to get and store the id of the file
   \return id of the file, -1 if it is not in the db.
   */
  int GetAndFillFileId(CVideoInfoTag& details);

  /*! \brief Get the id of a file from path
   \param url full path to the file
   \return id of the file, -1 if it is not in the db.