« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/thing/album.js110
1 files changed, 0 insertions, 110 deletions
diff --git a/src/thing/album.js b/src/thing/album.js
index 7be092e0..9899b6af 100644
--- a/src/thing/album.js
+++ b/src/thing/album.js
@@ -16,56 +16,7 @@ import {
     validateReferenceList,
 } from './validators.js';
 
-import {
-    aggregateThrows,
-    showAggregate,
-    withAggregate
-} from '../util/sugar.js';
-
 export default class Album extends Thing {
-    /*
-    #name = 'Unnamed Album';
-
-    #color = null;
-    #directory = null;
-    #urls = [];
-
-    #artists = [];
-    #coverArtists = [];
-    #trackCoverArtists = [];
-
-    #wallpaperArtists = [];
-    #wallpaperStyle = '';
-    #wallpaperFileExtension = 'jpg';
-
-    #bannerArtists = [];
-    #bannerStyle = '';
-    #bannerFileExtension = 'jpg';
-    #bannerDimensions = [0, 0];
-
-    #date = null;
-    #trackArtDate = null;
-    #coverArtDate = null;
-    #dateAddedToWiki = null;
-
-    #hasTrackArt = true;
-    #isMajorRelease = false;
-    #isListedOnHomepage = true;
-
-    #aka = '';
-    #groups = [];
-    #artTags = [];
-    #commentary = '';
-
-    #tracks = [];
-
-    static propertyError = {
-        name: Thing.extendPropertyError('name'),
-        directory: Thing.extendPropertyError('directory'),
-        tracks: Thing.extendPropertyError('tracks')
-    };
-    */
-
     static propertyDescriptors = {
         // Update & expose
 
@@ -241,65 +192,4 @@ export default class Album extends Thing {
             flags: {update: true}
         }
     };
-
-    /*
-    update(source) {
-        const err = this.constructor.propertyError;
-
-        withAggregate(aggregateThrows(Thing.UpdateError), ({ nest, filter, throws }) => {
-            if (source.name) {
-                nest(throws(err.name), ({ call }) => {
-                    if (call(validateName, source.name)) {
-                        this.#name = source.name;
-                    }
-                });
-            }
-
-            if (source.color) {
-                nest(throws(err.color), ({ call }) => {
-                    if (call(validateColor, source.color)) {
-                        this.#color = source.color;
-                    }
-                });
-            }
-
-            if (source.directory) {
-                nest(throws(err.directory), ({ call }) => {
-                    if (call(validateDirectory, source.directory)) {
-                        this.#directory = source.directory;
-                    }
-                });
-            }
-
-            if (source.tracks)
-                this.#tracks = filter(source.tracks, validateReference('track'), throws(err.tracks));
-        });
-    }
-
-    get name() { return this.#name; }
-    get directory() { return this.#directory; }
-    get tracks() { return this.#tracks; }
-    */
 }
-
-/*
-const album = new Album();
-
-console.log('tracks (before):', album.tracks);
-
-try {
-    album.update({
-        directory: 'oh yes',
-        tracks: [
-            'lol',
-            123,
-            'track:oh-yeah',
-            'group:what-am-i-doing-here'
-        ]
-    });
-} catch (error) {
-    showAggregate(error);
-}
-
-console.log('tracks (after):', album.tracks);
-*/