@command(('add\\s*(-?\\d[-,\\d\\s]{1,250})(%s)' % WORD))
def playlist_add(nums, playlist):
 nums = util.parse_multi(nums)
 if (not g.userpl.get(playlist)):
  playlist = playlist.replace(' ', '-')
  g.userpl[playlist] = Playlist(playlist)
 for songnum in nums:
  g.userpl[playlist].songs.append(g.model[(songnum - 1)])
  dur = g.userpl[playlist].duration
  f = (len(nums), playlist, len(g.userpl[playlist]), dur)
  g.message = (util.F('added to saved pl') % f)
 if nums:
  playlists.save()
 g.content = content.generate_songlist_display()

@ command ( ( 'add\\s*(-?\\d[-,\\d\\s]{1,250})(%s)' % WORD ) ) def playlist_add ( nums , playlist ) : nums = util . parse_multi ( nums ) if ( not g . userpl . get ( playlist ) ) : playlist = playlist . replace ( ' ' , '-' ) g . userpl [ playlist ] = Playlist ( playlist ) for songnum in nums : g . userpl [ playlist ] . songs . append ( g . model [ ( songnum - 1 ) ] ) dur = g . userpl [ playlist ] . duration f = ( len ( nums ) , playlist , len ( g . userpl [ playlist ] ) , dur ) g . message = ( util . F ( 'added to saved pl' ) % f ) if nums : playlists . save ( ) g . content = content . generate_songlist_display ( )
add selected song nums to saved playlist .