[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog

oik_tunes_analyze_file() – Analyze the file to determine the fields for oik-recording and oik-track and create the oik-track

Description

Analyze the file to determine the fields for oik-recording and oik-track and create the oik-track

bw_register_field( "_oikt_recording", "noderef", "Recording", array( '#type' => "oik-recording", '#optional' => true ) ); bw_register_field( "_oikt_track", "number", "Track number e.g. 1" ); bw_register_field( "_oikt_duration", "text", "Duration in mm:ss" ); bw_register_field( "_oikt_composer", "text", "Composer(s)" ); Other fields: album, albumartist, artist, composer, encoding_time_unix, genre, mediaprimaryclassid, provider, providerrating, providerstyle, publisher, title, track, uniquefileidentifier, year

Usage

oik_tunes_analyze_file( $filename, $getID3 );

Parameters

$filename
( mixed ) required –
$getID3
( mixed ) required –

Returns

void

Source

File name: oik-tunes/admin/oik-tunes.php
Lines:
1 to 22 of 22
function oik_tunes_analyze_file( $filename, $getID3 ) {
  $fileInfo = $getID3->analyze( $filename );
  getid3_lib::CopyTagsToComments( $fileInfo);
  bw_trace2( $fileInfo,  "fileInfo" );
  //print_r( $fileInfo );
  $result = array();
  $result['_oikt_album'] = oik_tunes_get_field( $fileInfo, "album" );
  $result['_oikt_artist'] = oik_tunes_get_artist( $fileInfo );
  $result['_oikt_composer'] = oik_tunes_get_composers( $fileInfo );
  $result['_oikt_duration'] = oik_tunes_get_duration( $fileInfo ); 
  $result['_oikt_title'] = oik_tunes_get_title( $fileInfo ); 
  $result['_oikt_track'] = oik_tunes_get_field( $fileInfo, "track_number" );
  $result['_oikt_year'] = oik_tunes_get_field( $fileInfo, "year" ); 
  $result['_oikt_publisher'] = oik_tunes_get_field( $fileInfo, "publisher" ); 
  $result['_oikt_MPCI'] = oik_tunes_get_field( $fileInfo, "mediaprimaryclassid" ); 
  $result['_oikt_UFI'] = oik_tunes_get_UFI( $result, $fileInfo ) ;
  $result['_oikt_URI'] = oik_tunes_get_URI( $result );
  bw_trace2( $result, "result", false ); 
  // $site =
  $post_id = oik_tunes_create_track_client( $result );
  return( $post_id );
}
 
 View on GitHub

Called by

1 to 1 of 1
  • oik_tunes_analyze() – Import the information for a file

Invoked by

    Calls

    1 to 9 of 9
    • bw_trace2() – Trace $value to the trace log file if tracing is active
    • oik_tunes_create_track_client() – Determine how to create the track
    • oik_tunes_get_artist() – oik tunes get artist
    • oik_tunes_get_composers() – Return the composer(s) taking into account additional fields that getID3() does not automatically merge into comments_html
    • oik_tunes_get_duration() – Return the duration of the track
    • oik_tunes_get_field() – Return an imploded field from comments_html
    • oik_tunes_get_title() – oik tunes get title
    • oik_tunes_get_UFI() – Get a unique file identifier from UniqueFileIdentifier or Album, Year, Track
    • oik_tunes_get_URI() – Get a unique album identifier from UniqueFileIdentifier or Album, Artist, Year

    Call hooks

    Function name: oik_tunes_analyze_file
    Plugin ref: oik tunes
    Version: 1.0.0
    Sourcefile: admin/oik-tunes.php
    File ref:
    Deprecated?: No
    API Letters:

    Published: December 2, 2013 | Last updated: December 3, 2013

    Information

    Function name: oik_tunes_analyze_file
    Plugin ref: oik tunes
    Version: 1.0.0
    Sourcefile: admin/oik-tunes.php
    File ref:
    Deprecated?: No
    API Letters:

    Recent plugin updates

    oik-weight-zone-shipping v0.2.13 oik-weight-zone-shipping v0.2.13 has been tested with WooCommerce 10.1.2 and WordPress 6.8.2 ...
    SB Children Block v1.3.0 Upgrade to SB Children Block v1.3.0 for support for PHP 8.3 and PHP 8.4  ...
    oik v4.15.3 Update to oik v4.15.3 for a couple of security fixes. Tested with WordPress 6.8.2 ...
    oik-privacy-policy v1.4.9 Update to oik-privacy-policy v1.4.9 for a security fix. Tested with WordPress 6.8.2 and PHP 8.3 and PHP 8.4 ...
    oik-nivo-slider v1.17.0 oik-nivo-slider v1.17.0 introduces the Nivo slider block - oik-nivo-slider/nivo. ...

    Plugins

    • All Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins

    Themes

    • FREE themes
    • Bespoke themes
    • Premium themes

    Blocks

    • All Blocks
    • Block examples
    • About Blocks

    Shortcodes

    • All Shortcodes
    • Shortcode examples
    • About Shortcodes

    Reference

    • About APIs
    • All APIs
    • All Classes
    • All Files
    • All Hooks

    Support

    • Contact
    • Cookies policy
    • Get API key
    • Privacy
    • Request support
    • Sitemap
    • Stay informed
    • Terms and Conditions
    oik-plugins
    Email: herb@bobbingwide.com

    Weight shipping plugins

    Find out which cart weight shipping plugin you need for your WooCommerce site.
    Which cart weight based plugin do I need?

    Site:  www.oik-plugins.com
    © Copyright oik-plugins 2011-2025. All rights reserved.


    Website designed and developed by Herb Miller of Bobbing Wide
    Proudly powered by WordPress and oik-plugins

    WordPress version: 6.8.3

    Gutenberg version: 21.7.0

    PHP version: 8.2.29