{"id":191,"date":"2009-08-02T21:41:00","date_gmt":"2009-08-02T21:41:00","guid":{"rendered":"http:\/\/aldarias.es\/wordpress\/?p=191"},"modified":"2009-08-02T21:41:00","modified_gmt":"2009-08-02T21:41:00","slug":"mt3-4-creative-zen-mosaic-en-linux","status":"publish","type":"post","link":"http:\/\/aldarias.es\/wordpress\/?p=191","title":{"rendered":"MT3\/4: CREATIVE ZEN MOSAIC EN LINUX"},"content":{"rendered":"<p>A continuaci\u00f3n veremos comandos de consula para gestionar<br \/>un dispositivo con protocolo MTP, desde consola linux,<br \/>unsando las funciones de libreria mtp.<\/p>\n<p><span style=\"color: rgb(255, 0, 0); font-weight: bold;\">QUE NECESITAMOS INSTALAR<\/span><\/p>\n<p>sudo aptitude install mtp-tools<\/p>\n<p><span style=\"font-weight: bold; color: rgb(255, 0, 0);\">ESTADO DEL DISPOSITIVO<\/span><\/p>\n<p><span style=\"font-size:130%;\">Para gestionarlo desde consola:<\/span><\/p>\n<p><span style=\"font-weight: bold;\">mtp-detect<\/span><br \/>Conocer la carga de bateria, y otraas propiedades<\/p>\n<p>libmtp version: 0.3.0<br \/>Listing raw device(s)<br \/>Device 0 (VID=041e and PID=4161) is UNKNOWN.<br \/>Please report this VID\/PID and the device model to the libmtp development team<br \/>Found 1 device(s):<br \/>041e:4161 @ bus 0, dev 9<br \/>Attempting to connect device(s)<br \/>PTP: Opening session<\/p>\n<p><span style=\"font-weight: bold;\">mtp-detect | grep Space<\/span><\/p>\n<p>Ver espacio disponible<\/p>\n<p><span style=\"font-weight: bold;\">mtp-detect | grep Capacity<\/span><\/p>\n<p>Ver capacidad total<\/p>\n<p><span style=\"font-weight: bold;\">mtp-detect | awk &#8216;\/Battery level\/ {print $6}&#8217; | cut -d \u00ab(\u00bb -f2 | cut -d \u00ab%\u00bb -f1<\/span><\/p>\n<p>Permite ver carga de bateria.<\/p>\n<p><span style=\"font-weight: bold; color: rgb(255, 0, 0);\">LISTAS DE REPRODUCCION<\/span><\/p>\n<p><span style=\"font-weight: bold;\">mtp-playlists<\/span><br \/>Muestra todas las (play list) listas de reprodccion con sus mp3.<\/p>\n<p>Ejemplo:<\/p>\n<blockquote><p>Playlist ID: 105932<br \/>Name: rosa<br \/>Parent ID: 100<br \/>Tracks:<br \/>69564: RosaVientosPodcast.com &#8211; RVP #409 (13 Julio 2009)<br \/>70752: RosaVientosPodcast.com &#8211; RVP #408 (12 Julio 2009)<br \/>&#8230;<\/p>\n<\/blockquote>\n<p><span style=\"font-weight: bold;\">mtp-getplaylist id<\/span><br \/>Muestra una playlist<\/p>\n<blockquote><p>Ejemplo:<br \/>mtp-getplaylist 105932<br \/>libmtp version: 0.3.0<br \/>Device 0 (VID=041e and PID=4161) is UNKNOWN.<br \/>Please report this VID\/PID and the device model to the libmtp development team<br \/>PTP: Opening session<br \/>Number of items: 28<br \/>69564: RosaVientosPodcast.com &#8211; RVP #409 (13 Julio 2009)<br \/>70752: RosaVientosPodcast.com &#8211; RVP #408 (12 Julio 2009)<\/p>\n<p><\/p><\/blockquote>\n<p><span style=\"font-weight: bold;\">mtp-getplaylist -n playlistid<\/span><br \/><span>Borra lista<\/span><span style=\"font-weight: bold;\"><\/p>\n<p>mtp-newplaylist -i  16777249 -i 16777247 -i 16777224 -n milista<br \/><\/span><span>Introduce ficheros de m\u00fasica con File ID <\/span><span style=\"font-weight: bold;\"> <\/span><span>16777249,<\/span><span>16777247,<\/span><span>16777224<\/span><span style=\"font-weight: bold;\"> <\/span><span> dentro<\/span><span> de una lista de reproducci\u00f3n llamada milista, la cual la crea si no existe.<\/span><span style=\"font-weight: bold;\"> <\/span><span>Podemos ver los File ID con la orden mtp-files<\/span><span style=\"font-weight: bold;\">.<br \/><\/span><span style=\"font-weight: bold;\"><br \/><\/span><\/p>\n<p><span style=\"font-weight: bold; color: rgb(255, 0, 0);\">GESTION DE FICHEROS<\/span><\/p>\n<p><span style=\"font-weight: bold;\">mtp-files    &#8211; lista los ficheros<\/span><\/p>\n<blockquote><p>Ejemplo:<br \/>File ID: 110740<br \/>Filename: 20090209.mp3<br \/>File size 38723605 (0x00000000024EE015) bytes<br \/>Parent ID: 96<br \/>Storage ID: 0x00010001<br \/>Filetype: ISO MPEG-1 Audio Layer 3<br \/>File ID: 111925<br \/>Filename: 20090208.mp3<br \/>File size 38629147 (0x00000000024D6F1B) bytes<br \/>Parent ID: 96<br \/>Storage ID: 0x00010001<br \/>Filetype: ISO MPEG-1 Audio Layer 3<\/p><\/blockquote>\n<p><span style=\"font-weight: bold;\">mtp-delfile<\/span>   fichero &#8211; borra los ficheros<\/p>\n<p><span style=\"font-weight: bold;\">mtp-getfile<\/span>  &#8211; coge un fichero<\/p>\n<p><span style=\"font-weight: bold;\">mtp-sendfile  fichero-origen fichero-destino<\/span><br \/>Envia un fichero<\/p>\n<blockquote><p>Ejemplo:<br \/>mtp-sendfile 20090706.mp3 20090706.mp3<br \/>Your system does not appear to have UTF-8 enabled ($LANG=\u00bbes_ES.UTF-8&#8243;)<br \/>If you want to have support for diacritics and Unicode characters,<br \/>please switch your locale to an UTF-8 locale, e.g. \u00aben_US.UTF-8\u00bb.<br \/>libmtp version: 0.3.0<\/p>\n<p>Device 0 (VID=041e and PID=4161) is UNKNOWN.<br \/>Please report this VID\/PID and the device model to the libmtp development team<br \/>PTP: Opening session<br \/>Sending 20090706.mp3 to 20090706.mp3<br \/>type:mp3,1<br \/>Sending file&#8230;<br \/>Progress: 39621060 of 39621060 (100%)<br \/>New file ID: 45632<br \/>PTP: Closing session<\/p>\n<p><span style=\"font-weight: bold;\">mtp-sendfile<\/span> audio.mp3 -f U2<br \/>Envia  un el fichero f.mp3 a la carpeta U2<\/p>\n<p><span style=\"font-weight: bold;\">mtp-tracks<\/span><br \/>Muestra las pistas grabadas.<\/p>\n<p><span style=\"font-weight: bold;\">Grabar todos los mp3 nuevos de una carpeta<\/span><br \/>ls  -la | grep mp3  | awk &#8216;{print $8}&#8217; >  temp.txt<\/p>\n<p>for i in $(cat   temp.txt);do<br \/>echo $i<br \/>existe=0<br \/>for j in $(mtp-tracks | awk  &#8216;\/Origfilename\/ {print $2}&#8217;);do<br \/>if [ $i = $j ];then<br \/>existe=1<br \/>echo \u00abexiste\u00bb<br \/>fi<br \/>done<br \/>if [ $existe -eq 0  ];then<br \/>echo \u00abGrabando $i\u00bb<br \/>mtp-sendfile $i  Music\/$i<br \/>fi<br \/>done<\/p>\n<\/blockquote>\n<p><span style=\"font-weight: bold; color: rgb(255, 0, 0);\">GESTION DE CARPETAS<\/span><\/p>\n<p><span style=\"font-weight: bold;\">mtp-folders<\/span>  Muestra lista de carpetas<\/p>\n<p>Attempting to connect device(s)<br \/>Device 0 (VID=041e and PID=4161) is a Creative ZEN Mozaic.<br \/>mtp-folders: Successfully connected<br \/>Friendly name: paco aldarias<br \/>96    Music<br \/>2331      ACM Music<br \/>100    My Playlists<br \/>104    My Recordings<\/p>\n<p><span style=\"font-weight: bold;\">mtp-newfolder<\/span> U2 96<br \/>El numero es la carpeta padre llamada Music<\/p>\n<p><span style=\"font-weight: bold;\">Administrador de archivos<\/span><br \/>Si queremos gestionarlo mediante el <span style=\"font-size:130%;\">administrador de archivos<\/span>,  haremos:<br \/>sudo \/sbin\/modprobe fuse<br \/>mkdir $HOME\/zen<br \/>mtpfs $HOME\/zen<br \/>nautilus $HOME\/zen<\/p>\n<p><span style=\"color: rgb(255, 0, 0); font-weight: bold;\">SCRIPT<\/span><br \/><a href=\"http:\/\/dl.dropbox.com\/u\/1165599\/zen.sh\">zen.sh<\/a><br \/>Descargarlo y ejecutarlo con:<br \/>bash .\/zen.sh<\/p>\n<p><span style=\"font-weight: bold; color: rgb(255, 0, 0);\">BIBLIOGRAF\u00cdA.<\/span><\/p>\n<ol>\n<li>Linux Magazine. N\u00famero. 53. Art\u00edculo MTP en Linux. P\u00e1gina 25.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>A continuaci\u00f3n veremos comandos de consula para gestionarun dispositivo con protocolo MTP, desde consola linux,unsando las funciones de libreria mtp. QUE NECESITAMOS INSTALAR sudo aptitude install mtp-tools ESTADO DEL DISPOSITIVO Para gestionarlo desde consola: mtp-detectConocer la carga de bateria, y &hellip; <a href=\"http:\/\/aldarias.es\/wordpress\/?p=191\">Sigue leyendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"episode_type":"","audio_file":"","podmotor_file_id":"","podmotor_episode_id":"","cover_image":"","cover_image_id":"","duration":"","filesize":"","filesize_raw":"","date_recorded":"","explicit":"","block":"","itunes_episode_number":"","itunes_title":"","itunes_season_number":"","itunes_episode_type":"","footnotes":""},"categories":[241,16,242,22,243,240],"tags":[],"class_list":["post-191","post","type-post","status-publish","format-standard","hentry","category-creative","category-linux","category-mosaic","category-mp3","category-mtp","category-zen"],"_links":{"self":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=191"}],"version-history":[{"count":0,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/191\/revisions"}],"wp:attachment":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}