Sponsored Links

Sponsored Links

Showtime PS3 Media Center v4.5.100 (Testing) for PlayStation 3 Out


Sponsored Links
33w ago - Following up on the previous release, this weekend PlayStation 3 homebrew developer Andreas Oman updated the Showtime PS3 Media Center Testing build to version 4.5.100 followed by v4.5.188, v4.5.313, v4.5.329, v4.5.333 and v4.5.387 with details below.

Download: [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links]

Showtime v4.5.387 (Test Build)

  • Put logging about image loading behind a debug switch
  • Make icecast debug optional (from dev:settings)
  • http: Check if we are reading outsize known filesize before reconnect attempt (This fixes so we don't fail to detect EOF for connection: close and when client does not want us to reconnect)
  • video: Fix broken mimetype handling
  • hls: Disable low res video on all platforms
  • prop: Add prop_create_multi()
  • glw/video: Remove unnecessary elements from vertex array
  • vdpau: Create video decoder and surfaces based on display dimensions (not coded dimensions)
  • prop: Fix edge cases when unlinking symlinks
  • upgrade: Let omnigrade dev setting influence STOS upgrades too
  • upgrade: Retry write upon EAGAIN, EINTR and EINPROGRESS
  • upgrade: More robust upgrade of STOS: First download all necessary files to disk, sync() and then move them all into place at once
  • icecast: Add tag-decoding of StreamTitle if we find
  • More usage counters
  • http: Fix bug when using Connection: close and the new faster way of opening HTTP files
  • hls: Avoid really low resolutions (< 128 || < 72) on Rpi as it seems to put the decoder in a bad state
  • glw/playfield: Fix animation when in conditional ui rendering
  • js: Add showtime.deviceId property
  • Improve HTTP file access ...
  • Request 4096 bytes on first GET intead of 2 bytes and don't throw away the results
  • If server reponds with 200 on range request, just accept the server won't do range requests
  • Fix problem in http_read so it will make sure to fulfill the read even if there were pending data
  • hls: Must set mp_start_time or subtitles won't display for streams which start at PTS != 0
  • Improve error logging when writing upgrades to disk
  • glw/playfield: Schedule refresh when new child is selected
  • Add a throbber to search result page
  • Revert "js: Avoid running multiple search queries in the same plugin"
  • rpi: Upgrade STOS to 1.0.9
  • prop: Fix typo on prop unlinking causing some bugs
  • prop: More trace output
  • skin: Remove some actions in page menu if the would have no effect
  • Such as: Go to settings,home,playqueue if already at the page
  • Also remove the ability to bookmark home page. It makes no sense
  • prop: Fix broken symlink unlinking in prop_destroy0()
  • We need to unlink symlinks before we decend the tree
  • prop: Improve trace
  • prop: Avoid creating unnecessary properties during unlink
  • Fix bug when seeking in queues
  • glw: Fix another issue related to conditional ui rendering.
  • glw: Must schedule UI refresh when a child moves
  • glw: Fix broken move in array widget
  • glw/container: Schedule refresh when retiering childs
  • rpi: Avoid trying to decode progressive JPEGs and JPEGS without exactly three color channels
  • image: Never scale above im_max_{width,height} even if we get a requested width/height
  • rpi: Fix image corruption when decoding some JPEG images ...
  • ps3: Fix startup crash (recent regression)
  • ui: Fix regression in how navigation list wrapping is handling ...
  • js: Change JS_GetClass() -> JS_GET_CLASS()
  • usage: Add more counters
  • usage: Add plugin specific counters
  • glw/x11: Must repaint window on Expose when in conditional render mode
  • plugin: Unlock plugin mutex during download
  • usage: Don't use time() to get elapsed runtime as it might change if clock is adjusted
  • videoplayer: Remove unused code for parsing HLS playlists
  • glw: If switching deck page we need to rerender ...

Showtime v4.5.333 (Test Build)

  • Fix crash when playing MJPEG movies (recent regression)
  • ps3: Include eth address in device id hash
  • Improve traceprint to print source IP address
  • Add usage tracker

Showtime v4.5.329 (Test Build)

  • js: Avoid running multiple search queries in the same plugin
  • navigator: Avoid duplicate pages next to each other in history ...
  • Update libav with fix for incorrect DVHS packet framing ...
  • Move libav specific stuff from video_decoder.c into libav.c
  • vdpau: Get rid of a debug printf
  • glw/video: Fix recent regression in VDPAU video display
  • fix build breaks
  • Make it possible to turn off video frame interpolation ...
  • Show if decoder is hw accelerated in status bar
  • Remove trailing whitespace
  • Fix broken rescan of /dev/event devices
  • fa/smb: Fix use after free
  • Rewrite VDPAU implementation. Now works again after libav10 upgrade.

Also use the VDPAU OpenGL interop GL extension to avoid X11 pixmap hacks. The old hack would cause tearing on high res displays. New implementation also support mid-stream resolution switching and switching back/forth between software decoding and accelerated decoding.

  • posix: No longer adjust stack size. It can screw up third party libs

Showtime 4.5.313 (Test Build)

  • cec: Increase log verbosity
  • Check for showtime upgrade every 12 hours if Showtime is constantly on
  • http: No longer assume text/html is a directory
  • Get rid of a debug printf

Showtime 4.5.308 (Test Build)

  • skin/osk.view: Get rid of a trace() message
  • view: Support backslash escaped characters
  • Move deescape_cstyle() to misc/str.c
  • misc/str: Use av_url_split() instead of a copy
  • glw: Make sure sinewave() always output a different number than last time
  • osk: Make captions on some buttons translatable
  • Put on screen keyboards in a category of its own
  • Add support for On screen keyboard plugins
  • glw/deck: Add missing cases for GLW_SIGNAL_RESELECT_CHANGED
  • Fix double free()
  • glw: Optimize evaluation of dynamic statements
  • glw: Do dynamic statement evals without signal handlers
  • glw: Remove priorities from signal handling
  • glw: Remove remaining signals that needed to return values from generic signal dispatcher
  • glw: Move pointer events out of generic signal handling
  • glw: Remove GLW_SIGNAL_EVENT from generic signal dispatch
  • glw: Rework padding/border/margin attribute implementations
  • glw: Increase math precision in sinewave()
  • skin: If log is not visible, don't even load the views
  • glw: Add scheduled forced redraw of UI for various glw view functions
  • glw: Rename gr_schedule_refresh() -> glw_need_refresh()
  • glw: Fix more issues related to missing screen refreshes when in conditional rendering mode
  • ass: Leave some debug printf() in which is ifdef'ed out
  • Fix some minor sub/ass parser issues
  • Fix various bugs related to font loading and improve glyph caching
  • text: Fix problem with right aligned text spanning multiple lines
  • Fix broken JPEG file detection
  • Remove the index.html parser that will parse HTML as directory scan: It was buggy and the use case is somewhat limited / doubtful
  • subtitles: Add support for absolute positioning and fontsize changes in ass/ssa
  • glw: Fix recent regression causing empty label/text not to be cleared correctly
  • glw: Trig UI refresh when scrollbar moves ...
  • Rework image loader / decoding pipeline to be more flexible: Prepares for HW accelerated image manipulation
  • Add some more keymappings:
  • Shift-F7: Seek backwards
  • Shift-F8: Play/Pause
  • Shift-F9: Seek forwards
  • Add some ugly hacks for decoding RGBA lossy jpegs
  • Add missing file: metadata.h
  • xmp: Trig end-of-track after first loop
  • metadata: Remove locking during I/O: This should make the metadata UI stuff feel a lot more snappy.
  • metadata: Don't use metadata_source_t for temp storage during queries
  • backend/image: Fix broken locking around image loader
  • metadata: Split metadata.c into multiple files
  • httpclient: Correctly deal with HEAD req. returning 404
  • Set page in loading state during video demuxer init
  • videodecoder: Make sure to clear "too slow decoder" if we switch decoder
  • Fix audio settings page a bit
  • Various fixes to some race conditions in image loader
  • glw: Reinitialize frame queues when switching video engine
  • glw/video: Improve AVDIFF trace message
  • ps3: Parse extradata in annexb mode if it's formated that way
  • ps3: Show notification to user if h264 level parameters is violated: In particular number of reference frames
  • Fix focus bug on upgrade page
  • Convert decoded video frames to YUV420 if video render driver can't display it
  • Fix regression in opengl video renderer
  • Add audio speaker tests (found in settings->audio)
  • Set good defaults for cache and persistent path when running in STOS

v4.5.283 (Test Build)

  • Fix various bugs related to font loading and improve glyph caching
  • text: Fix problem with right aligned text spanning multiple lines
  • Fix broken JPEG file detection
  • Remove the index.html parser that will parse HTML as directory scan: It was buggy and the use case is somewhat limited / doubtful
  • subtitles: Add support for absolute positioning and fontsize changes in ass/ssa
  • glw: Fix recent regression causing empty label/text not to be cleared correctly
  • glw: Trig UI refresh when scrollbar moves ...
  • Rework image loader / decoding pipeline to be more flexible: Prepares for HW accelerated image manipulation
  • Add some more keymappings:
  • Shift-F7: Seek backwards
  • Shift-F8: Play/Pause
  • Shift-F9: Seek forwards
  • Add some ugly hacks for decoding RGBA lossy jpegs
  • Add missing file: metadata.h
  • xmp: Trig end-of-track after first loop
  • metadata: Remove locking during I/O: This should make the metadata UI stuff feel a lot more snappy.
  • metadata: Don't use metadata_source_t for temp storage during queries
  • backend/image: Fix broken locking around image loader
  • metadata: Split metadata.c into multiple files
  • httpclient: Correctly deal with HEAD req. returning 404
  • Set page in loading state during video demuxer init
  • videodecoder: Make sure to clear "too slow decoder" if we switch decoder
  • Fix audio settings page a bit
  • Various fixes to some race conditions in image loader
  • glw: Reinitialize frame queues when switching video engine
  • glw/video: Improve AVDIFF trace message
  • ps3: Parse extradata in annexb mode if it's formated that way
  • ps3: Show notification to user if h264 level parameters is violated: In particular number of reference frames
  • Fix focus bug on upgrade page
  • Convert decoded video frames to YUV420 if video render driver can't display it
  • Fix regression in opengl video renderer
  • Add audio speaker tests (found in settings->audio)
  • Set good defaults for cache and persistent path when running in STOS

v4.5.217 (Test Build)

  • New libav10 revision
  • Fix broken frame rate setup for some cases
  • ps3: Since we have virtual RAM mapped now, increase sqlite soft heap limit to 10MB
  • Make kvstore a bit bigger
  • Don't decode more than 2 frames when trying to figure out FPS
  • subtitles: Fix double free() for ttml subs
  • hls: Fix recently introduced memory leak (libav10 upgrade)
  • Simplify the built-in h264 parser a bit.
  • ps3: Improve crash dump with stack trace
  • ps3: Improve exception handler
  • Fix implicit channel-number to channel-layout mappings
  • ps3: Use 256 MB of virtual memory for Showtime's heap
  • ps3: Fix typo resulting in incorrect 'Unable to set RCVTIMO' warnings
  • pulseaudio: Don't crash if we fail to establish a connection to PA server
  • Close thumbnail generator if no request has arrived for 5 seconds.
  • dvd: Fix broken DVD navigation
  • audio: Reinitialize resample when codec changes
  • subtitles/tmp: Interpret slash at start-of-line as italic
  • Add support for storing per-file settings in file system
  • Set timeouts on UPnP notification requests
  • Log slow callouts
  • Turn on caching for subtitle load requests
  • Fix bug for DVDSUB/VOBSUB SPU implicit end time calculation
  • skin: Make list scrollbar focusable
  • js: Fix possible crash if tag is corrupt
  • playinfo: Fix deadlock
  • fs: Add support for xattr set/get (Only implemented for SMB right now)
  • icecast: Wait for EOF before we kill audio stream
  • Make fap_stat_code_t more generic (convert into fap_err_code_t)
  • Decode {} tags in SRT files
  • libav: Recognize mime-type application/ogg
  • lastfm: Don't try to query for artists without mbid
  • icecast: Add XSPF support
  • Understand video/nsv mimetype
  • Add support for TMPlayer subtitle format

v4.5.188 (Test Build)

  • New libav10 revision
  • Simplify the built-in h264 parser a bit.
  • ps3: Improve crash dump with stack trace
  • ps3: Improve exception handler
  • Fix implicit channel-number to channel-layout mappings
  • ps3: Use 256 MB of virtual memory for Showtime's heap
  • ps3: Fix typo resulting in incorrect 'Unable to set RCVTIMO' warnings
  • pulseaudio: Don't crash if we fail to establish a connection to PA server
  • Close thumbnail generator if no request has arrived for 5 seconds.
  • dvd: Fix broken DVD navigation
  • audio: Reinitialize resample when codec changes
  • subtitles/tmp: Interpret slash at start-of-line as italic
  • Add support for storing per-file settings in file system
  • Set timeouts on UPnP notification requests
  • Log slow callouts
  • Turn on caching for subtitle load requests
  • Fix bug for DVDSUB/VOBSUB SPU implicit end time calculation
  • skin: Make list scrollbar focusable
  • js: Fix possible crash if tag is corrupt
  • playinfo: Fix deadlock
  • fs: Add support for xattr set/get (Only implemented for SMB right now)
  • icecast: Wait for EOF before we kill audio stream
  • Make fap_stat_code_t more generic (convert into fap_err_code_t)
  • Decode {} tags in SRT files
  • libav: Recognize mime-type application/ogg
  • lastfm: Don't try to query for artists without mbid
  • icecast: Add XSPF support
  • Understand video/nsv mimetype
  • Add support for TMPlayer subtitle format

4.5.100 (Test Build)

  • Upgrade libav to v9.11 (Mostly security fixes)
  • libav: Recognize mime-type application/ogg
  • Decode {} tags in SRT files
  • lastfm: Don't try to query for artists without mbid
  • Add support for TMPlayer subtitle format
  • icecast: various fixes
  • Fix broken "Mark all as seen"
  • Stop playqueue when Showtime shutdowns.
  • settings: Don't crash on NULL optlist for multiopt setting
  • Update RU, zn_CN language translations

4.5.14 (Test Build)

  • Add support for MPL subtitle format
  • Make it possible to upload and test new .lang files directly into Showtime Access this feature at showtimehost:42000/showtime/translation
  • Fix typo in German translation

4.5.7 (Test Build)

  • Add support for BIG5 character encoding
  • Add support for .txt subtitles
  • Upgrade PARAM.SFO: Enable PSP Remote support and DTS audio
  • Consistent naming of logfile on disk
  • SRT: Skip over any initial control characters
  • keyring: Make it possible to ask without password
  • Make it possible to prioritize items in blobcache




Right now only used to make sure the TMDB configuration (which is small) get stored without risking to be expired. If it is expired none of the other images can be loaded.

Showtime by Andreas Oman is updated to 04.05.328 by deank for MultiMAN:


Both standalone versions (CEX/DEX) are available in mM's WEB column, too.

About: Showtime for multiMAN

Save the downloaded file as: /dev_hdd0/game/BLES80608/USRDIR/SHOWTIME.SELF

  • XMB videos and last folder visible in Showtime
  • Return to multiMAN when using the EXIT icon in to top right corner of main Showtime Interface

Since version 02.05.00 of multiMAN you can update your SHOWTIME within multiMAN, by going to XMMB Video tab -> Press [TRIANGLE] while "Start Showtime" is selected -> Update.

You can also update your showtime.self by deleting it from multiMAN's USRDIR folder and play a video - you'll be prompted to download the updated version. Be advised that in multiMAN versions 04.00.00+ SHOWTIME.SELF is located under USRDIR/sys folder.




Stay tuned for more PS3 Hacks and PS3 CFW news, follow us on Twitter and be sure to drop by the PS3 Hacks and PS3 Custom Firmware Forums for the latest PlayStation 3 scene updates and homebrew releases!

Comments 547 Comments - Go to Forum Thread »

• Please Register at PS3News.com or Login to make comments on Site News articles. Thanks!

tim132's Avatar
#537 - tim132 - 37w ago
I was wondering whether there's a way to add imdb.com to collect metadata of my films?

PS3 News's Avatar
#536 - PS3 News - 37w ago
Following up on the previous revision, today PlayStation 3 homebrew developer Andreas Oman updated the Showtime PS3 Media Player testing builds to v04.03.698 followed by Showtime for multiMAN (both CEX and DEX) by deank with the changes outlined below.

Download: [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] (6.21 MB) / [Register or Login to view links] (6.27 MB) / [Register or Login to view links] (13.7 MB) by Mussonero

Showtime Media Center Changelogs

4.3.698

Avoid some log messages from sqlite (we deal with them anyway)
Call logfiles "showtime-#.log" instead of "showtime.log.#"
h264: Skip the check converting h264 AVCC to annexb even when NAL unit len = 3.
media: Fix lock-against-self when cycling subtitle/audio tracks …
Make sure fa_parent() works on NTFS drives (ugly hack) …
Update pl_PL, sp_SP, zh_CN language
Make miner also translatable

4.3.685

upnp: Add more URLs in device description
settings/store: Fix lock inversion Fixes #1837
ssdp: Remove unused code
ssdp: If we fail to bind, retry later Fixes #1838
Update translation files: Swedish, dk_DK, zh_CN
Make system name configurable in Settings -> Network
hls: Drop astray FA_DEBUG
asyncio: Handle errors from poll() in a more resilient way poll() on ps3 can return error if there is a problem with one of the fd:s
If settings storage can't use rename to overwrite, just log a debug message
Improve ext subtitle load debug
ASYNCIO: Add names to all file descriptor structs
When ASYNCIO Poll error occurs, output more info in log
subtitles: Fix some memory leaks when loading ext subs
When user can rename discovered services, revert to original name if configured name is empty

4.3.628

Upgrade librtmp - Fixes bug with DecodeTEA on BE systems. Fixes #1774
upnp: One more fix. Fixes #1788
upnp: Use URL to video file as canonical URL
Rework how continous video playback build the video play list. Fixes #1819
audio: Fix assert() in pulseaudio when skipping to next video track
upnp: Fix issue causing names of UPNP services to be messed up
ps3: Nag a bit more about donations if it's never turned on by the user
HLS: More robust handling of corrupted segments
RTMP: Set media source info. Fixes #1822
hls: Avoid calling sub_scanner repeatedly if nothing will be scanned by it
httpclient: Deal with "206 Partial Content" when we didn't ask for it.

Here is the standalone version of Showtime 04.03.698 compiled by me with all the standard changes:

Showtime for multiMAN is available as usual within mM/mmCM in the VIDEO column (press [Triangle] over "Start Showtime" and select "UPDATE").

CEX/DEX standalone versions are also available for direct download (as .pkg) in the WEB column of multiMAN/mmCM.

More PlayStation 3 News...

PS3 News's Avatar
#535 - PS3 News - 38w ago
Following up on the previous updates, today PlayStation 3 homebrew developer Andreas Oman updated the Showtime PS3 Media Player testing builds to v4.3.613 with the changes outlined below.

Download: [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links]

4.3.613 (Testing Build) Changelog:

glw: Fix some nastyness related to how we resolve properties This fixes a long standing issue with image view in the UI, causing just the spinner to appear and no image to be shown
hls: Fix issues when seeking past end of track when doing continous play
osk: Replace ¤ with $
Upgrade: Don't fail patch upgrade attempt if we can't open target file to get current hash
Add Slovak translation
Improve event routing

More PlayStation 3 News...

PS3 News's Avatar
#534 - PS3 News - 41w ago
Following up on the previous updates, today PlayStation 3 homebrew developer Andreas Oman updated the Showtime PS3 Media Player testing builds alongside some MultiMAN PS3 PKG updates by deank with details below.

Download: [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links]

v4.3.576 & Recent Changes

ps3: Fix bug in litecoin miner causing it to be a lot less efficient than it should be
ps3: Relax memory warning thresholds a bit. Now that we use TLSF it's much less of a problem
stos: sync() after critical writes to disk
Fix crash in UPNP code Fixes #1773
js: Add support for plugins to set cookies directly
ps3: Add a miner
Transfer Copyright to Lonelycoder AB
prop: Disable prop subscription stats
prop: Redeuce memory usage by reusing compile time strings during prop symlinking
prop: Correctly handle settings of a PROP_DIR to some other value
glw/view: Improve trace() function a bit
prop/core: We must use prop_ref_dec_locked() when prop_mutex is held Fixes #1797
ps3: Make it possible to edit discovered FAT and HDD sources from settings
ps3: Add NTFS support
httpclient: Fix broken cookie domain validation Fixes #1794
Add so called 'managed services'
Huge rework of prop tree symbolic links
Add missing title and contents for network discovered services
Add str_cleanup() helper
ps3: Add some mutex debug helpers
Update fr_FR.lang
Update it_IT.lang
glw: Fix problem when assigning 'args' attribute with a non-prop p Fixes #1776

From aldostools: Build 4.3.582 has two important changes since 4.3.576:

ps3: Fix bug causing NTFS drives not being able to be remounted
ps3: Show CPU and RSX temperature in sysinfo (Press L3 to view)

For more details: github.com/andoma/showtime/commits/master

From deank: I compiled showtime 4.3.582 for mM... It is available in the WEB column of multiMAN and also from the VIDEO column -> Update. Standalone versions are in the web column.

Update: v4.3.601 Testing Changelog:

subtitles/sub: Watch out for division by zero
glw: Fix minor memleak (one per glw session)
Fix play/pause issues
glw: Rework how we auto-rescale UI
audio: Fix invalid assert()
ftpserver: Add support for "OPTS UTF8 ON/OFF" and report is as a FEATure
Resolve prop for track in playqueue
audio: When flushing pipeline we must also flush resampler
builtin-osk: Add '@' character and close when user press back/exit button
Drop shoutcast support
httpserver: Send encoding as UTF-8 in various places
Fix 'use after free'
miner: Drop debug info
ps3: Fix bug causing NTFS drives not being able to be remounted.
ps3: Show CPU and RSX temperature in sysinfo (Press L3 to view)

More PlayStation 3 News...

PS3 News's Avatar
#533 - PS3 News - 44w ago
Following up on the previous update, today PlayStation 3 developer facanferff has made available a Quickstart to PS3 Plugin Development in Showtime with details below.

To quote: Since a long time ago, some users have requested me to write a tutorial so they could create their own Showtime plugins. This is an initial attempt to it, I hope you like. If I make some mistake, I'm sorry, I'm not a teacher.

Overview

Before we get our hands dirty, it’s important to explain some little things that might help you later in making your own plugins. Plugins for Showtime (also known as Apps) are exclusively written, at the moment, in Javascript. To bring plugins to life, Showtime uses a Javascript engine called Spidermonkey (as of now, Showtime uses Spidermonkey 1.8.0-rc1). To learn more about this engine, you may go to developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey.

If you ever did web development, you may wonder if the Javascript API that work in normal web browser might work here, well, the answer is no. Due to this, you will not find things like DOM or AJAX in your toolbox, but you may and should use the basic Javascript.

In this quickstart, I will assume the reader has good understanding of Javascript. If you don’t know it, you may check the several resources available online/offline. From these, I recommend check this: codecademy.com

The Showtime plugins’ job is to respond to browse and search requests and populate the internal data model with the actual information to be shown to the user via Showtime’s user interface(s).

Since there are different types of plugins, I will focus in this tutorial in only a type, plugins that browse content in the web and show it to user (e.g. Youtube plugin).

Structure of a plugin

Every plugin lives in a directory of their own. From the several files this directory may have, you need to have at least one file in the root of the plugin, plugin.json, which contains information about the plugin and the author. You may use sub-directories and custom names for other files in order to organize it better.

plugin.json

plugin.json is a JSON (json.org) encoded text file containing information about the plugin and its author. Example of a plugin.json file (from the Channel9 plugin):

[Register or Login to view code]

Now it’s time to learn more about each field and which ones are required for every plugin:

[Register or Login to view code]

Getting Started

To run a plugin in a development environment, you may call from a terminal:

[Register or Login to view code]

The flag –p means that you want to load a plugin in development environment.

If you ran this already, you might get the following error: This will output something like: plugins [ERROR]: Unable to load development plugin: testplugin Unable to load testplugin/plugin.json -- File not found. This means or we don’t have a testplugin directory or we don’t have a plugin.json inside it. To create the directory do:

[Register or Login to view code]

Now, to edit the plugin.json, open the file testplugin/plugin.json in any text editor that you like.
In there, let’s make our initial plugin.json:

[Register or Login to view code]

With this, we specified that the plugin testplugin uses Javascript engine, has an ID ‘testplugin’ and the script is ‘testplugin.js’.

Whenever you want to reload the plugin you can use Shift+F5 in Showtime. This is helpful when you make changes to a plugin already in development environment inside Showtime, without the need of restarting Showtime. Even if the plugin gave an error, you may use this to try to reload it. When you reload it, all hooks and resources associated to the plugin are removed. This phenomenon happens also when a user removes a plugin from Showtime.

In case you are already in a page that belongs to the plugin itself, Showtime will reload the plugin and reload the page itself.

Now open your testplugin/testplugin.js in a text editor. Since we want to have a plugin that lives forever (so it can be called anytime) we need to have a scope where all local variables will live and also need to remember ‘this’ which is, when the script is invoked, a plugin object created by Showtime itself (showtimemediacenter.com/projects/showtime/wiki/JSAPI_plugin).

So, let’s edit this file:

[Register or Login to view code]

Reload the plugin now with Shift+F5, if you look in the terminal windows from which you opened Showtime, you will find a line saying ‘Hello, Showtime XXX’ where XXX is your current Showtime version that was obtained via showtime.currentVersionString .

Routing an URI to the plugin

Since our plugin will respond to browse requests we need to have an URI associated to it. An URI is something like a URL you use to browse the Internet, but in this case it is used to browse in Showtime. Every plugin reservers URI space starting with the plugin’s ID specified in plugin.json. These URI routes registered by plugins have higher priority than URI routes that Showtime itself handles, so you can create an URI route like it is in a web browser (e.g. youtube.com)

With this new knowledge let’s make it in use (edit it to match this code):

[Register or Login to view code]

Now, reload the plugin and if you type “testplugin:hello” in the search input field on Showtime’s home page, you will notice Showtime will open a new page with only a loading symbol, but in the terminal it will show the message provided to showtime.print.

A look in a real plugin

For this tutorial, I decided to use a real plugin made by me, which is called Videocopilot. The plugin source is located at github.com/facanferff/showtime-plugins/tree/master/videocopilot and its a plugin for Web site videocopilot.net.

I will not discuss the plugin.json of the plugin ([Register or Login to view links]) in this tutorial.
The lines of code or numbers of line are relative to version 0.9 (the most updated version at this moment).

Lets see then the plugin script (github.com/facanferff/showtime-plugins/blob/master/videocopilot/videocopilot.js).

To make Showtime provide a link in home page to the plugin’s start page we need to create a service:

[Register or Login to view code]

Lets check each argument given to plugin.createService:

  • 1st: “Video Copilot” is the display name of the service
  • 2nd: PREFIX (which is a global variable specified as “videocopilot” + “:start” is the initial route of the service (the URI where is located the home page of the plugin)
  • 3rd: “video” tells Showtime this plugin provides video resources
  • 4th: true means the service should be enabled immediately, making it visible to user and
  • 5th: plugin.path (gives you the full path to the plugin’s root directory) + “logo.png” is the path to an image that identifies the plugin.

Since we registered the home page’s URI route, we need to specify what does that URI route:

[Register or Login to view code]

Here, plugin.addURI registers a new URI route, in this case called “videocopilot:start” and startPage is the function to be called when this route is open by user request. The function provided to addURI should accept at least one argument, where the 1st one is a page object created by Showtime and used to manipulate the page.

function startPage:

[Register or Login to view code]

Here, page.appendItem will append a new item to the current page. Lets see the arguments:

  • 1st: PREFIX + ':browse:' + escape('http://www.videocopilot.net/tutorials/') + ':undefined' , is the URI route that should be called when the user clicks this item
  • 2nd: type of item, from the several ones, the most used are: directory, used to specify this item will open a new page to browse contents; and video that specified this item will open a video resource
  • 3rd: metadata for the item, you may provide any information about this item as you want. The most used are: title, title of the item; icon, image to be shown associated to the item; description, a description of the item

[Register or Login to view code]

Means this page is a directory to browse content.

[Register or Login to view code]

Tells Showtime that the contents of this page are “items”, in most cases, you want to use this one, we will use it for this tutorial.

[Register or Login to view code]

Tells Showtime that we don’t want anymore the loading symbol to be shown to user.

Function getVideoList:

[Register or Login to view code]

Here, showtime.httpGet is a function you may call to do a GET request to a page (e.g. to obtains its source code) and .toString() is to convert its response to a Javascript String to manipulate.

plugin.addURI(PREFIX + ":video:simple: (.*)", function(page, link):

[Register or Login to view code]

This is a Javascript object where we specify only the title of a video (displayed in video playback) and sources is an array where each object contains at least the url (e.g. the video’s url).

[Register or Login to view code]

Here, page.source is the way to tell Showtime what we want to reproduce. Since we want to play a video we need to put always “videoparams:” before the parameters of video as specified before encoded in a JSON string.

[Register or Login to view code]

This finally tells Showtime we have a video, so Showtime can handle everything to prepare video playback.

[Register or Login to view code]

This function is used to add continuously items to a page. In the current version of the tutorial, I will not explain this, so whenever you want to show more items (e.g. of a second page) use page.appendItem and pass what you need.

[Register or Login to view code]

This function adds a searcher to Showtime that can be used when a user searches for something (not a URI route) in search input field in Showtime’s home page. This function accepts 3 arguments:

  • 1st: title of the searcher, shown to user when searching something
  • 2nd: image of the search, also shown to user
  • 3rd: function that receives a page and query arguments (page is the same as specified before in the tutorial and query is a string containing what to search). This function is runs always whenever a user searches for something.

Note: In the function passed to plugin.addSearcher you need to specify somewhere the number of found entries via page.entries, otherwise Showtime will not show your searcher to user for that query.

I recommend you study carefully the code at: github.com/facanferff/showtime-plugins/blob/master/videocopilot/videocopilot.js

Publishing plugins

You may check showtimemediacenter.com/projects/showtime/wiki/SPMC for all details about it.

Bibliography

showtimemediacenter.com/projects/showtime/wiki/PluginDevelopment (maintained by Andreas Oman (andoma), Fábio Ferreira (facanferff) and Leonid Protasov (lprot))

Thanks

andoma: for creating Showtime

Final notes

I hope, you learned a little about plugin development in Showtime with this small tutorial. This tutorial is far away from being finished, I just wanted to give you an initial overview to the process of creating plugins for Showtime.

With a look in a real plugin, I believe you have now the fundamental tools to study better existing plugins and create new plugins. Whenever I can, I will try to update this tutorial to make it more complete and easier to understand.

For a reference of the functions Showtime provides I recommend you check showtimemediacenter.com/projects/showtime/wiki/JSAPIREF

And to conclude I leave here a screenshot of plugin TMDb so you can see the potential you can get from a plugin (below).

I hope you liked, facanferff.

More PlayStation 3 News...

Sponsored Links

Sponsored Links
Sponsored Links

Sponsored Links







Advertising - Affiliates - Contact Us - PS3 Downloads - Privacy Statement - Site Rules - Top - © 2014 PlayStation 3 News