
    Şi                     Z    d dl Z d dlZddlmZ ddlmZmZmZmZm	Z	  G d de          Z
dS )    N   )PostProcessor   )PostProcessingErrorXAttrMetadataErrorXAttrUnavailableErrorhyphenate_datewrite_xattrc                   0    e Zd ZdZddddddddZd	Zd
 ZdS )XAttrMetadataPPa  Set extended attributes on downloaded file (if xattr support is found)

    More info about extended attributes for media:
        http://freedesktop.org/wiki/CommonExtendedAttributes/
        http://www.freedesktop.org/wiki/PhreedomDraft/
        http://dublincore.org/documents/usageguide/elements.shtml

    TODO:
        * capture youtube keywords and put them in 'user.dublincore.subject' (comma-separated)
        * figure out which xattrs can be used for 'duration', 'thumbnail', 'resolution'
    webpage_urltitleupload_dateuploaderformatdescription)zuser.xdg.referrer.urlzuser.dublincore.titlezuser.dublincore.datezuser.dublincore.contributorzuser.dublincore.formatzuser.dublincore.description$com.apple.metadata:kMDItemWhereFromsz<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
	<string>%s</string>
</array>
</plist>c                 >   t          j        |d                   j        }|                     d           | j                                        D ].\  }}	 |                    |          }|r`|dk    rt          |          }n!|dk    rt          j	        dk    rK| j
        |z  }t          |d         ||                                           # t          $ r!}t          t          |                    d }~wt           $ r{}|j        dk    r|                     d| d           nK|j        d	k    r|                     d
| d           n&t           j        dk    rdnd}t          d|           Y d }~(d }~ww xY w|                     |d         ||           g |fS )Nfilepathz!Writing metadata to file's xattrsr   r   darwinNO_SPACEzhThere's no disk space left, disk quota exceeded or filesystem xattr limit exceeded. Extended attribute "z" was not written.VALUE_TOO_LONGz$Unable to write extended attribute "z" due to too long values.ntzYou need to use NTFSz0You may have to enable them in your "/etc/fstab"z5This filesystem doesn't support extended attributes. )osstatst_mtime	to_screenXATTR_MAPPINGitemsgetr	   sysplatformAPPLE_PLIST_TEMPLATEr
   encoder   r   strr   reasonreport_warningname	try_utime)selfinfomtime	xattrnameinfonamevalueetips           aC:\Users\betacode\Desktop\descargarYoutube\venv\Lib\site-packages\yt_dlp/postprocessor/xattrpp.pyrunzXAttrMetadataPP.run0   s   Z())2;<<<#'#5#;#;#=#= 	n 	nIxn** M=00 .u 5 5"&LLL<833$ $ 9E AZ 0)U\\^^LLL( 2 2 2)#a&&111% 
n 
n 
n8z))''M/8M M MN N N N X!111''(sy(s(s(stttt57W__11 R -.lgj.l.lmmm
n 	tJ'6664xs,   AC3C
E;C33E; A0E66E;N)__name__
__module____qualname____doc__r   r#   r3        r2   r   r      sZ        
 
 "/!( -'1"* (50= M    r9   r   )r   r!   commonr   utilsr   r   r   r	   r
   r   r8   r9   r2   <module>r<      s    				 



 ! ! ! ! ! !             A A A A Am A A A A Ar9   