Advertisement
Guest User

Untitled

a guest
Jun 24th, 2023
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. import xbmcgui
  2. import xbmcaddon
  3. from allsports import AllSportsPage
  4. from allsports import create_sport_buttons
  5.  
  6. #region Create class, getpath, create addonwindow class
  7. # create a class for your addon, we need this to get info about your addon
  8. ADDON = xbmcaddon.Addon()
  9.  
  10. # get the full path to your addon, decode it to unicode to handle special (non-ascii) characters in the path
  11. CWD = ADDON.getAddonInfo('path')
  12.  
  13. # Create a basic window class for your addon
  14. class AddonWindow(xbmcgui.WindowXML):
  15. def __init__(self, *args, **kwargs):
  16. pass
  17. #endregion
  18.  
  19. #region Create an instance of your window class
  20. window = AddonWindow('LandingPage.xml', CWD, 'default', '1080i', True)
  21. #endregion
  22.  
  23. #region ALL SPORTS WINDOW ###################################################################################
  24. class AllSportsWindow(xbmcgui.WindowXML):
  25. def __init__(self, *args, **kwargs):
  26. xbmcgui.WindowXML.__init__(self, *args, **kwargs)
  27. self.window_id = 13001 # Set a unique ID for the window
  28. pass
  29.  
  30. # Create an instance of your AllSports window class
  31. all_sports_window = AllSportsWindow('AllSports.xml', CWD, 'default', '1080i', True)
  32. #endregion
  33.  
  34. #region RECENTLY ADDED WINDOW ###############################################################################
  35. class RecentlyAddedWindow(xbmcgui.WindowXML):
  36. def __init__(self, *args, **kwargs):
  37. xbmcgui.WindowXML.__init__(self, *args, **kwargs)
  38. self.window_id = 13002 # Set a unique ID for the window
  39. pass
  40.  
  41. # Create an instance of your RecentlyAdded window class
  42. recently_added_window = RecentlyAddedWindow('RecentlyAdded.xml', CWD, 'default', '1080i', True)
  43. #endregion
  44.  
  45. #region FAVOURITES PAGE #####################################################################################
  46. class FavouritesPageWindow(xbmcgui.WindowXML):
  47. def __init__(self, *args, **kwargs):
  48. xbmcgui.WindowXML.__init__(self, *args, **kwargs)
  49. self.window_id = 13003 # Set a unique ID for the window
  50. pass
  51.  
  52. # Create an instance of your FavouritesPage window class
  53. favourites_page_window = FavouritesPageWindow('FavouritesPage.xml', CWD, 'default', '1080i', True)
  54. #endregion
  55.  
  56. #region Finishing up
  57. # Show the window
  58. window.doModal()
  59.  
  60. # Close the window
  61. del window
  62. #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement