שוחררה גרסת 12.0-Frodo של XBMC.

תוכנות ניהול מדיה: KODI, תוספים, XBMC, Media Portal, PLEX וכו'
nirhazir
חבר פעיל מאוד
חבר פעיל מאוד
תגובות: 324
הצטרף: מרץ 2012

שליחה

צריך להגדיר פונט ARIAL.

itaysp
סמל אישי של משתמש
חבר פעיל מאוד
חבר פעיל מאוד
תגובות: 342
הצטרף: מאי 2007

שליחה

גם אצלי SUBCENTER תוקע לכמה דקות, אבל אז זה משתחרר עם שגיאה..

omer15
חבר פעיל
חבר פעיל
תגובות: 91
הצטרף: אפריל 2006

שליחה

meathook כתב:
omer15 כתב:מעולה!!!!

מתי תוסף הכתוביות יעודכן לגרסה 12? אני מרגיש שחזרתי שנה אחורה בזמן ללא התוסף הנל...
...
לפני שבוע תיקנתי את התוסף כך שיעבוד גם עם subtitle.co.il וגם עם subscenter.
כמו כן תיקנתי גם את הscraper של סרטים כך שיתחשב גם בשנת הסרט ובסדר התוצאות הרלוונטי מאתר סרטים.

אני מקווה שהתיקונים שלי נכנסו לגרסה האחרונה.
...
תודה רבה!

מאיפה ניתן להוריד את הגרסה האחרונה?

omer15
חבר פעיל
חבר פעיל
תגובות: 91
הצטרף: אפריל 2006

שליחה

אני עובד עם פרודו וגרסה 1.06 של HEBREW SUBTITLE וכל פעם שאני רוצה להפעיל את התוסף הוא רושם לי "סקריפט נכשל"

rabak
סמל אישי של משתמש
חבר פעיל במיוחד
חבר פעיל במיוחד
תגובות: 565
הצטרף: דצמבר 2010

שליחה

meathook כתב:
omer15 כתב:מעולה!!!!

מתי תוסף הכתוביות יעודכן לגרסה 12? אני מרגיש שחזרתי שנה אחורה בזמן ללא התוסף הנל...
...
לפני שבוע תיקנתי את התוסף כך שיעבוד גם עם subtitle.co.il וגם עם subscenter.
כמו כן תיקנתי גם את הscraper של סרטים כך שיתחשב גם בשנת הסרט ובסדר התוצאות הרלוונטי מאתר סרטים.

אני מקווה שהתיקונים שלי נכנסו לגרסה האחרונה.
...
קודם כל תודה רבה על העדכונים
דבר 2 באמת subscenter גורם ךתקיעה מלאה של ה XBMC וצריך לסגור אותו ישר אחרי שמנסים להריץ חיפוש תרגום באתר
תקן אותי אם אני טועה אבל הגירסה הקודמת עבדה בסדר... לפחות מה שאצלי

קוד: בחירת הכל

# -*- coding: UTF-8 -*- 

#===============================================================================
# Subscenter.org subtitles service. 
# Version: 1.4
# 
# Change log: 
# 1.1 - Fixed downloading of non-Hebrew subtitles. 
# 1.2 - Added key field for download URL 
# 1.3 - Fixed null values in website dictionary (changed to None) 
# 1.4 - Fixed key field (Thanks ILRHAES)


# 
# Created by: Ori Varon 

#===============================================================================
import os, re, xbmc, xbmcgui, string, time, urllib2 
from utilities import languageTranslate, log 

BASE_URL = "http://www.subscenter.org" 

debug_pretext = "" 

#===============================================================================
# Regular expression patterns 
#===============================================================================

MULTI_RESULTS_PAGE_PATTERN = u"עמוד &#40;?P<curr_page>\d*&#41; \&#40; סך הכל&#58; &#40;?P<total_pages>\d*&#41; \&#41;" 
SEARCH_RESULTS_PATTERN = "<div class="generalWindowRight">.*?<a href="&#40;?P<sid>.*?&#41;">" 


#===============================================================================
# Private utility functions 
#===============================================================================

# Returns the content of the given URL. Used for both html and subtitle files. 
# Based on Titlovi's service.py 
def getURL&#40;url&#41;&#58; 
    # Fix URLs with spaces in them 

    url = url.rep&#108;ace&#40;" ","%20"&#41; 
    content = None 
    log&#40; __name__ ,"Getting url&#58; %s" % &#40;url&#41;&#41; 
    try&#58; 


        response = urllib2.urlopen&#40;url&#41; 
        content = response.read&#40;&#41; 
    except&#58; 
        log&#40; __name__ ,"Failed to get url&#58; %s" % &#40;url&#41;&#41; 
    # Second parameter is the filename 
    return content 

def getURLfilename&#40;url&#41;&#58; 
    # Fix URLs with spaces in them 

    url = url.rep&#108;ace&#40;" ","%20"&#41; 
    filename = None 
    log&#40; __name__ ,"Getting url&#58; %s" % &#40;url&#41;&#41; 
    try&#58; 


        response = urllib2.urlopen&#40;url&#41; 

        filename = response.headers&#91;'Content-Disposition'&#93; 
        filename = filename&#91;filename.index&#40;"filename="&#41;&#58;&#93; 
    except&#58; 
        log&#40; __name__ ,"Failed to get url&#58; %s" % &#40;url&#41;&#41; 
    # Second parameter is the filename 
    return filename 

# The function receives a subtitles page id number, a list of user selected 
# languages and the current subtitles list and adds all found subtitles matching 
# the language selection to the subtitles list. 
def getAllSubtitles&#40;subtitlePageID,languageList,subtitlesList&#41;&#58; 
    # Retrieve the subtitles page &#40;html&#41; 
    try&#58; 
        subtitlePage = getURL&#40;BASE_URL + subtitlePageID&#41; 
    except&#58; 
        # Didn't find the page - no such episode? 
        return 
    # Didn't find the page - no such episode? 
    if &#40;not subtitlePage&#41;&#58; 
        return 
    # Find subtitles dictionary declaration on page 
    tempStart = subtitlePage.index&#40;"subtitles_groups = "&#41; 
    # Look for the following line break 
    tempEnd = subtitlePage.index&#40;"\n",subtitlePage.index&#40;"subtitles_groups = "&#41;&#41; 
    toExec = "foundSubtitles = "+subtitlePage&#91;tempStart+len&#40;"subtitles_groups = "&#41;&#58;tempEnd&#93; 
    # Remove junk at the end of the line 
    toExec = toExec&#91;&#58;toExec.rfind&#40;"&#125;"&#41;+1&#93; 
    # rep&#108;ace "null" with "None" 
    toExec = toExec.rep&#108;ace&#40;"null","None"&#41; 
    exec&#40;toExec&#41; 
    log&#40; __name__ ,"Built webpage dictionary"&#41; 
    for language in foundSubtitles.keys&#40;&#41;&#58; 
        if &#40;languageTranslate&#40;language, 2, 0&#41; in languageList&#41;&#58; 
            for translator in foundSubtitles&#91;language&#93;&#58; 
                for quality in foundSubtitles&#91;language&#93;&#91;translator&#93;&#58;
                    for rating in foundSubtitles&#91;language&#93;&#91;translator&#93;&#91;quality&#93;&#58; 
                        subtitlesList.append&#40;&#123;'rating'&#58; rating, 'sync'&#58; False, 
                            'filename'&#58; foundSubtitles&#91;language&#93;&#91;translator&#93;&#91;quality&#93;&#91;rating&#93;&#91;"subtitle_version"&#93;, 
                            'subtitle_id'&#58; foundSubtitles&#91;language&#93;&#91;translator&#93;&#91;quality&#93;&#91;rating&#93;&#91;"id"&#93;, 
                            'language_flag'&#58; 'flags/' + language + '.gif', 
                            'language_name'&#58; languageTranslate&#40;language, 2, 0&#41;, 
                            'key'&#58; foundSubtitles&#91;language&#93;&#91;translator&#93;&#91;quality&#93;&#91;rating&#93;&#91;"key"&#93;&#125;&#41; 

# Extracts the downloaded file and find a new sub/srt file to return. 
# Note that Sratim.co.il currently isn't hosting subtitles in .txt format but 
# is adding txt info files in their zips, hence not looking for txt.
# Based on Titlovi's service.py 
def extractAndFindSub&#40;tempSubDir,tempZipFile&#41;&#58; 
    # Remember the files currently in the folder and their number 
    files = os.listdir&#40;tempSubDir&#41; 
    init_filecount = len&#40;files&#41; 
    filecount = init_filecount 
    max_mtime = 0 
    # Determine which is the newest subtitles file in tempSubDir 
    for file in files&#58; 
        if &#40;string.split&#40;file,'.'&#41;&#91;-1&#93; in &#91;'srt','sub'&#93;&#41;&#58; 
            mtime = os.stat&#40;os.path.join&#40;tempSubDir, file&#41;&#41;.st_mtime
            if mtime > max_mtime&#58; 
                max_mtime =  mtime 
    init_max_mtime = max_mtime 
    # Wait 2 seconds so that the unpacked files are at least 1 second newer 
    time.sleep&#40;2&#41; 
    # Use XBMC's built-in extractor 
    xbmc.executebuiltin&#40;"XBMC.Extract&#40;" + tempZipFile + "," + tempSubDir +"&#41;"&#41; 
    waittime  = 0 
    while &#40;&#40;filecount == init_filecount&#41; and &#40;waittime < 20&#41; and 
           &#40;init_max_mtime == max_mtime&#41;&#41;&#58; # Nothing extracted yet 
        # Wait 1 second to let the builtin function 'XBMC.extract' unpack 
        time.sleep&#40;1&#41;  
        files = os.listdir&#40;tempSubDir&#41; 
        filecount = len&#40;files&#41; 
        # Determine if there is a newer file created in tempSubDir 
        # &#40;indicates that the extraction had completed&#41; 
        for file in files&#58; 
            if &#40;string.split&#40;file,'.'&#41;&#91;-1&#93; in &#91;'srt','sub'&#93;&#41;&#58; 
                mtime = os.stat&#40;os.path.join&#40;tempSubDir, file&#41;&#41;.st_mtime 
                if &#40;mtime > max_mtime&#41;&#58; 
                    max_mtime =  mtime 
        waittime  = waittime + 1 
    if waittime == 20&#58; 
        log&#40; __name__ ,"Failed to unpack subtitles in '%s'" % &#40;tempSubDir&#41;&#41; 
        return "" 
    else&#58; 
        log&#40; __name__ ,"Unpacked files in '%s'" % &#40;tempSubDir&#41;&#41;        
        for file in files&#58; 
            # There could be more subtitle files in tempSubDir, so make sure we 
            # get the newest subtitle file 
            if &#40;&#40;string.split&#40;file, '.'&#41;&#91;-1&#93; in &#91;'srt', 'sub'&#93;&#41; and 
                &#40;os.stat&#40;os.path.join&#40;tempSubDir, file&#41;&#41;.st_mtime > 
                 init_max_mtime&#41;&#41;&#58; 
                log&#40; __name__ ,"Unpacked subtitles file '%s'" % &#40;file&#41;&#41;        
                return os.path.join&#40;tempSubDir, file&#41; 

#===============================================================================
# Public interface functions 
#===============================================================================

# This function is called when the service is selected through the subtitles 
# addon OSD. 
# file_original_path -> Original system path of the file playing 
# title -> Title of the movie or episode name 
# tvshow -> Name of a tv show. Empty if video isn't a tv show &#40;as are season and 
#           episode&#41; 
# year -> Year 
# season -> Season number 
# episode -> Episode number 
# set_temp -> True iff video is http&#58;// stream 
# rar -> True iff video is inside a rar archive 
# lang1, lang2, lang3 -> Languages selected by the user 
def search_subtitles&#40; file_original_path, title, tvshow, year, season, episode, set_temp, rar, lang1, lang2, lang3, stack &#41;&#58; #standard input 
    subtitlesList = &#91;&#93; 
    # List of user languages - easier to manipulate 
    languageList = &#91;lang1, lang2, lang3&#93; 
    msg = "" 

    # Check if tvshow and rep&#108;ace spaces with + in either case 
    if tvshow&#58; 
        searchString = tvshow.rep&#108;ace&#40;" ","+"&#41; 
    else&#58; 
        searchString = title.rep&#108;ace&#40;" ","+"&#41; 

    log&#40; __name__ ,"%s Search string = %s" % &#40;debug_pretext, searchString.lower&#40;&#41;&#41;&#41; 

    # Retrieve the search results &#40;html&#41; 
    searchResults = getURL&#40;BASE_URL + "/he/subtitle/search/?q=" + searchString.lower&#40;&#41;&#41; 
    # Search most likely timed out, no results 
    if &#40;not searchResults&#41;&#58; 
        return subtitlesList, "", "Search timed out, please try again later." 

    # Look for subtitles page links 

    subtitleIDs = re.findall&#40;SEARCH_RESULTS_PATTERN,searchResults,re.DOTALL&#41; 



    # Look for more subtitle pages 
    pages = re.search&#40;MULTI_RESULTS_PAGE_PATTERN,unicode&#40;searchResults,"utf-8"&#41;&#41;
    # If we found them look inside for subtitles page links 
    if &#40;pages&#41;&#58; 
        while &#40;not &#40;int&#40;pages.group&#40;"curr_page"&#41;&#41;&#41; == int&#40;pages.group&#40;"total_pages"&#41;&#41;&#41;&#58; 
            searchResults = getURL&#40;BASE_URL + "/he/subtitle/search/?q="+searchString.lower&#40;&#41;+"&page="+str&#40;int&#40;pages.group&#40;"curr_page"&#41;&#41;+1&#41;&#41;


            tempSIDs = re.findall&#40;SEARCH_RESULTS_PATTERN,searchResults,re.DOTALL&#41; 



            for sid in tempSIDs&#58; 
                subtitleIDs.append&#40;sid&#41; 
            pages = re.search&#40;MULTI_RESULTS_PAGE_PATTERN,unicode&#40;searchResults,"utf-8"&#41;&#41;
    # Uniqify the list 
    subtitleIDs=list&#40;set&#40;subtitleIDs&#41;&#41; 
    # If looking for tvshos try to append season and episode to url 
    if tvshow&#58; 
        for i in range&#40;len&#40;subtitleIDs&#41;&#41;&#58; 
            subtitleIDs&#91;i&#93; += "/"+season+"/"+episode+"/" 

    for sid in subtitleIDs&#58; 
        getAllSubtitles&#40;sid,languageList,subtitlesList&#41; 
    
    
    # Standard output - 
    # subtitles list &#40;list of tuples built in getAllSubtitles&#41;, 
    # session id &#40;e.g a cookie string, passed on to download_subtitles&#41;, 
    # message to print back to the user 
    return subtitlesList, "", msg 

# This function is called when a specific subtitle from the list generated by 
# search_subtitles&#40;&#41; is selected in the subtitles addon OSD. 
# subtitles_list -> Same list returned in search function 
# pos -> The selected item's number in subtitles_list 
# zip_subs -> Full path of zipsubs.zip located in tmp location, if automatic 
# extraction is used &#40;see return va&#108;ues for details&#41; 
# tmp_sub_dir -> Temp folder used for both automatic and manual extraction 
# sub_folder -> Folder where the sub will be saved 
# session_id -> Same session_id returned in search function 
def download_subtitles &#40;subtitles_list, pos, zip_subs, tmp_sub_dir, sub_folder, session_id&#41;&#58; #standard input 
    subtitle_id = subtitles_list&#91;pos&#93;&#91; "subtitle_id" &#93; 
    filename = subtitles_list&#91;pos&#93;&#91; "filename" &#93; 
    key = subtitles_list&#91;pos&#93;&#91; "key" &#93; 
    url = BASE_URL + "/subtitle/download/"+languageTranslate&#40;subtitles_list&#91;pos&#93;&#91; "language_name" &#93;, 0, 2&#41;+"/"+str&#40;subtitle_id&#41;+"/?v="+filename+"&key="+key 
    
    log&#40; __name__ ,"%s Fetching subtitles using url %s" % &#40;debug_pretext, url&#41;&#41; 
    # Get the intended filename &#40;don't know if it's zip or rar&#41; 
    archive_name = getURLfilename&#40;url&#41; 
    # Get the file content using geturl&#40;&#41; 
    content = getURL&#40;url&#41; 
    subs_file = "" 
    if content&#58; 
        local_tmp_file = os.path.join&#40;tmp_sub_dir, archive_name&#41; 
        log&#40; __name__ ,"%s Saving subtitles to '%s'" % &#40;debug_pretext, local_tmp_file&#41;&#41; 
        try&#58; 
            local_file_handle = open&#40;local_tmp_file, "wb"&#41; 
            local_file_handle.write&#40;content&#41; 
            local_file_handle.close&#40;&#41; 
        except&#58; 
            log&#40; __name__ ,"%s Failed to save subtitles to '%s'" % &#40;debug_pretext, local_tmp_file&#41;&#41; 

        # Extract the zip file and find the new sub/srt file 
        subs_file = extractAndFindSub&#40;tmp_sub_dir,local_tmp_file&#41; 
            
    # Standard output - 
    # True iff the file is packed as zip&#58; addon will automatically unpack it. 
    # language of subtitles, 
    # Name of subtitles file if not packed &#40;or if we unpacked it ourselves&#41; 
    return False, subtitles_list&#91;pos&#93;&#91; "language_name" &#93;, subs_file 
זה הקוד אם מישהו עצלן לחפש אותו
אצלי הוא עדיין עובד מצוין

omerdo
חבר פעיל
חבר פעיל
תגובות: 96
הצטרף: אפריל 2012

שליחה

tomer953 כתב:
staticx כתב: ואיך לנטר את התיקיה של הוידאו באופן שוטף (לא בצורה של סריקה כל X שעות)

במדיה פורטל למשל ,ברגע שהייתי שם קובץ וידאו בתיקיה , ישר התוכנה כבר הייתה מזהה ומוסיפה אותו לסרטים/סדרות.
ב XBMC זה לא ככה ואם אני שם קובץ חדש ורוצה לראות עכשיו, הדרך היחידה להגיע היא דרך הסייר של הקבצים בתוכנה.

אשמח לפיתרון.. זה בעיקר מה שמפריע והורס את השימוש בתוכנה...
...
אין ניטור.
יש סריקה בהפעלת התוכנה.
יש סריקה ידנית,
ויש סריקה ע"י ADD-ON שמופעל ע"י מתזמן (כלומר כל יום X בשעה X תבצע סריקה וכו').
...
איך נקראה ה ADD-ON המדובר?

amirdavid
חבר פעיל מאוד
חבר פעיל מאוד
תגובות: 120
הצטרף: אוגוסט 2007

שליחה

חברים,

אין לי עברית בתפריטים של FRODO.
אבל כתוביות עברית עובד 100 אחוז.

מה יכולה להיות הבעיה?

embedded
חבר ותיק
חבר ותיק
תגובות: 2030
הצטרף: דצמבר 2008

שליחה

שווה לעבור ל12?
או שכדאי לחכות עד יעבור זעם?

חזור אל “תוכנה - KODI”