<commit_before>var PodcastManager;

(function(){
	var instance;

	PodcastManager = function() {
		if(instance) {
			return instance;
		}

		this.podcastList = [];

		this.addPodcast = function(url, afterLoad) {
			if(url !== '') {
				var that = this;
				chrome.storage.sync.get('podcastList', function(storageObject) {
					var syncPodcastList;

					if(typeof storageObject.podcastList === "undefined") {
						syncPodcastList = [];
					}
					else {
						syncPodcastList = storageObject.podcastList;
					}

					var podcastExistInStorage = false;
					syncPodcastList.forEach(function(podcast) {
						if(podcast.url && podcast.url === url) {
							podcastExistInStorage = true;
						}
					});

					if(podcastExistInStorage) {
						return;
					}

					var podcastForSync = {
						id: syncPodcastList.length + 1,
						url: url
					};

					syncPodcastList.push(podcastForSync);

					chrome.storage.sync.set({'podcastList': syncPodcastList});

					var podcast = new Podcast(podcastForSync.url, podcastForSync.id);

					that.podcastList.push(podcast);

					podcast.load(afterLoad);
				});
			}
		}

		this.deleteAllPodcasts = function () {
			chrome.storage.sync.set({'podcastList': []});
		}

		instance = this;
	}
})();<commit_msg>Clear list from manager on delAll<commit_after>var PodcastManager;

(function(){
	var instance;

	PodcastManager = function() {
		if(instance) {
			return instance;
		}

		this.podcastList = [];

		this.addPodcast = function(url, afterLoad) {
			if(url !== '') {
				var that = this;
				chrome.storage.sync.get('podcastList', function(storageObject) {
					var syncPodcastList;

					if(typeof storageObject.podcastList === "undefined") {
						syncPodcastList = [];
					}
					else {
						syncPodcastList = storageObject.podcastList;
					}

					var podcastExistInStorage = false;
					syncPodcastList.forEach(function(podcast) {
						if(podcast.url && podcast.url === url) {
							podcastExistInStorage = true;
						}
					});

					if(podcastExistInStorage) {
						return;
					}

					var podcastForSync = {
						id: syncPodcastList.length + 1,
						url: url
					};

					syncPodcastList.push(podcastForSync);

					chrome.storage.sync.set({'podcastList': syncPodcastList});

					var podcast = new Podcast(podcastForSync.url, podcastForSync.id);

					that.podcastList.push(podcast);

					podcast.load(afterLoad);
				});
			}
		}

		this.deleteAllPodcasts = function () {
			chrome.storage.sync.set({'podcastList': []});
			this.podcastList = [];
		}

		instance = this;
	}
})();
{'fraction_non_alphanumeric': 0.1346153846153846, 'fraction_numerical': 0.0007849293563579278, 'mean_word_length': 2.8562783661119515, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '210098', 'n_tokens_mistral': 1122, 'n_tokens_neox': 819, 'n_words': 130}