Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import xbmcgui
- import xbmcaddon
- from allsports import AllSportsPage
- from allsports import create_sport_buttons
- #region Create class, getpath, create addonwindow class
- # create a class for your addon, we need this to get info about your addon
- ADDON = xbmcaddon.Addon()
- # get the full path to your addon, decode it to unicode to handle special (non-ascii) characters in the path
- CWD = ADDON.getAddonInfo('path')
- # Create a basic window class for your addon
- class AddonWindow(xbmcgui.WindowXML):
- def __init__(self, *args, **kwargs):
- pass
- #endregion
- #region Create an instance of your window class
- window = AddonWindow('LandingPage.xml', CWD, 'default', '1080i', True)
- #endregion
- #region ALL SPORTS WINDOW ###################################################################################
- class AllSportsWindow(xbmcgui.WindowXML):
- def __init__(self, *args, **kwargs):
- xbmcgui.WindowXML.__init__(self, *args, **kwargs)
- self.window_id = 13001 # Set a unique ID for the window
- pass
- # Create an instance of your AllSports window class
- all_sports_window = AllSportsWindow('AllSports.xml', CWD, 'default', '1080i', True)
- #endregion
- #region RECENTLY ADDED WINDOW ###############################################################################
- class RecentlyAddedWindow(xbmcgui.WindowXML):
- def __init__(self, *args, **kwargs):
- xbmcgui.WindowXML.__init__(self, *args, **kwargs)
- self.window_id = 13002 # Set a unique ID for the window
- pass
- # Create an instance of your RecentlyAdded window class
- recently_added_window = RecentlyAddedWindow('RecentlyAdded.xml', CWD, 'default', '1080i', True)
- #endregion
- #region FAVOURITES PAGE #####################################################################################
- class FavouritesPageWindow(xbmcgui.WindowXML):
- def __init__(self, *args, **kwargs):
- xbmcgui.WindowXML.__init__(self, *args, **kwargs)
- self.window_id = 13003 # Set a unique ID for the window
- pass
- # Create an instance of your FavouritesPage window class
- favourites_page_window = FavouritesPageWindow('FavouritesPage.xml', CWD, 'default', '1080i', True)
- #endregion
- #region Finishing up
- # Show the window
- window.doModal()
- # Close the window
- del window
- #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement