Media Library

From AwkwardTV
Revision as of 06:20, 19 August 2007 by Uw1Nci (talk | contribs)
Jump to: navigation, search

una guida per luomo sposato linea effe snc fate eos d1 www s el 42 mercedes 500 sl nokia gsm 900 eileen regina edwards screesavers gioco tavolo online telecomando tv accessori mattioli gioielli gioch i inps di brindisi kettler vario gym windows cal camisea dolce gabbana camicie il dono ps tray factory 1.94 jeans diesel 30 fax e stampante roma 1 giorno just like dath www genialloyd it omaggio floreale roma signora delle genti philips 107p50 opel diesel cristina grillo sesso anale giocattoli e bambole cronache del terzo millennio l amico e baldan bembo dario amd athlon xp processori giochi vecchi arbaud, joseph d- ariston incasso aaa di marino francesco tizianoferro morand av8-3rd eye abit midi marcia nunziale legge tognoli normativa seno suggest link jethro tull numeri privati olbia napoli biglietti aerei videogiochi gratis progettazione giardini sex jenifer lopez kodak ultra www regione ipod custodie arma candy ctd 10 yanni boys be. disco 3 atoll mantova eminem video like toy soldiers navionics gold trucchi giochi playstation opel corsa 1.4 swing sex viet nam www l ultimo samurai it a che prezzo hollywood californication tabs esame maturita 2004 seconda prova annunci foto gay furti al supermecato baite montagna tatuaggi soleluna zaini monospalla racconti erotici moglie lavatrice a 1200 alto tu no dei gemelli diversi nx6110 740 usb charger indesit wil 80 pera nikkor 24mm web sites monitoring be ther for you furgone usato mp3 creative lettori lettori mp3 creative muvo pagine bianche pasticceria domenica hard disk hitachi 80 gb cavalleria rusticana penny market vanilla nija fendi donna www musica italiana com pettinature moda il cammino delle stelle paolo conte via con me anagrammare parole guerlain issima perfect white c dvd 8x hp da 100 screensaver signore anello monitor computer lcd sony lopez, sabatino lettore scrittore card cazzotti lettori mp3 lg mantels the mission morricone annuncio coppia veneto donne in cerca di sesso satcodx impero dei franchi audi a3 padova lavoro autista catania visura catastale renault espace turbodiesel misrepresented people katie price sexy negozi pesca sportiva amore e morte nel giardino degli dei illegal baby sex notre deme de paris la suora bianca router netgear usb acrobat capture porta batterie adattatore da ps2 a usb nomi in cinese studies and development of digital signature technologies by smart card on handheld devices i-mate pda2k gps travestito mouse nero sony hc30 aggiornamenti cagliari decapitazione uomo americano seether and amy lee sadica los angeles de charly honda cbr 900 gico con mucche celeron 330j www laura engel it giochiamo san marco steptoe and son doctorate degree sexys sesso hard cazzi grossi in figa donizzetti la zingara oggettistica bacio tra paola e chiara fastweb modem sorry seems to be the hardest world blue voir un ami pleure yugioh scarica victor hugo deep spirit lonley bicicletta city auto polo anno 2002 oggetti in culo toner samsung clp-500 lcd benq fp71e dymo labelwriter 400 turbo sigma 70-200 f 2 8 brigitta kovacs veritas backup exec server samsung yh-920 20 gb agenzia matrimoniale varese elezioni organi collegiali genitori latino americanas abbigliamento al dettaglio marzotto total strider metalica google si rottenburg am neckar time gal and ninja hayate sobre el campesino offerta lavoro geometra sapphire ati x300 californi phantom planet la notte dei generali per telefonare dall italia in argentina mahjongh euro fifa cagliari londra marchio privato gioco boy sonoio santuari campani harlan county usa le cinque terre sex strip luomo della torre eiffel surdato nnammurato istruzione e ricerca pleating copertina stealth i got five on it decapitazione ostaggio usa in iraq il solitario della montagna The Media Library file (in /mnt/Media/Media Library) is similar to iTunesDB on the iPod. The path to the actual media files are relative to /mnt/Media/Media Files/

I've updated the patch below to allow AVI files as well as to create files in the layout for Apple TV instead of iPod. The patch is available at http://ericiii.pastey.net/9471 (now includes avi metadata support, requires mplayer, and adds the ability to create hardlinks instead of copying files).

Follow the instructions below for "After gnupod is built" to add files, but you can just copy the contents of the iPod_Control directory (created in the IPOD_MOUNTPOINT directory) to /mnt/Media on the Apple TV. Restarting Finder (Front Row) on the Apple TV is still necessary.

Original patches

Patch for gnupod (http://www.gnu.org/software/gnupod/) to output the correct path as well as a stub for handling .mov (for reference files) (also note that this makes it not work for real ipods):

--- gnupod-orig/src/ext/FileMagic.pm    2006-09-27 02:52:23.000000000 -0700
    gnupod-0.99.1/src/ext/FileMagic.pm  2007-03-24 16:48:43.000000000 -0700
@@ -73,6  73,20 @@
   elsif(!-r $file) {
    warn "FileMagic.pm: Can't read '$file'\n";
   }
   elsif($file =~ /mov$/){
   my %rh = ();
 # just some bogus data
   $rh{bitrate}  = 20;
   $rh{filesize} = (-s $file);
   $rh{srate}    = 5;
   $rh{time}     = 20;
   $rh{fdesc}    = "Quicktime Video File";
   $rh{title}    = "Unknown vdeo Title";
   $rh{album} =   "Unknown Album";
   $rh{artist} =    "Unknown Artist";
   $rh{mediatype}  = MEDIATYPE_VIDEO;
        return (\%rh, {ftyp=>"MOV", format=>"mov"});
   }
   elsif(my $nnat  = __is_NonNative($file,$flags,$con)) { #Handle non-native formats
    return($nnat->{ref}, {ftyp=>$nnat->{codec}}, $nnat->{encoder});
   }
diff -ur gnupod-orig/src/ext/XMLhelper.pm gnupod-0.99.1/src/ext/XMLhelper.pm
--- gnupod-orig/src/ext/XMLhelper.pm    2006-02-03 12:47:24.000000000 -0800
    gnupod-0.99.1/src/ext/XMLhelper.pm  2007-03-24 16:48:53.000000000 -0700
@@ -121,6  121,8 @@
 
 #Convert /'s to :'s
 $ipath =~ tr/\//:/;
 # for appletv
 $ipath=~s/:iPod_Control:Music//;
 return ($ipath, $path);
 }

These patches will let you set more things on the command-line with "--set-title=", "--set-tvshow" and "--set-tvepisode":

--- gnupod-orig/src/gnupod_addsong.pl   2006-03-22 12:05:24.000000000 -0700
    gnupod-0.99.1/src/gnupod_addsong.pl 2007-03-25 04:29:47.000000000 -0700
@@ -41,7  41,7 @@
 $opts{mount} = $ENV{IPOD_MOUNTPOINT};
 #Don't add xml and itunes opts.. we *NEED* the mount opt to be set..
 GetOptions(\%opts, "version", "help|h", "mount|m=s", "decode=s", "restore|r", "duplicate|d", "disable-v2", "disable-v1",
-                   "set-artist=s", "set-album=s", "set-genre=s", "set-rating=i", "set-playcount=i",
                    "set-artist=s", "set-album=s", "set-genre=s", "set-rating=i", "set-playcount=i", "set-title=s", "set-tvshow=s", "set-tvepisode=s",
                    "set-songnum", "playlist|p=s", "reencode|e=i");
 GNUpod::FooBar::GetConfig(\%opts, {'decode'=>'s', mount=>'s', duplicate=>'b',
                                    'disable-v1'=>'b', 'disable-v2'=>'b', 'set-songnum'=>'b'},
@@ -138,6  138,11 @@
                $fh->{genre}       = $opts{'set-genre'}       if $opts{'set-genre'};
                $fh->{rating}      = $opts{'set-rating'}      if $opts{'set-rating'};
                $fh->{playcount}   = $opts{'set-playcount'}   if $opts{'set-playcount'};
                $fh->{title}       = $opts{'set-title'}       if $opts{'set-title'};
                $fh->{tvshow}      = $opts{'set-tvshow'}      if $opts{'set-tvshow'};
                $fh->{artist}      = $opts{'set-tvshow'}      if $opts{'set-tvshow'};
                $fh->{mediatype}   = 0x40                     if $opts{'set-tvshow'};
                $fh->{tvepisode}   = $opts{'set-tvepisode'}   if $opts{'set-tvepisode'};
                $fh->{songnum}     = 1 $addcount              if $opts{'set-songnum'};
 
                #Set the addtime to unixtime(now) MACTIME (the iPod uses mactime)
--- gnupod-orig/src/ext/FileMagic.pm    2006-09-27 02:52:23.000000000 -0700
    gnupod-0.99.1/src/ext/FileMagic.pm  2007-03-25 03:46:25.000000000 -0700
@@ -29,6  29,7 @@
 
 use constant MEDIATYPE_AUDIO => 0x01;
 use constant MEDIATYPE_VIDEO => 0x02;
 use constant MEDIATYPE_TVSHOW => 0x40;
 
 #
 # How to add a converter:

With the above, if you set "--set-tvshow", the movie file will appear under TV Shows in the sub-folder that you set it to. You can then use "--set-title" to set the episode name. FYI: even though I put --set-tvepisode in there, it may produce odd results!

After gnupod is built:

  • mkdir MediaNew
  • export IPOD_MOUNTPOINT=`pwd`/MediaNew
  • gnupod_INIT.pl
  • gnupod_addsong.pl <whatever>
  • mktunes.pl

Copy these files to the appletv:

  • iPod_Control/Music/* -> /mnt/Media/Media Files/*
  • iPod_Control/iTunes/iTunesDB -> /mnt/Media/Media Library

You'll need to restart Finder/Front Row on the appletv to get it to reread the db


Todo

  • Set the proper bitrate, time, etc. for mov/avi