<commit_before>import os
import sys
import urllib
import urlparse

import xbmc
import xbmcgui
import xbmcaddon
import xbmcplugin

# Make sure library folder is on the path
addon = xbmcaddon.Addon("plugin.audio.subsonic")
sys.path.append(xbmc.translatePath(os.path.join(
    addon.getAddonInfo("path"), "lib")))

import libsonic_extra


class Plugin(object):
    """
    Plugin container.
    """

    def __init__(self, addon_url, addon_handle, addon_args):
        self.addon_url = addon_url
        self.addon_handle = addon_handle
        self.addon_args = addon_args

        # Retrieve plugin settings
        self.url = addon.getSetting("subsonic_url")
        self.username = addon.getSetting("username")
        self.password = <PASSWORD>("password")

        self.random_count = addon.getSetting("random_count")
        self.bitrate = addon.getSetting("bitrate")
        self.trans_format = addon.getSetting("trans_format")

        # Create connection
        self.connection = libsonic_extra.SubsonicClient(
            self.url, self.username, self.password)

    def build_url(self, query):
        """
        """

        parts = list(urlparse.urlparse(self.addon_url))
        parts[4] = urllib.urlencode(query)

        return urlparse.urlunparse(parts)

    def route(self):
        """
        Map a Kodi request to certain action.
        """

        mode = self.addon_args.get("mode", ["main_page"])[0]
        getattr(self, mode)()

    def add_track(self, track, show_artist=False):
        """
        Display one track in the list.
        """

        url = self.connection.streamUrl(<commit_msg>Do not touch internals of Python.<commit_after>import os
import sys
import urllib
import urlparse

import xbmc
import xbmcgui
import xbmcaddon
import xbmcplugin

# Make sure library folder is on the path
addon = xbmcaddon.Addon("plugin.audio.subsonic")
sys.path.append(xbmc.translatePath(os.path.join(
    addon.getAddonInfo("path"), "lib")))

import libsonic_extra


class Plugin(object):
    """
    Plugin container.
    """

    def __init__(self, addon_url, addon_handle, addon_args):
        self.addon_url = addon_url
        self.addon_handle = addon_handle
        self.addon_args = addon_args

        # Retrieve plugin settings
        self.url = addon.getSetting("subsonic_url")
        self.username = addon.getSetting("username")
        self.password = addon.getSetting("password")

        self.random_count = addon.getSetting("random_count")
        self.bitrate = addon.getSetting("bitrate")
        self.trans_format = addon.getSetting("trans_format")

        # Create connection
        self.connection = libsonic_extra.SubsonicClient(
            self.url, self.username, self.password)

    def build_url(self, query):
        """
        """

        parts = list(urlparse.urlparse(self.addon_url))
        parts[4] = urllib.urlencode(query)

        return urlparse.urlunparse(parts)

    def route(self):
        """
        Map a Kodi request to certain action.
        """

        mode = self.addon_args.get("mode", ["main_page"])[0]

        if not mode.startswith("_"):
            getattr(self, mode)()

    def add_track(self, track, show_artist=False):
        """
        Display one track in the list.
        """

        url = self.connection.streamUrl(
{'fraction_non_alphanumeric': 0.11044055522027761, 'fraction_numerical': 0.0012070006035003018, 'mean_word_length': 2.7039106145251397, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3411485', 'n_tokens_mistral': 1064, 'n_tokens_neox': 1034, 'n_words': 213}