<commit_before># -*- coding: utf-8 -*-

from platform import system
import os
import re
import xbmc
import xbmcaddon
from stat import *
from operator import itemgetter
from urllib import quote_plus, unquote_plus
from datetime import datetime

MOVIES, TV_EPISODES, MUSIC_VIDEOS = range(3)

libraryList =((MOVIES, "Movies", "DefaultMovies.png"),
              (TV_EPISODES, "TV Episodes", "DefaultTVShows.png"),
              (MUSIC_VIDEOS, "Music Videos", "DefaultMusicVideos.png"),
             )

addon = xbmcaddon.Addon(id=os.path.basename(os.getcwd()))

class Sort:

    def __init__(self, library, progress=None):
        if(addon.getSetting('debug')):
            self.debug = True
            sort_setting = addon.getSetting('sort_key')
        if (sort_setting == "Platform default" and system() == 'Linux') \
         or sort_setting == "Modification (Unix/Linux)":
            self.sort_key = ST_MTIME
            self.debug and xbmc.log("[media-sort] using MTIME")<commit_msg>fixed github issue/2<commit_after># -*- coding: utf-8 -*-

from platform import system
import os
import re
import xbmc
import xbmcaddon
from stat import *
from operator import itemgetter
from urllib import quote_plus, unquote_plus
from datetime import datetime

MOVIES, TV_EPISODES, MUSIC_VIDEOS = range(3)

libraryList =((MOVIES, "Movies", "DefaultMovies.png"),
              (TV_EPISODES, "TV Episodes", "DefaultTVShows.png"),
              (MUSIC_VIDEOS, "Music Videos", "DefaultMusicVideos.png"),
             )

addon = xbmcaddon.Addon(id='script.sort-media')

class Sort:

    def __init__(self, library, progress=None):
        if(addon.getSetting('debug')):
            self.debug = True
            sort_setting = addon.getSetting('sort_key')
        if (sort_setting == "Platform default" and system() == 'Linux') \
         or sort_setting == "Modification (Unix/Linux)":
            self.sort_key = ST_MTIME
            self.debug and xbmc.log("[media-sort] using MTIME")
{'fraction_non_alphanumeric': 0.11985779583544946, 'fraction_numerical': 0.0025393600812595226, 'mean_word_length': 3.1649048625792813, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1715742', 'n_tokens_mistral': 655, 'n_tokens_neox': 633, 'n_words': 157}