Complete Album vs $is_complete() when duplicate tracks exist?


#1

My script separates files by extension / type / bitrate if mp3, into separate base directories for complete vs. incomplete albums.

The third entry is a complete album, twice- one as FLAC, one as MP3. While it is technically complete, because there are extra tracks, $is_complete() is false.

If I delete all of either format then $is_complete() is true and the saved files will be in the path for completed albums but if I leave it like that then they’re both saved as intended except in /librarypath/incomplete/O/Oingo Boingo …

Screen%20Shot%2012

$upper(%_extension%/)
$noop(★ Incomplete in custom directory ★)
$if(%_isIncomplete%,%_incompleteFolder%/,)
$noop(★ Separate Lossy/Lossess types at root directory - Requires plugin ★)
$if($is_lossless(),%_losslessSubFolder%,%_lossySubFolder%/)
$noop(★ Soundtrack in custom directory ★)
$if(%_isSoundTrack%,%_soundTracksFolder%,

  $noop(★ Various in custom directory ★)
  $if(%_isVarious%,%_variousArtistsFolder%,

    $noop(★ Order root by category ★)
    $if($eq(%_orderTypeForRoot%,1),
      $if2(%albumgrouping%,Unknown)
    )/

    $noop(★ Order root by artist ★)
    $if($eq(%_orderTypeForRoot%,2),

      $if($eq(%_orderTypeForArtist%,1),
        $upper($firstalphachar($if2(%_albumartistForFilename%, %_artistForFilename%),#)),
      $if($eq(%_orderTypeForArtist%,2),
        $upper($firstalphachar($if2(%_albumartistsortForFilename%, %_artistsortForFilename%),#))
      ))
    )/

    $noop(★ Artist with first letter of first name ★)
    $if($eq(%_orderTypeForArtist%,1),
      $if2(%_albumartistForFilename%,%_artistForFilename%)
    )/

    $noop(★ Artist with first letter of last name ★)
    $if($eq(%_orderTypeForArtist%,2),
      $if2(%_albumartistsortForFilename%,%_artistsortForFilename%)
    )/

    $noop(★ Organize by type ★)
    $if($eq(%_separateByTypeInArtistFolder%,1),
      $if($or(%_isArtistCompil%,%_isGlobalCompil%),%_compilationsSubFolder%,
        $if($eq(%_isLive%,1),%_liveSubFolder%,
          $if($eq(%_isAlbum%,1),
            $if($eq(%_separateAlbum%,1),%_albumSubFolder%)
            )
            $if($eq(%_isSingle%,1),%_singlesSubFolder%)
            $if($eq(%_isEP%,1),%_epSubFolder%)
            $if($eq(%_isBroadcast%,1),%_broadcastSubFolder%)
            $if($eq(%_isVideo%,1),%_videoSubFolder%)
            $if($eq(%_isOther%,1),%_otherSubFolder%)
          )
        )
      )
    )
  )

$noop(★ Album - YEAR [Media-Type][CDx~subtitle]/ or /CDx~subtitle/ ★)

%_albumForFilename% - 

$if($if2(%date%,%originalyear%,%originaldate%),$left($if2(%date%,%originalyear%,%originaldate%),4),0000)
$if($ne(%media%,CD), $if(%media%,[%media%]))

$noop($set(_numbr,$left(%_bitrate%,3)))
$set(_numbr,$div(%_bitrate%,1000))

$if($eq(%_bitrate%,320.0),$set(_folderbr,320),
$if($eq(%_bitrate%,256.0),$set(_folderbr,256),
$if($eq(%_bitrate%,192.0),$set(_folderbr,192),
$if($eq(%_bitrate%,160.0),$set(_folderbr,160),
$if($eq(%_bitrate%,128.0),$set(_folderbr,128),
$if($eq(%_bitrate%,64.0),$set(_folderbr,64)))))))
$if(%_folderbr%,,
$if($gte(%_numbr%,220),$set(_folderbr,V0),
$if($lt(%_numbr%,220),$set(_folderbr,V2),
$set(_folderbr,Err1)
)))
$if($eq($upper(%_extension%),MP3), [%_folderbr%K %_sample_rate% %_channels%])

$if($gt(%totaldiscs%,1),$noop(
  )$if($lt(%totaldiscs%,10),$set(_discnumber, %discnumber%),$set(_discnumber,$num(%discnumber%,2)))$noop(
  )$if($in(%media%,Vinyl),$noop(
    )$set(_nameForDiscFolder,@OSLASH@@OBRACKET@%_nameForTypeVinyl%%_discnumber%@CBRACKET@),$noop(
    )$set(_nameForDiscFolder,@OSLASH@@OBRACKET@%_nameForTypeCD%%_discnumber%@CBRACKET@))$noop(
    )$if($and(%_discsubtitleForFilename%,$eq(%_showDiscSubtitle%,1)),$set(_nameForDiscFolder,%_nameForDiscFolder% - %_discsubtitleForFilename%))$noop(
    )$if($eq(%_useSubDiscFolder%,1),$noop(
      )$set(_nameForDiscFolder,$replace(%_nameForDiscFolder%,@OSLASH@@OBRACKET@,/))$noop(
      )$set(_nameForDiscFolder,$replace(%_nameForDiscFolder%,@CBRACKET@,)),$noop(
      )$if($eq(%_mergeDiscWhenNotUsingSubfolder%,1),$noop(
        )$unset(_nameForDiscFolder),$noop(
        )$set(_nameForDiscFolder,$replace(%_nameForDiscFolder%,@OSLASH@@OBRACKET@,[))$noop(
        )$set(_nameForDiscFolder,$replace(%_nameForDiscFolder%,@CBRACKET@,]))$noop(
      ))$noop(
    ))$noop(
    )$if(%_nameForDiscFolder%, %_nameForDiscFolder%)
)/

$noop(★ Track. Title ★)
$if($in(%media%,Vinyl),$noop(
  )$if($eq(%_useMusicBrainzStyleForVinylTrack%,1),$noop(
    )$if(%_musicbrainz_tracknumber%,%_musicbrainz_tracknumber%. )$noop(
  )),$noop(
  )$if(%tracknumber%,$if($gt(%totaldiscs%,1),$if($and($eq(%_useSubDiscFolder%,0),$eq(%_mergeDiscWhenNotUsingSubfolder%,1)),%discnumber%))$num(%tracknumber%,2). )
)
%_titleForFilename%

#2

Hello, thank you for your sharing, I will integrate it into my script.