<commit_before>//https://github.com/eddiemoore/angular-spotify
var app = angular.module('myApp.home', ['ngRoute', 'spotify']);

app.config(['$routeProvider', 'SpotifyProvider', function($routeProvider, SpotifyProvider) {
  $routeProvider.when('/home', {
    templateUrl: 'home/home.html',
    controller: 'SpotifyCtrl'
  });

  SpotifyProvider.setClientId('0e03bdcf17e940d4a25ad0b7f28f957e');
  SpotifyProvider.setRedirectUri('http://localhost:8000/app/callback.html');
  SpotifyProvider.setScope('user-follow-read user-follow-modify user-read-private playlist-read-private playlist-modify-private playlist-modify-public');
  // If you already have an auth token
  SpotifyProvider.setAuthToken('<PASSWORD>');
}]);

app.controller('SpotifyCtrl', function($scope, Spotify){

    $scope.searchtype = 'artist';
    $scope.error = false;
    $scope.searchArtist = function () {
      Spotify.search($scope.searchartist, $scope.searchtype).then(function (data) {
        $scope.error = false;
        
        if($scope.searchtype == 'artist'){
          $scope.artists = data.artists.items;
          console.log($scope.artists);
        }
        if($scope.searchtype == 'album'){
          $scope.artists = data.albums.items;
        }
      }).catch(function(fallback) {
        console.log('fallback -> '+fallback);
        $scope.error = true;
      });
    };

    $('#radioBtn a').on('click', function(){
        var sel = $(this).data('title');
        var tog = $(this).data('toggle');
        $('#'+tog).prop('value', sel);
        $scope.searchtype = sel;
        $scope.searchArtist();
        $('a[data-toggle="'+tog+'"]').not('[data-title="'+sel+'"]').removeClass('active').addClass('notActive');
        $('a[data-toggle="'+tog+'"][data-title="'+sel+'"]').removeClass('notActive').addClass('active');
    });
    
    
});

<commit_msg>Updated link list<commit_after>//https://github.com/eddiemoore/angular-spotify
var app = angular.module('myApp.home', ['ngRoute', 'spotify']);

app.config(['$routeProvider', 'SpotifyProvider', function($routeProvider, SpotifyProvider) {
  $routeProvider.when('/home', {
    templateUrl: 'home/home.html',
    controller: 'SpotifyCtrl'
  });

  SpotifyProvider.setClientId('0e03bdcf17e940d4a25ad0b7f28f957e');
  SpotifyProvider.setRedirectUri('http://localhost:8000/app/callback.html');
  SpotifyProvider.setScope('user-follow-read user-follow-modify user-read-private playlist-read-private playlist-modify-private playlist-modify-public');
  // If you already have an auth token
  SpotifyProvider.setAuthToken('<PASSWORD>');
}]);

app.controller('SpotifyCtrl', function($scope, Spotify){

    $scope.searchtype = 'artist';
    $scope.error = false;
    $scope.searchArtist = function () {
      Spotify.search($scope.searchartist, $scope.searchtype).then(function (data) {
        $scope.error = false;
        
        if($scope.searchtype == 'artist'){
          $scope.artists = data.artists.items;
        }
        if($scope.searchtype == 'album'){
          $scope.artists = data.albums.items;
        }
      }).catch(function(fallback) {
        $scope.error = true;
      });
    };

    $('#radioBtn a').on('click', function(){
        var sel = $(this).data('title');
        var tog = $(this).data('toggle');
        $('#'+tog).prop('value', sel);
        $scope.searchtype = sel;
        $scope.searchArtist();
        $('a[data-toggle="'+tog+'"]').not('[data-title="'+sel+'"]').removeClass('active').addClass('notActive');
        $('a[data-toggle="'+tog+'"][data-title="'+sel+'"]').removeClass('notActive').addClass('active');
    });
    
    
});


{'fraction_non_alphanumeric': 0.1952367765162005, 'fraction_numerical': 0.012184990307394073, 'mean_word_length': 3.520650813516896, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 2, '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': '458047', 'n_tokens_mistral': 1184, 'n_tokens_neox': 1159, 'n_words': 149}