-- |
--
-- Copyright:
--   This file is part of the package vimeta. It is subject to the
--   license terms in the LICENSE file found in the top-level
--   directory of this distribution and at:
--
--     https://github.com/pjones/vimeta
--
--   No part of this package, including this file, may be copied,
--   modified, propagated, or distributed except according to the terms
--   contained in the LICENSE file.
--
-- License: BSD-2-Clause
module Vimeta.Core.Tagger
  ( Tagger (..),
    formatStringsForTagger,
  )
where

import qualified Data.Text as Text

data Tagger = AtomicParsley

formatStringsForTagger :: Tagger -> (Text, Text)
formatStringsForTagger :: Tagger -> (Text, Text)
formatStringsForTagger Tagger
AtomicParsley = (Text
apMovie, Text
apTV)

-- | Common strings for AtomicParsley.
apPrefix, apSuffix :: Text
apPrefix :: Text
apPrefix = Text
"AtomicParsley"
apSuffix :: Text
apSuffix = Text
"--overWrite"

-- | Format string for movies.
apMovie :: Text
apMovie :: Text
apMovie =
  Text -> [Text] -> Text
Text.intercalate
    Text
" "
    [ Text
apPrefix,
      Text
"%f",
      Text
"--stik value=9",
      Text
"%{--year %Y%}",
      Text
"--title %t",
      Text
"--description %d",
      Text
"%{--genre %G%}",
      Text
"--artwork REMOVE_ALL %{--artwork %a%}",
      Text
apSuffix
    ]

-- | Format string for TV episodes.
apTV :: Text
apTV :: Text
apTV =
  Text -> [Text] -> Text
Text.intercalate
    Text
" "
    [ Text
apPrefix,
      Text
"%f",
      Text
"--stik 'TV Show'",
      Text
"%{--year %Y%}",
      Text
"--title %t",
      Text
"--description %d",
      Text
"--TVShowName %n",
      Text
"--TVSeasonNum %s",
      Text
"--TVEpisodeNum %e",
      Text
"--tracknum %e",
      Text
"--artwork REMOVE_ALL %{--artwork %a%}",
      Text
apSuffix
    ]