From 22a25513336d0e027ca6fa2b737e11428a2a2b8b Mon Sep 17 00:00:00 2001 From: scottdowne Date: Tue, 9 Apr 2013 05:43:33 -0400 Subject: [PATCH 1/2] [#3219] Old media comes with a better title. --- public/src/core/media.js | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/public/src/core/media.js b/public/src/core/media.js index 8830d43da..146f4daf3 100644 --- a/public/src/core/media.js +++ b/public/src/core/media.js @@ -597,30 +597,34 @@ if ( importData.url && _duration >= 0 ) { var firstSource; - // If sources is a single array and of type null player, don't bother making a sequence. + // If sources is a single array and of type null player, + // don't bother making a sequence. if ( url.length > 1 || MediaTypes.checkUrl( url[ 0 ] ) !== "null" ) { // grab first source as main source. sources.push( URI.makeUnique( url.shift() ).toString() ); for ( i = 0; i < url.length; i++ ) { - fallbacks.push( URI.makeUnique( url[ i ] ).toString() ); + fallbacks.pusgetMetaDatah( URI.makeUnique( url[ i ] ).toString() ); } firstSource = sources[ 0 ]; - newTrack = new Track(); - _this.addTrack( newTrack ); - newTrack.addTrackEvent({ - type: "sequencer", - popcornOptions: { - start: 0, - end: _duration, - source: sources, - title: URI.stripUnique( firstSource ).path, - fallback: fallbacks, - duration: _duration, - target: "video-container" - } + MediaTypes.getMetaData( firstSource, function( data ) { + + newTrack = new Track(); + _this.addTrack( newTrack ); + newTrack.addTrackEvent({ + type: "sequencer", + popcornOptions: { + start: 0, + end: _duration, + source: sources, + title: data.title, + fallback: fallbacks, + duration: _duration, + target: "video-container" + } + }); + _clipData[ firstSource ] = firstSource; }); - _clipData[ firstSource ] = firstSource; } } } else if ( console ) { From cf0674e96236b45cc0703addb546260fbebd918a Mon Sep 17 00:00:00 2001 From: scottdowne Date: Wed, 10 Apr 2013 05:38:30 -0400 Subject: [PATCH 2/2] [#3219] Removed random paste that was not intended. --- public/src/core/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/core/media.js b/public/src/core/media.js index 146f4daf3..9759cabe7 100644 --- a/public/src/core/media.js +++ b/public/src/core/media.js @@ -603,7 +603,7 @@ // grab first source as main source. sources.push( URI.makeUnique( url.shift() ).toString() ); for ( i = 0; i < url.length; i++ ) { - fallbacks.pusgetMetaDatah( URI.makeUnique( url[ i ] ).toString() ); + fallbacks.push( URI.makeUnique( url[ i ] ).toString() ); } firstSource = sources[ 0 ];