<commit_before>Settings = new Mongo.Collection("settings");

Meteor.publish('movies', function (){
    return Movies.find({});
});

Houston.add_collection(Settings);
Houston.add_collection(Movies);

if (!(Settings.findOne({_id: "couchpotatosetting"}))) {
    Settings.insert({
        _id: "couchpotatosetting",
        service: "CouchPotato",
        api: "http://192.168.0.1/api/<KEY>",
        enabled: false
    });
};

if (!(Settings.findOne({_id: "pushbulletsetting"}))) {
    Settings.insert({
        _id: "pushbulletsetting",
        service: "PushBullet",
        api: "<KEY>",
        enabled: false
    });
};

Meteor.methods({
    'addMovie' : function (movie, id) {
        Movies.insert({
            title: movie,
            imdb: id,
            downloaded: false,
            createdAt: new Date(),
            downloadedAt: false
        });
    },
    'pushBullet' : function (movie) {
        if (Settings.findOne({_id:"pushbulletsetting"}).enabled) {
            var pbAPI = Settings.findOne({_id:"pushbulletsetting"}).api; 
            Meteor.http.call("POST", "https://api.pushbullet.com/v2/pushes",
                             {auth: pbAPI + ":",<commit_msg>Added trailing slash to default CP api<commit_after>Settings = new Mongo.Collection("settings");

Meteor.publish('movies', function (){
    return Movies.find({});
});

Houston.add_collection(Settings);
Houston.add_collection(Movies);

if (!(Settings.findOne({_id: "couchpotatosetting"}))) {
    Settings.insert({
        _id: "couchpotatosetting",
        service: "CouchPotato",
        api: "http://192.168.0.1/api/<KEY>/",
        enabled: false
    });
};

if (!(Settings.findOne({_id: "pushbulletsetting"}))) {
    Settings.insert({
        _id: "pushbulletsetting",
        service: "PushBullet",
        api: "<KEY>",
        enabled: false
    });
};

Meteor.methods({
    'addMovie' : function (movie, id) {
        Movies.insert({
            title: movie,
            imdb: id,
            downloaded: false,
            createdAt: new Date(),
            downloadedAt: false
        });
    },
    'pushBullet' : function (movie) {
        if (Settings.findOne({_id:"pushbulletsetting"}).enabled) {
            var pbAPI = Settings.findOne({_id:"pushbulletsetting"}).api; 
            Meteor.http.call("POST", "https://api.pushbullet.com/v2/pushes",
                             {auth: pbAPI + ":",
{'fraction_non_alphanumeric': 0.16569282136894825, 'fraction_numerical': 0.007512520868113523, 'mean_word_length': 2.395184135977337, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3575716', 'n_tokens_mistral': 773, 'n_tokens_neox': 731, 'n_words': 130}