Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed plugin.video.meta/resources/img/airing.png
Binary file not shown.
68 changes: 68 additions & 0 deletions plugin.video.meta/resources/language/Dutch/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ msgctxt "#30000"
msgid "General"
msgstr "Algemeen"

msgctxt "#30001"
msgid "Move down"
msgstr "Verplaats omlaag"

msgctxt "#30002"
msgid "Move up"
msgstr "Verplaats omhoog"

msgctxt "#30003"
msgid "Clear channels"
msgstr "Kanalen verwijderen"

msgctxt "#30004"
msgid "Remove channel"
msgstr "Verwijder kanaal"

msgctxt "#30010"
msgid "Players URL"
msgstr "Spelers URL"
Expand Down Expand Up @@ -115,6 +131,58 @@ msgctxt "#30413"
msgid "Hide keyboard dialog"
msgstr "Verberg keyboard dialogen"

msgctxt "#30414"
msgid "Trakt watchlist"
msgstr "Trakt kijklijst"

msgctxt "#30415"
msgid "Please go to https://trakt.tv/activate and enter the code"
msgstr "Ga naar https://trakt.tv/activate en vul de code in"

msgctxt "#30416"
msgid "Next episodes"
msgstr "Volgende afleveringen"

msgctxt "#30417"
msgid "Authenticate Trakt"
msgstr "Trakt authoriseren"

msgctxt "#30418"
msgid "Add all to library"
msgstr "Alles aan bibliotheek toevoegen"

msgctxt "#30419"
msgid "Are you sure you want to add your entire Trakt collection to Kodi library?"
msgstr "Weet u zeker dat u uw hele Trakt collectie toe wilt voegen aan Kodi bibliotheek?"

msgctxt "#30420"
msgid "Trakt collection"
msgstr "Trakt collectie"

msgctxt "#30421"
msgid "Are you sure you want to add your entire Trakt watchlist to Kodi library?"
msgstr "Weet u zeker dat u uw hele Trakt kijklijst toe wilt voegen aan Kodi bibliotheek?"

msgctxt "#30422"
msgid "You must authenticate with Trakt. Do you want to authenticate now?"
msgstr "U dient Trakt te authoriseren. Wilt u nu authoriseren?"

msgctxt "#30423"
msgid "My calendar"
msgstr "Mijn kalender"

msgctxt "#30500"
msgid "Live"
msgstr "Live"

msgctxt "#30501"
msgid "Enable live players"
msgstr "Live spelers inschakelen"

msgctxt "#30510"
msgid "Prefered live player"
msgstr "Voorkeurs live speler"

msgctxt "#30600"
msgid "Would you like to automatically set Meta as a movies video source?"
msgstr "Wilt u Meta automatisch als film bron instellen?"
Expand Down
138 changes: 68 additions & 70 deletions plugin.video.meta/resources/language/English/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ msgctxt "#30000"
msgid "General"
msgstr ""

msgctxt "#30001"
msgid "Move down"
msgstr ""

msgctxt "#30002"
msgid "Move up"
msgstr ""

msgctxt "#30003"
msgid "Clear channels"
msgstr ""

msgctxt "#30004"
msgid "Remove channel"
msgstr ""

msgctxt "#30010"
msgid "Players URL"
msgstr ""
Expand Down Expand Up @@ -115,6 +131,58 @@ msgctxt "#30413"
msgid "Hide keyboard dialog"
msgstr ""

msgctxt "#30414"
msgid "Trakt watchlist"
msgstr ""

msgctxt "#30415"
msgid "Please go to https://trakt.tv/activate and enter the code"
msgstr ""

msgctxt "#30416"
msgid "Next episodes"
msgstr ""

msgctxt "#30417"
msgid "Authenticate Trakt"
msgstr ""

msgctxt "#30418"
msgid "Add all to library"
msgstr ""

msgctxt "#30419"
msgid "Are you sure you want to add your entire Trakt collection to Kodi library?"
msgstr ""

msgctxt "#30420"
msgid "Trakt collection"
msgstr ""

msgctxt "#30421"
msgid "Are you sure you want to add your entire Trakt watchlist to Kodi library?"
msgstr ""

msgctxt "#30422"
msgid "You must authenticate with Trakt. Do you want to authenticate now?"
msgstr ""

msgctxt "#30423"
msgid "My calendar"
msgstr ""

msgctxt "#30500"
msgid "Live"
msgstr ""

msgctxt "#30501"
msgid "Enable live players"
msgstr ""

msgctxt "#30510"
msgid "Prefered live player"
msgstr ""

msgctxt "#30600"
msgid "Would you like to automatically set Meta as a movies video source?"
msgstr ""
Expand Down Expand Up @@ -226,73 +294,3 @@ msgstr ""
msgctxt "#30628"
msgid "Play with..."
msgstr ""

msgctxt "#30414"
msgid "Trakt watchlist"
msgstr ""

msgctxt "#30415"
msgid "Please go to https://trakt.tv/activate and enter the code"
msgstr ""

msgctxt "#30416"
msgid "Next episodes"
msgstr ""

msgctxt "#30417"
msgid "Authenticate Trakt"
msgstr ""

msgctxt "#30418"
msgid "Add all to library"
msgstr ""

msgctxt "#30419"
msgid ""
"Are you sure you want to add your entire Trakt collection to Kodi library?"
msgstr ""

msgctxt "#30420"
msgid "Trakt collection"
msgstr ""

msgctxt "#30421"
msgid ""
"Are you sure you want to add your entire Trakt watchlist to Kodi library?"
msgstr ""

msgctxt "#30422"
msgid "You must authenticate with Trakt. Do you want to authenticate now?"
msgstr ""

msgctxt "#30423"
msgid "My calendar"
msgstr ""

msgctxt "#30500"
msgid "Live"
msgstr ""

msgctxt "#30501"
msgid "Enable Live Players"
msgstr ""

msgctxt "#30510"
msgid "Prefered Live Player"
msgstr ""

msgctxt "#30001"
msgid "Move down"
msgstr ""

msgctxt "#30002"
msgid "Move up"
msgstr ""

msgctxt "#30003"
msgid "Clear channels"
msgstr ""

msgctxt "#30004"
msgid "Remove channel"
msgstr ""
17 changes: 13 additions & 4 deletions plugin.video.meta/resources/lib/meta/library/movies.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,16 @@ def update_library():
def add_movie_to_library(library_folder, src, id, date):
changed = False

# create movie folder
movie_folder = os.path.join(library_folder, str(id)+'/')
if not xbmcvfs.exists(movie_folder):
try:
xbmcvfs.mkdir(movie_folder)
except:
pass

# create nfo file
nfo_filepath = os.path.join(library_folder, str(id)+".nfo")
nfo_filepath = os.path.join(movie_folder, str(id)+".nfo")
if not xbmcvfs.exists(nfo_filepath):
changed = True
nfo_file = xbmcvfs.File(nfo_filepath, 'w')
Expand All @@ -87,7 +95,7 @@ def add_movie_to_library(library_folder, src, id, date):
os.utime(nfo_filepath, (date,date))

# create strm file
strm_filepath = os.path.join(library_folder, str(id)+".strm")
strm_filepath = os.path.join(movie_folder, str(id)+".strm")
if not xbmcvfs.exists(strm_filepath):
changed = True
strm_file = xbmcvfs.File(strm_filepath, 'w')
Expand All @@ -110,11 +118,12 @@ def setup_library(library_folder):
# auto configure folder
msg = _("Would you like to automatically set Meta as a movies video source?")
if dialogs.yesno(_("Library setup"), msg):
source_thumbnail = "special://home/addons/plugin.video.meta/resources/img/movies.png"
source_name = "Meta Movies"

source_content = "('{0}','movies','metadata.themoviedb.org','',2147483647,0,'<settings><setting id=\"RatingS\" value=\"TMDb\" /><setting id=\"certprefix\" value=\"Rated \" /><setting id=\"fanart\" value=\"true\" /><setting id=\"keeporiginaltitle\" value=\"false\" /><setting id=\"language\" value=\"{1}\" /><setting id=\"tmdbcertcountry\" value=\"us\" /><setting id=\"trailer\" value=\"true\" /></settings>',0,0,NULL,NULL)".format(library_folder, LANG)
source_content = "('{0}','movies','metadata.themoviedb.org','',2147483647,1,'<settings><setting id=\"RatingS\" value=\"TMDb\" /><setting id=\"certprefix\" value=\"Rated \" /><setting id=\"fanart\" value=\"true\" /><setting id=\"keeporiginaltitle\" value=\"false\" /><setting id=\"language\" value=\"{1}\" /><setting id=\"tmdbcertcountry\" value=\"us\" /><setting id=\"trailer\" value=\"true\" /></settings>',0,0,NULL,NULL)".format(library_folder, LANG)

add_source(source_name, library_folder, source_content)
add_source(source_name, library_folder, source_content, source_thumbnail)

# return translated path
return xbmc.translatePath(library_folder)
22 changes: 17 additions & 5 deletions plugin.video.meta/resources/lib/meta/library/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_episode_from_library(imdbnumber, season, episode):
return {'label': ep['title'], 'path': ep['file']}
return None

def add_source(source_name, source_path, source_content):
def add_source(source_name, source_path, source_content, source_thumbnail):
xml_file = xbmc.translatePath('special://profile/sources.xml')
if not os.path.exists(xml_file):
with open(xml_file, "w") as f:
Expand All @@ -78,12 +78,12 @@ def add_source(source_name, source_path, source_content):
if existing_source and existing_source != source_path:
_remove_source_content(existing_source)

if _add_source_xml(xml_file, source_name, source_path):
if _add_source_xml(xml_file, source_name, source_path, source_thumbnail):
_set_source_content(source_content)

######### XML functions #########

def _add_source_xml(xml_file, name, path):
def _add_source_xml(xml_file, name, path, thumbnail):
tree = ET.parse(xml_file)
root = tree.getroot()
sources = root.find('video')
Expand All @@ -93,26 +93,38 @@ def _add_source_xml(xml_file, name, path):
for source in sources.findall('source'):
xml_name = source.find("name").text
xml_path = source.find("path").text
if xml_name == name or xml_path == path:
xml_thumbnail = source.find("thumbnail").text
if xml_name == name or xml_path == path or xml_thumbnail == thumbnail:
existing_source = source
break

if existing_source is not None:
xml_name = source.find("name").text
xml_path = source.find("path").text
if xml_name == name and xml_path == path:
xml_thumbnail = source.find("thumbnail").text
if xml_name == name and xml_path == path and xml_thumbnail == thumbnail:
return False
elif xml_name == name:
source.find("path").text = path
source.find("thumbnail").text = thumbnail
elif xml_path == path:
source.find("name").text = name
source.find("thumbnail").text = thumbnail
else:
source.find("path").text = path
source.find("name").text = name
else:
new_source = ET.SubElement(sources, 'source')
new_name = ET.SubElement(new_source, 'name')
new_name.text = name
new_path = ET.SubElement(new_source, 'path')
new_thumbnail = ET.SubElement(new_source, 'thumbnail')
new_allowsharing = ET.SubElement(new_source, 'allowsharing')
new_path.attrib['pathversion'] = "1"
new_thumbnail.attrib['pathversion'] = "1"
new_path.text = path
new_thumbnail.text = thumbnail
new_allowsharing.text = "true"

_indent_xml(root)
tree.write(xml_file)
Expand Down
3 changes: 2 additions & 1 deletion plugin.video.meta/resources/lib/meta/library/tvshows.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,12 @@ def setup_library(library_folder):
# auto configure folder
msg = _("Would you like to automatically set Meta as a tv shows source?")
if dialogs.yesno(_("Library setup"), msg):
source_thumbnail = "special://home/addons/plugin.video.meta/resources/img/tv.png"
source_name = "Meta TVShows"

source_content = "('{0}','tvshows','metadata.tvdb.com','',0,0,'<settings><setting id=\"RatingS\" value=\"TheTVDB\" /><setting id=\"absolutenumber\" value=\"false\" /><setting id=\"dvdorder\" value=\"false\" /><setting id=\"fallback\" value=\"true\" /><setting id=\"fanart\" value=\"true\" /><setting id=\"language\" value=\"{1}\" /></settings>',0,0,NULL,NULL)".format(library_folder, LANG)

add_source(source_name, library_folder, source_content)
add_source(source_name, library_folder, source_content, source_thumbnail)

# return translated path
return xbmc.translatePath(library_folder)
2 changes: 1 addition & 1 deletion plugin.video.meta/resources/lib/meta/navigation/movies.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def movies_search():

@plugin.route('/movies/play_by_name/<name>/<lang>')
def movies_play_by_name(name, lang = "en"):
""" Activate tv search """
""" Activate movie search """
import_tmdb()
from meta.utils.text import parse_year

Expand Down