<commit_before>( function( mw, $ ) { "use strict";
mw.PlaylistHandlerMediaRss = function( playlist ){
	return this.init( playlist );
};

mw.PlaylistHandlerMediaRss.prototype = {
	// Set the media rss namespace
	mediaNS: 'http://search.yahoo.com/mrss/',

	// If playback should continue to the next clip on clip complete
	autoContinue: true,

	// if the playlist should automatically start:
	autoPlay: false,

	// If the playlist ui should be displayed
	includeInLayout: true,

	init: function ( playlist ){
		this.playlist = playlist;
	},

	/**
	 * Load the playlist source file with a callback
	 */
	loadPlaylist: function( callback ){
		var _this = this;
		// check if we already have the $rss loaded
		if( this.$rss ){
			callback( this.$rss );
			return ;
		}
		// Check if we have the source pre-loaded:
		if( this.getSrcPayLoad() ) {
			var xmlDoc =  $.parseXML( this.getSrcPayLoad() );
			this.$rss = $( xmlDoc );
			callback( _this.$rss );
			return ;
		}
		// Check if the source is valid:
		if( !_this.getSrc() ){
			mw.log("PlaylistHandlerMediaRSS:: missing sourc");
			this.$rss= $();
			callback( this.$rss );
			return ;
		}

		// Show an error if a cross domain request:
		if( mw.isLocalDomain( this.getSrc() ) ) {
			// Note this only works with local sources
			$.get( mw.absoluteUrl( this.getSrc() ), function( data ){
				// jQuery already converts data into xmlDoc so the following is not needed:
				// var xmlDoc =  $.parseXML( data );
				_this.$rss = $( data );
				callback( _this.$rss );
			});
		} else {
			new mw.ajaxProxy({
				url: _this.getSrc(),
				success: function( resultXML ) {
					_this.$rss = $( resultXML );
					callback( _this.$rss );
				},<commit_msg>Playlist: Continue instead of setting empty playlist<commit_after>( function( mw, $ ) { "use strict";
mw.PlaylistHandlerMediaRss = function( playlist ){
	return this.init( playlist );
};

mw.PlaylistHandlerMediaRss.prototype = {
	// Set the media rss namespace
	mediaNS: 'http://search.yahoo.com/mrss/',

	// If playback should continue to the next clip on clip complete
	autoContinue: true,

	// if the playlist should automatically start:
	autoPlay: false,

	// If the playlist ui should be displayed
	includeInLayout: true,

	init: function ( playlist ){
		this.playlist = playlist;
	},

	/**
	 * Load the playlist source file with a callback
	 */
	loadPlaylist: function( callback ){
		var _this = this;
		// check if we already have the $rss loaded
		if( this.$rss ){
			callback( this.$rss );
			return ;
		}
		// Check if we have the source pre-loaded:
		if( this.getSrcPayLoad() ) {
			var xmlDoc =  $.parseXML( this.getSrcPayLoad() );
			this.$rss = $( xmlDoc );
			callback( _this.$rss );
			return ;
		}
		// Check if the source is valid:
		if( !_this.getSrc() ){
			mw.log("PlaylistHandlerMediaRSS:: missing sourc");
			return ;
		}

		// Show an error if a cross domain request:
		if( mw.isLocalDomain( this.getSrc() ) ) {
			// Note this only works with local sources
			$.get( mw.absoluteUrl( this.getSrc() ), function( data ){
				// jQuery already converts data into xmlDoc so the following is not needed:
				// var xmlDoc =  $.parseXML( data );
				_this.$rss = $( data );
				callback( _this.$rss );
			});
		} else {
			new mw.ajaxProxy({
				url: _this.getSrc(),
				success: function( resultXML ) {
					_this.$rss = $( resultXML );
					callback( _this.$rss );
				},
{'fraction_non_alphanumeric': 0.13547815820543094, 'fraction_numerical': 0.0, 'mean_word_length': 2.968384074941452, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2272203', 'n_tokens_mistral': 1247, 'n_tokens_neox': 1077, 'n_words': 341}