Make editing easier
This commit is contained in:
parent
fbc76ea62a
commit
33ba8e3845
13
badwitch.py
13
badwitch.py
@ -143,13 +143,22 @@ class BadWitch:
|
|||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
in_album = input('\tAlbum: ')
|
in_album = input('\tAlbum: ')
|
||||||
in_artist = input('\tArtist: ')
|
auto_artist = input('\tArtist (leave blank to assign per song): ')
|
||||||
|
auto_track = int(input('\tStarting track number (leave blank to assign per song): ') or -1)
|
||||||
if in_album not in lib.albums:
|
if in_album not in lib.albums:
|
||||||
lib.albums[in_album] = {}
|
lib.albums[in_album] = {}
|
||||||
album = lib.albums[in_album]
|
album = lib.albums[in_album]
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
in_song = input('\t\tSong title: ')
|
in_song = input('\t\tSong title: ')
|
||||||
|
if auto_artist is not '':
|
||||||
|
in_artist = auto_artist
|
||||||
|
else:
|
||||||
|
in_artist = input('\t\tArtist: ')
|
||||||
|
if auto_track is not -1:
|
||||||
|
in_track = auto_track
|
||||||
|
auto_track += 1
|
||||||
|
else:
|
||||||
in_track = input('\t\tTrack number: ')
|
in_track = input('\t\tTrack number: ')
|
||||||
in_source = input('\t\tSource URL: ')
|
in_source = input('\t\tSource URL: ')
|
||||||
# Only assign values if we gave them
|
# Only assign values if we gave them
|
||||||
@ -157,7 +166,7 @@ class BadWitch:
|
|||||||
album[in_song] = {}
|
album[in_song] = {}
|
||||||
song = album[in_song]
|
song = album[in_song]
|
||||||
if in_track is not '': song['track'] = int(in_track)
|
if in_track is not '': song['track'] = int(in_track)
|
||||||
if in_artist is not '': song['artist'] = in_artist
|
if auto_artist is not '': song['artist'] = in_artist
|
||||||
if in_source is not '': song['source'] = in_source
|
if in_source is not '': song['source'] = in_source
|
||||||
# Bail if song is bad
|
# Bail if song is bad
|
||||||
for field in ['track', 'artist', 'source']:
|
for field in ['track', 'artist', 'source']:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user