Esempio n. 1
0
        private void OnFileUploaded(KarmaLib.Song song)
        {
            KarmaTrackInfo karma_track = new KarmaTrackInfo(song, mount_point);

            karma_track.PrimarySource = this;
            karma_track.Save(false);
            track_map[karma_track.TrackId] = karma_track;
        }
Esempio n. 2
0
 private void ReloadDatabase()
 {
     foreach (KarmaLib.Song song in device.GetSongs())
     {
         KarmaTrackInfo track = new KarmaTrackInfo(song,
                                                   mount_point);
         track.PrimarySource = this;
         track.Save(false);
         track_map[track.TrackId] = track;
     }
 }
Esempio n. 3
0
        protected override bool DeleteTrack(DatabaseTrackInfo track)
        {
            KarmaTrackInfo karma_track = track_map[track.TrackId];

            if (karma_track == null)
            {
                return(true);
            }

            lock (device) {
                device.DeleteSong(karma_track.KarmaId);
                device.Save();
                track_map.Remove(track.TrackId);
            }

            return(true);
        }
Esempio n. 4
0
 private void ReloadDatabase()
 {
     foreach (KarmaLib.Song song in device.GetSongs()) {
         KarmaTrackInfo track = new KarmaTrackInfo(song,
             mount_point);
         track.PrimarySource = this;
         track.Save(false);
         track_map[track.TrackId] = track;
     }
 }
Esempio n. 5
0
 private void OnFileUploaded(KarmaLib.Song song)
 {
     KarmaTrackInfo karma_track = new KarmaTrackInfo(song, mount_point);
     karma_track.PrimarySource = this;
     karma_track.Save(false);
     track_map[karma_track.TrackId] = karma_track;
 }