Archive:Linux-Script List Of All Effective Scrapers

From Official Kodi Wiki
Revision as of 18:10, 22 November 2009 by >BaerMan (New page: __TOC__ This script queries XBMC's (movie-)database and generates a simple list showing the effectively used scraper for every path entry, even if this entry has no scraper definition by ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This script queries XBMC's (movie-)database and generates a simple list showing the effectively used scraper for every path entry, even if this entry has no scraper definition by its own.


Warning

This script should be harmless but as it writes out two files, there are chances you might overwrite something when running this script. So be careful and adjust the settings first!


Description

This script does a read-only query to the database which contains the library information for the video items and extracts all defined paths with their associated scrapers. As some paths don't have a scraper definition by their own, they inherit this definition from their parent directory. Within the database structure this isn't obvious at all and even sorting the list of paths by their name doesn't make it much better. This script helps in that it writes out a line for every path and the scraper that is used for it. Not existing scraper definitions get inheritet from their parent entries. In the end, every line states clear and obvious which scraper gets used and which content type is set.


Results

As result there are two files generated:

The filenames are effectively preceeded with the content of the variable PREFIX.

Attention: the entry for the root directory "/" gets deleted as this entry doesn't really belong to the path structure and therefore contains no scraper definition. As it has no parent entry either, there can't be a scraper definition inherited and this used to break my script. So the script deletes it while processing the output.

  • db_scraper_path: this is the original list from the database. Every line contains three elements, separated by a tab-stop: the path, the content and the scraper. If something goes wrong or if you miss an entry in the other file, have a look into this file. If a path isn't listed here, it isn't stored in the database at all.
  • db_scraper: this file contains the improved list. Every line contains three elements, separated by blanks: the path, the scraper and surrounded by parenthesis the content type.


Settings

The following settings are available in this script and you are urged to check them and adjust them if needed to fit your environment:

  • DBPATH
  • PREFIX
  • DBPATHLIST
  • SCRAPERLIST


Sourcecode

.