Author Topic: Exclude plugin from operating for a particular Display or Layout  (Read 1659 times)

spud1

  • Full Member
  • ***
  • Posts: 40
    • View Profile
I've got a Plugin that works for every Layout/Display.  However, I'd like it to work with every Layout/Display EXCEPT one.  Is it possible to do this with an if/else statement or some other way please?

Code: [Select]
// This plugin adds a newly "favourited" game to the "Favourites.txt" romlist
fe.add_transition_callback( "favourites" );
function favourites( ttype, var, ttime )
{
switch ( ttype )
{
case Transition.ChangedTag:
fe.plugin_command( "/usr/bin/printf5.sh", "\"" + fe.game_info(Info.Name) + "\"" );
fe.plugin_command( "/usr/bin/printf6.sh", "\"" + fe.game_info(Info.Name) + ";" + fe.game_info(Info.Title) + ";" + fe.game_info(Info.Emulator) + ";" + fe.game_info(Info.CloneOf) + ";" + fe.game_info(Info.Year) + ";" + fe.game_info(Info.Manufacturer) + ";" + fe.game_info(Info.Category) + ";" + fe.game_info(Info.Players) + ";" + fe.game_info(Info.Rotation) + ";" + fe.game_info(Info.Control) + ";" + fe.game_info(Info.Status) + ";" + fe.game_info(Info.DisplayCount) + ";" + fe.game_info(Info.DisplayType) + ";" + fe.game_info(Info.AltRomname) + ";" + fe.game_info(Info.AltTitle) + ";" + fe.game_info(Info.Extra) + ";" + fe.game_info(Info.Buttons) + "\"" );
system( "sudo /bin/bash /bin/addfavourite.sh" );
}
return false;
}
fe.add_transition_callback( "favourites" )

Thanks.