- def add_show(self, title, year, episodes, build_url):
- show_meta = '%s (%d)' % (title, year)
- show_dir = os.path.join(self.tvshow_path, show_meta)
+ def add_show (self, title, alt_title, episodes, build_url):
+ """Adds a show to the local db, generates & persists the strm files
+
+ Note: Can also used to store complete seasons or single episodes, it all depends on
+ what is present in the episodes dictionary
+
+ Parameters
+ ----------
+ title : :obj:`str`
+ Title of the show
+
+ alt_title : :obj:`str`
+ Alternative title given by the user
+
+ episodes : :obj:`dict` of :obj:`dict`
+ Episodes that need to be added
+
+ build_url : :obj:`fn`
+ Function to generate the stream url
+ """
+ show_meta = '%s' % (title)
+ folder = alt_title
+ show_dir = os.path.join(self.tvshow_path, folder)