--- qvamps-0.98.orig/XmlWriter.pm 2006-02-28 19:49:02.000000000 +0100 +++ qvamps-0.98/XmlWriter.pm 2006-08-21 22:07:47.000000000 +0200 @@ -178,6 +178,7 @@ # loop over all selected titles foreach my $title_nr (@{$selected_titles}) { + my $last_pgcn; my @chapter_marks; my $any_program_selected; my $tsn = dvd -> title_set_nr ($title_nr); @@ -198,6 +199,8 @@ $any_program_selected = 1 unless ($any_program_selected || !vts_list_items -> any_program_selected ($tsn, $pgcn)); + + $last_pgcn = $pgcn; } $chapter_marks [$pgcn] [$pgn] = 1; @@ -215,7 +218,7 @@ selected_subtitle_streams ($title_nr); # write tags for start of title - titleset_begin_tag (); + titleset_begin_tag ($menu_box_checked && $nr_of_menu_items); titles_begin_tag (); video_tag ($tsn); audio_tags ($tsn, $selected_audio_streams); @@ -264,6 +267,9 @@ } } + title_post_tag () if ($menu_box_checked && + $nr_of_menu_items && $pgcn == $last_pgcn); + # write pgc end tag title_pgc_end_tag (); } @@ -287,7 +293,7 @@ my $nr_of_subtitle_streams = dvd -> nr_of_subtitle_streams ($tsn); # write tags for start of title - titleset_begin_tag (); + titleset_begin_tag ($menu_box_checked && $nr_of_menu_items); titles_begin_tag (); video_tag ($tsn); audio_tags ($tsn, [ 1 .. $nr_of_audio_streams ]); @@ -301,7 +307,7 @@ next unless (vts_list_items -> any_program_selected ($tsn, $pgcn)); # write pgc begin tag - pgc_begin_tag ($tsn, $pgcn); + title_pgc_begin_tag ($tsn, $pgcn); # loop over all programs of PGC foreach my $pgn (1 .. dvd -> nr_of_programs ($tsn, $pgcn)) @@ -328,7 +334,7 @@ } # write pgc end tag - pgc_end_tag (); + title_pgc_end_tag (); } # write tags for end of title @@ -454,14 +460,20 @@ sub titleset_begin_tag { + my $genjmp = shift; + print {&fh} " \n"; - print {&fh} " \n"; - print {&fh} " \n"; - print {&fh} "
\n";
-  print {&fh} "          jump vmgm menu;\n";
-  print {&fh} "        
\n"; - print {&fh} "
\n"; - print {&fh} "
\n"; + + if ($genjmp) + { + print {&fh} " \n"; + print {&fh} " \n"; + print {&fh} "
\n";
+    print {&fh} "          jump vmgm menu;\n";
+    print {&fh} "        
\n"; + print {&fh} "
\n"; + print {&fh} "
\n"; + } } @@ -598,6 +610,14 @@ } +sub title_post_tag +{ + print {&fh} " \n"; + print {&fh} " call vmgm menu;\n"; + print {&fh} " \n"; +} + + sub title_vob_tag { my $tsn = shift;