<commit_before>/*!
 * FM4cast - FM4 chromecast receiver/sender
 * http://sehaas.github.io/fm4cast
 *
 * Copyright 2013,2014 <NAME> (<EMAIL>)
 * Released under the MIT license
 *
 */

;( function( $ ) {

	CastSource = function(opts) {
		var defaultOpt = {
			title:null,
			url:null,
			logo:null,
			parent:null,
			children:[],
			text:null,
			date:null,
		};
		$.extend(defaultOpt, opts);
		this.title = defaultOpt.title;
		this.url = defaultOpt.url;
		this.logo = defaultOpt.logo;
		this.parent = defaultOpt.parent;
		this.children = defaultOpt.children;
		this.text = defaultOpt.text;
		this.date = defaultOpt.date;
	},

	CastSource.prototype = {
		getLogo : function() {
			if (this.logo) {
				return this.logo;
			}
			if (this.parent) {
				return this.parent.getLogo();
			}
			return null;
		},

		getTitle : function() {
			if (this.title) {
				return this.title;
			}
			if (this.parent) {
				return this.parent.getTitle();
			}
			return null;
		},

		addChild : function(child) {
			if (!child) {
				return;
			}
			child.parent = this;
			this.children.push(child);<commit_msg>make the CastSource contructor less complex<commit_after>/*!
 * FM4cast - FM4 chromecast receiver/sender
 * http://sehaas.github.io/fm4cast
 *
 * Copyright 2013,2014 <NAME> (<EMAIL>)
 * Released under the MIT license
 *
 */

;( function( $ ) {

	CastSource = function(opts) {
		this.title = null;
		this.url = null;
		this.logo = null;
		this.parent = null;
		this.children = [];
		this.text = null;
		this.date = null;

		$.extend(this, opts);
	},

	CastSource.prototype = {
		getLogo : function() {
			if (this.logo) {
				return this.logo;
			}
			if (this.parent) {
				return this.parent.getLogo();
			}
			return null;
		},

		getTitle : function() {
			if (this.title) {
				return this.title;
			}
			if (this.parent) {
				return this.parent.getTitle();
			}
			return null;
		},

		addChild : function(child) {
			if (!child) {
				return;
			}
			child.parent = this;
			this.children.push(child);
{'fraction_non_alphanumeric': 0.15119760479041916, 'fraction_numerical': 0.010978043912175649, 'mean_word_length': 2.733705772811918, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5647579', 'n_tokens_mistral': 870, 'n_tokens_neox': 716, 'n_words': 146}