Difference between revisions of "Media stubs"

From Official Kodi Wiki
Jump to: navigation, search
(Messages)
(Page Overhaul)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Mininav|[[Video library]]|[[Video management|Management]] }}
 
{{Mininav|[[Video library]]|[[Video management|Management]] }}
<section begin="intro" />As of v11 (Eden), XBMC has support for offline media stub files. These are files that represent a media outside of the online digital infrastructure and allow XBMC's library to catalogue your "offline" media collection, as well as ask for the media when selected for playback.<section end="intro" />
 
  
== Creating stubs ==
+
 
The intended way for this to work is '''e.g.''' Two DVD's you want to add to your XBMC library, Finding Nemo, and Bug's Life. You would create two empty text files where ever you store the rest of your digital media files called:
+
 
* Finding Nemo (2003).disc
+
= Introduction =
* Bug's Life (1998).disc
+
<section begin="intro" />If you have a collection of DVD's and Bluray disks but do not want to rip them to a hard drive, then a Media Stub File allows you to add the collection of disks to the {{kodi}} Video Library. It is a simple text based file that is added to your Source in exactly the same way as any other Movie or TV Show, which is then scanned or scraped into the library.<section end="intro" />
 +
 
 +
 
 +
 
 +
= Creating =
 +
The Media Stub File is a simple text file with the extension '''''.disc''''' instead of .txt extension. Once the file is saved correctly, {{kodi}} will see this file as an unplayable media file.
 +
 
 +
#Create a blank text file and rename the filename in accordance with proper Movie and TV Show '''''[[Naming_video_files|Naming Conventions]]'''''.
 +
#Rename the extension to '''''.disc'''''
 +
#Place the file in the Source as you would any other movie in your Source.
 +
 
 +
 
 +
*Example 1- Media Stub file in a movie folder with local artwork, actors, Extras, NFO File, theme etc.
 +
*Example 2- Media Stub file without local information and ready for scraping.
 +
 
 +
<gallery mode="packed" heights="500px">
 +
MediaStubs02.jpg
 +
</gallery>
 +
 
 +
 
 +
 
 +
= Usage =
 +
Once the title is scanned into the library, it will be visible in the same way as any other title in the library. To view the title for playback...
 +
#Select Play
 +
#A box will display requesting you to insert the disk (as shown in the below image)
 +
#Once the disk is inserted, the '''Play''' button will become active.  
 +
#Press '''Play''' to commence playback.
 +
 
 +
 
 +
<gallery mode="packed-overlay" heights="283px">
 +
MediaStubs01.jpg|Messages will differ based upon the contents of the Stub File
 +
</gallery>
 +
 
  
 
== Messages ==
 
== Messages ==
{{note|Due to a bug in v12 to v14, stubs won't display their custom message if {{kodi}} does not detect an optical drive connected to your HTPC.}}
+
The basic Stub File will display the default message '''Please insert the following disc: <movie name>'''
 
 
When you try to play a media stub file, XBMC will present a dialog box with the static message, "Please insert the following disc:", on the first line and the item's library title on the second line. An Eject/Load button is available to open the optical drive tray or, for a slot-loading drive, eject any currently inserted media. When a disc is inserted in the drive, the Play button is enabled and selecting it will begin playback of the disc.
 
  
You can also replace the title and/or add a custom message to be displayed when attempting to play a media stub file. This is accomplished by adding the following to the blank text file that is used for the stub:
+
It is possible to add messages to the pop up box as shown in the above image. The above image uses the following code placed inside the stub file. Longer messages will automatically scroll.
  
<syntaxhighlight lang="xml" enclose="div">
+
<syntaxhighlight lang=xml enclose="div">
 
<discstub>
 
<discstub>
   <title>Alternative Title</title>
+
   <title>Rogue Assassin aka WAR</title>
   <message>Message to be displayed</message>
+
   <message>Released as Rogue Assassin in Australia, but as WAR globally
 +
Bluray located in Storage 3, Drawer 2
 +
Add what you like to the message.</message>
 
</discstub>
 
</discstub>
 
</syntaxhighlight>
 
</syntaxhighlight>
  
This message will be displayed on the third line of the dialog box. You may use this message to provide additional information, such as the disc number/side to be inserted or, if you use a special numbering scheme for organizing your DVD/Bluray collection, the location number of the expected disc.
+
*The ''<discstub></discstub>'' tag is required if using either of the next two tags
 +
*The ''<title></title>'' tag is optional and can be used to display an alternate name
 +
*The ''<message></message>'' tag is optional. Use only one set of <message> tags as multiples are ignored.
  
== Media flags ==
 
You can optionally add media source flags to the filename before ".stub", if the skin you are using supports them. This can be used to indicate the type of media ('''DVD''', '''BLURAY''', '''VHS''', etc) that the movie resides on, which will be labeled within the {{kodi}} interface.
 
 
{{#lst:Add-on:Confluence|flags}}
 
  
For more info on this, see [[Media flags#Media source|Media flags/Media source]]. In cooperation with Confluence Skin's (and possibly others) feature to search for words like DVD, Bluray, and HDDVD in the file name it is possible to create a disc stub file that will show correct media flags in the skin.
 
  
For example, if you have Finding Nemo on DVD, you could create an empty file called:
+
= Modifying Extensions =
 +
This modification requires inserting the following code into the '''''[[Advancedsettings.xml]]''''' file.
 +
{{#lst:Advancedsettings.xml|discstubextensions}}
  
<code>Finding Nemo (2003).dvd.disc</code>
 
  
and add it to your library. In the library this file will show up with the DVD media flag in the Confluence Skin and when selected you will be prompted to insert the Finding Nemo DVD.
 
  
== Modifying the file extension used for stubs ==
 
By default these files have a .disc extension. You can modify the file extensions that are recognized as media stub files via the<code>''' <discstubextensions>'''</code> tag in [[Advancedsettings.xml#.3Cdiscstubextensions.3E|advancedsettings.xml]].
 
  
== Notes ==
 
For more technical information on this new feature see [http://trac.xbmc.org/ticket/10384 here], [https://github.com/xbmc/xbmc/pull/76 here], and [https://github.com/xbmc/xbmc/pull/89 here].
 
  
{{Gotham updated}}
+
{{top}}
  
[[Category:XBMC Manual]]
+
{{updated|18}}
 +
[[Category:FAQ]]
 +
[[Category:Index]]
 +
[[Category:How-to]]
 +
[[Category:Guides]]
 +
[[Category:Manual]]
 +
[[Category:Karellen]]
 
[[Category:Video library]]
 
[[Category:Video library]]
 +
[[Category:General topics]]
 +
[[Category:First time user]]
 +
[[Category:Quick Start Guide]]

Latest revision as of 02:02, 14 July 2018

Home icon grey.png   ▶ Video library ▶ Management ▶ Media stubs


1 Introduction

If you have a collection of DVD's and Bluray disks but do not want to rip them to a hard drive, then a Media Stub File allows you to add the collection of disks to the Kodi Video Library. It is a simple text based file that is added to your Source in exactly the same way as any other Movie or TV Show, which is then scanned or scraped into the library.


2 Creating

The Media Stub File is a simple text file with the extension .disc instead of .txt extension. Once the file is saved correctly, Kodi will see this file as an unplayable media file.

  1. Create a blank text file and rename the filename in accordance with proper Movie and TV Show Naming Conventions.
  2. Rename the extension to .disc
  3. Place the file in the Source as you would any other movie in your Source.


  • Example 1- Media Stub file in a movie folder with local artwork, actors, Extras, NFO File, theme etc.
  • Example 2- Media Stub file without local information and ready for scraping.


3 Usage

Once the title is scanned into the library, it will be visible in the same way as any other title in the library. To view the title for playback...

  1. Select Play
  2. A box will display requesting you to insert the disk (as shown in the below image)
  3. Once the disk is inserted, the Play button will become active.
  4. Press Play to commence playback.



3.1 Messages

The basic Stub File will display the default message Please insert the following disc: <movie name>

It is possible to add messages to the pop up box as shown in the above image. The above image uses the following code placed inside the stub file. Longer messages will automatically scroll.

<discstub>
  <title>Rogue Assassin aka WAR</title>
  <message>Released as Rogue Assassin in Australia, but as WAR globally
Bluray located in Storage 3, Drawer 2
Add what you like to the message.</message>
</discstub>
  • The <discstub></discstub> tag is required if using either of the next two tags
  • The <title></title> tag is optional and can be used to display an alternate name
  • The <message></message> tag is optional. Use only one set of <message> tags as multiples are ignored.


4 Modifying Extensions

This modification requires inserting the following code into the Advancedsettings.xml file.

The default filename extension for Disc Stubs is:

.disc

Using the following tags, it is possible to <add> additional or <remove> existing disc stub extensions to better suit your requirements.

<discstubextensions>
  <add>.disk|.stub</add>
  <remove>.disc</remove>
</discstubextensions>




Return to top