•   
  • 1
  • 19
  • 20
  • 21
  • 22(current)
  • 23
  •   
Release Disney+ Add-on
Ok, this is my modification file:
https://github.com/Paco8/kodi-repo/raw/m...4~mod6.zip

I made changes in the files resources/lib/proxy.py and resources/settings.xml.

A screenshot of the setting options: https://imgur.com/a/dotGj1I

Again my code is ugly because I made it just for me, but it allows me to filter a lot of tracks I don't need so I can now use the disney+ addon perfectly in Kodi 18.
Reply
Thank you both, matthuisman and gus92.
I have now made my adjustments to the code, and are happy with the result. Smile

However, I cant figure out how to add a translation for the main menu..? I assued I just needed to add my language to slyguy.disney.plus/resources/language/resource.language.<locale_code>/strings.po, but it's still english. I have tried several different locale codes with no luck. Weird.
Reply
a lot of the language is from the slyguy common language file.
Disney+ specific should be from disney language file.

your location for language looks correct.
slyguy.disney.plus\resources\language\resource.language.<code>\strings.po
the translated text goes in msgstr

Make sure using the write local_code according to kodi language 

You can also translate the common strings too
script.module.slyguy\resources\language\resource.language.<code>\strings.po

Finally, make sure your language is set via Disney+ app or website for your profile to the language you want.
Once your into the add-on, most of the labels come directly from them

You can send me the new translation files and I can add them in
Reply
@matthuisman: I thought I knew the code for Norwegian Bokmål, and I tried "no_nb", "no_no" and just "no". Turned out to be "nb_no", the only code I didnt try. Wink

I have not quality checked it all, but I hope its good enough. Here is language file for slyguy.disney.plus/resources/language/resource.language.nb_no:
https://paste.ubuntu.com/p/38D8GCcGTy/

And here is for script.module.slyguy/resources/language/resource.language.nb_no:
https://paste.ubuntu.com/p/r7G3tZqhXm/

Regarding subtitles: Have you considered downloading and joining all subtitle segments into one file, temporary for playback? This should not be too hard to achieve, and will improve the playback experience.

Say I start watching a movie, and then aborts it after an hour. Later I want to continue watching this movie from where I left off. In my experience, only the subtitle segment for that part of the movie is loaded. So after like 5 minutes (depending on where the segment ends), subtitles disappears. It comes back if I stops the video, and restarts it (selecting continue to watch), only to disappear again later. A better solution have proven to be selecting an other subtitle language and then changing back again. From then on, the next subtitle segments seem to be loaded.

This is probably the same bug that @DumbIdiot mentioned about rewinding or skipping (https://forum.kodi.tv/showthread.php?tid...pid2959436), and it could all be avoided if Kodi had one subtitle file to deal with.
Reply
I'll add in your subs files - Thank you!

as the subtitle fix is in 19, I don't want to spend too much time on it
Pretty sure you can't merge subtitle files. How would kodi know what language it is, pretty sure it gets that from the filename
Reply
Unlike other services like netflix or primevideo, where a subtitle is in a single file, the subtitles in disney+ are split in multiple segments. This seems to cause problems in Kodi.

I think the hboeu addon had the same problem with the subtitles and they fixed it by adding an option which downloads and converts all segments to a srt file.
https://forum.kodi.tv/showthread.php?tid...pid2936791
Reply
(2020-09-23, 10:31)gus92 Wrote: Unlike other services like netflix or primevideo, where a subtitle is in a single file, the subtitles in disney+ are split in multiple segments. This seems to cause problems in Kodi.

I think the hboeu addon had the same problem with the subtitles and they fixed it by adding an option which downloads and converts all segments to a srt file.
https://forum.kodi.tv/showthread.php?tid...pid2936791
all that is doing is downloading the sub file for a single language.
Therefore it becomes an external subtitle file which I assume is not included in the subtitle max count in Leia or is always put first.
It will slow down the playing of a video if it downloads every subtitle file. Disney+ often has about 10.

Kodi Matrix is fixed.
Reply
just pushed 0.4.3

This adds a new setting in add-on settings "Sync with Disney+"

With this enabled (default is disabled), the add-on will sync it's playing position of content up to Disney+ like the official apps do.
It also will sync down playing positions from Disney+
And a new main menu item "Continue Watching"
Reply
I have a small suggestion:
Settings for slyguy.disney.plus should have a shortcut to settings for script.module.slyguy since the latter affects the disney+ addon. I tried to do it myself, but couldnt make it work for some unknown reason.
Reply
No common settings should need to be touched.
What have you changed there?
Reply
Hi, first of all thanks for all your work on this Add-on. Sorry to still mention this but I'm having an issue with the new "subtitle filtering". I'm running it from LibreElec using an old box that won't support Kodi 19 anytime soon because of an old kernel, anyway, my settings.xml didn't had the options for subtitles language, audio, etc, so I added those manually according to @gus92 modded Add-on, didn't work, so I decided to replace the other code with this 
Code:
                if attribs.get('LANGUAGE','').lower() not in (['en','fr']):
attribs = {}
inside proxy.py also didn't work. Any reason why it isn't working ?
Reply
ok, ill see if I can add a setting for this as a few users are wanting it.
Would a Text entry for languages you want to keep be ok?
multiple could be separated by a comma or pipe.
then any audio or sub language not in this list is removed.
Reply
(2020-10-16, 05:23)matthuisman Wrote: ok, ill see if I can add a setting for this as a few users are wanting it.
Would a Text entry for languages you want to keep be ok?
multiple could be separated by a comma or pipe.
then any audio or sub language not in this list is removed.

It's a perfect solution, thank you very much.
Reply
(2020-10-13, 20:51)matthuisman Wrote: No common settings should need to be touched.
What have you changed there?

Nah, just my own settings for the modifyed proxy.py (heavily based on code from @gus92): audio description tracks, forced subtitles tracks, language filter..

For some reasons I can't find "script.module.slyguy" in the list of installed addons, so I cannot edit the settings in kodi. And my "language_filter" setting is always blank, no matter what I do (I surely do something wrong somewhere). I consider moving these settings to "slyguy.disney.plus", and then pass them in headers as you do with "_proxy_default_language". But since all my modifications are overwritten at every update, I just keep my changes in one module (so there is just one module to merge/sync code after every update).

@DiogoSilva48 This is how my _default_audio_fix method looks like in proxy.py:

def _default_audio_fix(self, m3u8):
    if '#EXT-X-MEDIA' not in m3u8:
        return m3u8

    def _process_media(line):
        attribs = {}

        for key, value in re.findall('([\w-]+)="?([^",]*)[",$]?', line):
            attribs[key.upper()] = value.strip()

        return attribs

    # Settings #
    load_audio_description_tracks = settings.getBool('audio_description_tracks')
    load_forced_subtitles = settings.getBool('forced_subtitles')
    
    audio_codec = settings.get("audio_codec")
    if audio_codec == "All": audio_codec = ""
    
    lang_list = []
    #for lang in settings.get('language_filter').split(" "): lang_list.append(lang.lower()) # Does not work for some reason?
    lang_list.append("en") # English
    lang_list.append("no") # Norwegian
    # /Settings #
    
    default_groups = []
    groups = defaultdict(list)
   
    default_language = self.headers.get('_proxy_default_language')
    
    for line in m3u8.splitlines():
        if line.startswith('#EXT-X-MEDIA'):
            attribs = _process_media(line)

            if not attribs:
                continue

            # FIX es-ES fr-FR languages #
            language = attribs.get('LANGUAGE')
            if language:
                split = language.split('-')
                if len(split) > 1 and split[1].lower() == split[0].lower():
                    attribs['LANGUAGE'] = split[0]
            #############################

            if attribs.get('GROUP-ID'):
                groups[attribs['GROUP-ID']].append([attribs, line])
                if attribs.get('DEFAULT') == 'YES' and attribs['GROUP-ID'] not in default_groups:
                    default_groups.append(attribs['GROUP-ID'])

            # Filter subtitles and audio #
            if len(lang_list) > 0:
                language = attribs.get('LANGUAGE')
                if language and not (language.lower().startswith(tuple(lang_list))) and language != default_language:
                    m3u8 = m3u8.replace(line, "#DELETED")
            if not load_forced_subtitles:
                if attribs.get('TYPE') == 'SUBTITLES' and attribs.get('FORCED') == 'YES':
                    m3u8 = m3u8.replace(line, "#DELETED")
            # /Filter subtitles and audio #
            
            # Filter audio #
            if attribs.get('TYPE') == 'AUDIO':
                if not load_audio_description_tracks:
                    if attribs.get('CHARACTERISTICS') == 'public.accessibility.describes-video':
                        m3u8 = m3u8.replace(line, "#DELETED")
                if audio_codec != "":
                    if attribs.get('GROUP-ID') != audio_codec:
                        m3u8 = m3u8.replace(line, "#DELETED")
            # /Filter audio #


    if default_language:
        for group_id in groups:
            if group_id in default_groups:
                continue

            languages = []
            for group in groups[group_id]:
                attribs, line = group
                
                attribs['AUTOSELECT'] = 'NO'
                attribs['DEFAULT']    = 'NO'

                if attribs['LANGUAGE'] not in languages or attribs.get('TYPE') == 'SUBTITLES':
                    attribs['AUTOSELECT'] = 'YES'

                    if attribs['LANGUAGE'] == default_language:
                        attribs['DEFAULT'] = 'YES'

                    languages.append(attribs['LANGUAGE'])

    for group_id in groups:
        for group in groups[group_id]:
            attribs, line = group

            new_line = '#EXT-X-MEDIA:' if attribs else ''
            for key in attribs:
                new_line += u'{}="{}",'.format(key, attribs[key])

            m3u8 = m3u8.replace(line, new_line.rstrip(','))

    return m3u8

In setting.xml for "script.module.slyguy" I have added these lines:

<setting label="Load audio description tracks" id="audio_description_tracks" type="bool" default="false"/>
<setting label="Audio codec" id="audio_codec" type="labelenum" values="All|eac-3|aac-128k|aac-64k" default="All"/>
<setting label="Load forced subtitles" id="forced_subtitles" type="bool" default="false"/>
<setting label="Preferred subtitle languages (codes separated by spaces)" id="language_filter" type="text" default="" />
Reply
The settings for script.module.slyguy can be found in the kodi settings, under system -> add-ons -> manage dependencies.
Reply
  •   
  • 1
  • 19
  • 20
  • 21
  • 22(current)
  • 23
  •   



Logout Mark Read Team Forum Stats Members Help
Disney+ Add-on13
This forum uses Lukasz Tkacz MyBB addons.