Esempio n. 1
0
    def get_episode_thumb_path(ep_obj):
        """
        Returns the path where the episode thumbnail should be stored. Defaults to
        the same path as the episode file but with a .tbn extension.

        ep_obj: a TVEpisode instance for which to create the thumbnail
        """
        if os.path.isfile(ep_obj.location):
            tbn_filename = replaceExtension(ep_obj.location, 'tbn')
        else:
            return None

        return tbn_filename
Esempio n. 2
0
    def get_episode_thumb_path(ep_obj):
        """
        Returns the path where the episode thumbnail should be stored. Defaults to
        the same path as the episode file but with a .tbn extension.

        ep_obj: a TVEpisode instance for which to create the thumbnail
        """
        if os.path.isfile(ep_obj.location):
            tbn_filename = replaceExtension(ep_obj.location, 'tbn')
        else:
            return None

        return tbn_filename
Esempio n. 3
0
    def get_episode_thumb_path(ep_obj):
        """
        Returns a full show dir/metadata/episode.jpg path for MediaBrowser
        episode thumbs.

        ep_obj: a TVEpisode object to get the path from
        """

        if os.path.isfile(ep_obj.location):
            tbn_file_name = replaceExtension(os.path.basename(ep_obj.location), 'jpg')
            metadata_dir_name = os.path.join(os.path.dirname(ep_obj.location), 'metadata')
            tbn_file_path = os.path.join(metadata_dir_name, tbn_file_name)
        else:
            return None

        return tbn_file_path
Esempio n. 4
0
    def get_episode_file_path(self, ep_obj):
        """
        Returns a full show dir/metadata/episode.xml path for MediaBrowser
        episode metadata files

        ep_obj: a TVEpisode object to get the path for
        """

        if os.path.isfile(ep_obj.location):
            xml_file_name = replaceExtension(os.path.basename(ep_obj.location), self._ep_nfo_extension)
            metadata_dir_name = os.path.join(os.path.dirname(ep_obj.location), 'metadata')
            xml_file_path = os.path.join(metadata_dir_name, xml_file_name)
        else:
            sickrage.srLogger.debug("Episode location doesn't exist: " + str(ep_obj.location))
            return ''

        return xml_file_path
Esempio n. 5
0
    def get_episode_thumb_path(ep_obj):
        """
        Returns a full show dir/metadata/episode.jpg path for MediaBrowser
        episode thumbs.

        ep_obj: a TVEpisode object to get the path from
        """

        if os.path.isfile(ep_obj.location):
            tbn_file_name = replaceExtension(os.path.basename(ep_obj.location),
                                             'jpg')
            metadata_dir_name = os.path.join(os.path.dirname(ep_obj.location),
                                             'metadata')
            tbn_file_path = os.path.join(metadata_dir_name, tbn_file_name)
        else:
            return None

        return tbn_file_path
Esempio n. 6
0
    def get_episode_file_path(self, ep_obj):
        """
        Returns a full show dir/metadata/episode.xml path for MediaBrowser
        episode metadata files

        ep_obj: a TVEpisode object to get the path for
        """

        if os.path.isfile(ep_obj.location):
            xml_file_name = replaceExtension(os.path.basename(ep_obj.location),
                                             self._ep_nfo_extension)
            metadata_dir_name = os.path.join(os.path.dirname(ep_obj.location),
                                             'metadata')
            xml_file_path = os.path.join(metadata_dir_name, xml_file_name)
        else:
            sickrage.srLogger.debug("Episode location doesn't exist: " +
                                    str(ep_obj.location))
            return ''

        return xml_file_path
Esempio n. 7
0
 def get_episode_thumb_path(ep_obj):
     return replaceExtension(ep_obj.location, 'jpg')
Esempio n. 8
0
 def get_episode_file_path(self, ep_obj):
     return replaceExtension(ep_obj.location, self._ep_nfo_extension)
Esempio n. 9
0
 def get_episode_file_path(self, ep_obj):
     return replaceExtension(ep_obj.location, self._ep_nfo_extension)