
    M@c                     :    d dl Z d dlmZ d dlmZ  G d de      Zy)    N)id3)Pluginc                   B     e Zd ZdZdZdgZ fdZd Zed        Z	 xZ
S )GenreListPluginz-Display the full list of standard ID3 genres.zID3 v1 defined a list of genres and mapped them to to numeric values so they can be stored as a single byte.
It is *recommended* that these genres are used although most newer software (including eyeD3) does not care.genresc                 j    t         t        |   |       | j                  j	                  dddd       y )Nz-1z--single-column
store_truezList on genre per line.)actionhelp)superr   __init__	arg_groupadd_argument)self
arg_parser	__class__s     6/usr/lib/python3/dist-packages/eyed3/plugins/genres.pyr   zGenreListPlugin.__init__   s4    ot-j9##D*;L)B 	$ 	D    c                 &    | j                  |       y )N)_printGenres)r   argsconfigs      r   startzGenreListPlugin.start   s    $r   c           	         t         j                  D cg c](  }t        |      t        u rt         j                  |   |* }}|j	                          | j
                  r)|D ]#  }t        d|t         j                  |   fz         % y t        t        j                  t        t        |            dz              }t        |      D ]~  }|t        |      k  rd|t         j                  |   fz  }nd}|dz  t        |      k  r 	 d||z   t         j                  ||z      fz  }nd}t        |ddt        |      z
  z  z   |z           t        d       y c c}w # t        $ r Y  w xY w)Nz%3d: %s     (   )r   r   typeintsortsingle_columnprintmathceilfloatlenrange
IndexError)r   i	genre_idsgidoffsetc1c2s          r   r   zGenreListPlugin._printGenres   sW    !$

 I17c>cjjm.G  I	 I  :i3

3"889: 5Y#81#<=>F6] 8s9~%"aA%77BBES^+&!f*cjjV6L)MM BbC2B<01B678 "I-I" & s   -EE	E$#E$)__name__
__module____qualname__SUMMARYDESCRIPTIONNAMESr   r   staticmethodr   __classcell__)r   s   @r   r   r      s7    =GK
 JED
   r   r   )r$   eyed3r   eyed3.pluginsr   r    r   r   <module>r;      s       *f *r   