]> git.sesse.net Git - vlc/commitdiff
Title hell. Seems like titles work substantially differently for
authorRocky Bernstein <rocky@videolan.org>
Sun, 26 Dec 2004 00:14:38 +0000 (00:14 +0000)
committerRocky Bernstein <rocky@videolan.org>
Sun, 26 Dec 2004 00:14:38 +0000 (00:14 +0000)
navigation versus plaback.

modules/access/cdda/cdda.c
modules/access/cdda/info.c

index 1fd608d0fbe5c63bcfb8efc73a1370dd0c38a02d..10bc239e9907b9f1f8d1f409190608c5c99e1f28 100644 (file)
@@ -120,11 +120,6 @@ vlc_module_begin();
                  N_("Number of blocks per CD read"),
                  BLOCKS_PER_READ_LONGTEXT, VLC_TRUE );
 
-    add_string( MODULE_STRING "-author-format",
-                "%A - %a %C %I", NULL,
-                N_("Format to use in playlist \"author\" field"),
-                TITLE_FMT_LONGTEXT, VLC_TRUE );
-
     add_string( MODULE_STRING "-title-format",
                 "Track %T. %t", NULL,
                 N_("Format to use in playlist \"title\" field when no CDDB"),
index a6f0f9ebc625ce27ac08a0eb84f8945c32583825..dbbc27a3f07bccc4e1dce6d3486595197475ad0a 100644 (file)
@@ -289,7 +289,7 @@ CDDAMetaInfo( access_t *p_access, track_t i_track )
          cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc, i_track-1);
          if (t != NULL )
          {
-             if( t->title != NULL )
+             if( t->title != NULL && ! p_cdda->b_nav_mode )
              {
                  add_meta_val( VLC_META_TITLE, t->title );
              }
@@ -428,21 +428,31 @@ CDDAMetaInfo( access_t *p_access, track_t i_track )
 
        /* Above we should have set psz_meta_title and psz_meta_artist
           to CDDB or CD-Text values or the default value depending on
-          availablity and user preferences. 
+          availablity and user preferences.
 
-          So now add the title and artist to VLC's meta, and the 
-          name as shown in the status bar and playlist entry.
-        */
-       add_meta_val( VLC_META_TITLE, psz_meta_title );
-       if (psz_meta_artist) 
-         add_meta_val( VLC_META_ARTIST, psz_meta_artist );
+          So now add the title and artist to VLC's meta, and the name
+          as shown in the status bar and playlist entry.
 
-       if ( CDIO_INVALID_TRACK != i_track )
-       { 
+          For playlist mode, the meta title is what's seen at the
+          bottom and in the playlist. For nav-mode playing, it is
+          done by input_control. I don't understand why they do
+          different things. In either case, we may have customized to
+          put in the track name.
+        */
+       if ( CDIO_INVALID_TRACK != i_track ) 
+       {
            char *psz_name = CDDAFormatTitle( p_access, i_track ) ;
-           input_Control( p_cdda->p_input, INPUT_SET_NAME, psz_name );
-           free(psz_name);
+           if ( !p_cdda->b_nav_mode ) {
+               add_meta_val( VLC_META_TITLE, psz_name );
+           } else 
+           { 
+               input_Control( p_cdda->p_input, INPUT_SET_NAME, psz_name );
+               free(psz_name);
+           }
+           if (psz_meta_artist) 
+             add_meta_val( VLC_META_ARTIST, psz_meta_artist );
        }
+       
     }
 }
 
@@ -964,16 +974,18 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
         t->i_length = I64C(1000000) * t->i_size / CDDA_FREQUENCY_SAMPLE / 4;
 
 
-       if (p_item)
-         CDDAAddMetaToItem( p_access, p_cdda, p_item, i_track, VLC_FALSE );
-
+       if (p_item) 
+       {
+           CDDAAddMetaToItem( p_access, p_cdda, p_item, i_track, VLC_FALSE );
+           p_item->input.i_duration = i_track_frames 
+             * (CLOCK_FREQ / CDIO_CD_FRAMES_PER_SEC);
+           p_item->input.psz_uri    = CDDAFormatMRL(p_access, i_track);
+       }
+       
         p_cdda->i_titles = 1;
         p_access->info.i_size =
          i_track_frames * (int64_t) CDIO_CD_FRAMESIZE_RAW;
        p_access->info.i_update |= INPUT_UPDATE_TITLE|INPUT_UPDATE_SIZE;
-       p_item->input.psz_uri    = CDDAFormatMRL(p_access, i_track);
-       p_item->input.i_duration = i_track_frames 
-         * (CLOCK_FREQ / CDIO_CD_FRAMES_PER_SEC);
     }
     else
     {