mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-11-07 00:46:34 +00:00
* Adjust refresh behavior
* Fix favorites
* Add option to mask info
* Fix keymap delete
* Fix empty show
* Version bump 3.1.14
* Reset rescan flag
* Fix subtitles encoding
* Fix path verification
* Fix update library
Plug in remove library percentage
* Fix unauthorized behavior
Reprompt user with login
* Fix series pooling
* Version bump 3.1.15
* Fix for additional users
Return all users, not just public users
* Fix http potential errors
Prevent from going further if {server} or {userid} is requested but not filled to avoid 401 errors
* Fix extra fanart
* Fix patch
make a case insensitive search
* Version bump 3.1.16
Additional logging, fix kodi source.
* Fix library tags on update
* Version bump 3.1.17
* Fix season artwork
* Fix season artwork
* Fix logging
* Fix blank files sources
* Add backup option
* Fix userdata song
* Transfer data.txt to data.json
Use default port for webserver caching
* Fix mixed content shortcut
* Fix path encoding for patch
Hopefully this works...
* Fix source nonetype error
Just incase, wrap in a try/except because it's not important.
* Base fast sync on server time
Try to fix music video refresh to prevent cursor from moving up.
* Prep subfolders for dynamic
Support homevideos for now
* Fix empty artist, missing Title
* Version bump 3.1.18a
* Version bump for objects
171076013
* Notify user of large updates
Give option to back out if the user wants to manually update the libraries
* Fix sources.xml verification
* Prevent error in monitor
Put in place try/except in case data is None
* Remember sync position for manual triggers
Allow to resume sync on restart for manual user triggers (update, repair). Automatically refresh boxsets if movie library is selected.
use waitForAbort and emby_should_stop prop to terminate threads
* Update string for sync later
* Add subfolders for dynamic movies
* Small fixes
* Version bump 3.1.19
* Fix fast sync
try/except, default back to previous behavior.
* Fix artwork
* Change settings name
To ensure it takes default value instead of previous value set in 3.0.34
* Fix transcode
flac and live tv
* Fix episodes for series pooling
* Add live tv support
* Version bump 3.1.20
* Revert "Small fixes"
This reverts commit 9ec1fa3585.
* Version bump 3.1.21
* Fix playback starting server connection instance
* Fix show update
* Fix boxsets
* Fix lastplayed
* Patch to support pre 3.6 libraries
* Fix slowness
* Plug in settings for threading
* Plug in settings for threading
* Adjust sleep behavior
* Version bump 3.1.22
* Fix server detection in monitor
* Version bump 3.1.23
* Fix potential error with checksum
* Fix missing new artists
* Fix library sync
Adjust lock, re-add screensaver deactivated during sync, prep compare sync, stop library updates from being processed before startup sync is completed
* Version bump 3.1.25
* Fix local trailers
* Adjust lock modification
* Check db version
* Prevent error from creating nodes
The addon automatically creates nodes at startup with prefilled information. Prevent errors in the event something goes wrong. It will fix itself down the line, after user has logged in.
* Version bump 3.1.26
* Revert "Version bump 3.1.26"
This reverts commit c583a69a4b.
* Fix screensaver toggle
* Fix source selection for direct stream
* Version bump 3.1.26
* Add progress for updates
* Revise progress bar
Fix typos and subsetting
* content notification
* Remove content with update library
Now remove irrelevant content as well
* Fix slowness
* Version bump 3.1.27
* Stop trying to get items if server offline
* Fix content type for dynamic music
* Fix resume sync
Now save progress, unless exited due to path validation
* Fix artwork for shortcuts on profile switch
* Add force transcode settings
* Fix audiobooks back to video type
Add shortcuts. Audiobook can't be music type otherwise it break resume behavior and it won't play the right item. Has to be video type.
* Update general info
To finish, download and installation
* Update README.md
* Move welcome message to service
* Prevent patch loop
Try once, then let it go, to avoid locking user in a restart loop
* Review library threads
* Prep for audiobook transcode
Still need to implement universal for audio transcode
* Version bump 3.1.28
* Fix emby database locked
* Fix regression to welcome message
* Version bump 3.1.29
* Adjust playback
Allow direct play for http streams
* Ensure all threads are terminated correctly
* Fix empty results due to error 500
* Fix boxset refresh
* Fix resume sync behavior
Allow to complete the startup sync in the event user backs out of resume sync
* Version bump 3.1.30
* Update patch
Move patch from cache to addon_data. No longer need to restart Kodi to apply the first patch.
* Fix inital sync leading to fast sync
* Fix user settings
Due to api change in 3.6.0.55
* krypton update
* Adjust for resume settings
With .55 the resume setting is set per library. Instead query server to see if the item is played to offer delete
* Restart service upon check for updates
To reload the new objects module.
* Fix update library
Only do the compare when user selects update library, also add a restart service option in the add-on settings > advanced
* Version bump 3.1.31
* Update dependencies
* Update FR translation
* Update DE translation
* Add translation
* Support up next
* Small service adjustment
* Krypton update to support upnext
* Add a verification onwake
Somehow, Kodi can trigger OnWake without first trigger OnSleep.
* Fix loading if special char in path
* Add logging and small fixes
Prepare userdata by date modified
* Version bump 3.1.32
* Change default behavior of startup dialog
In case it is forced closed by Kodi, allow the sync to proceed
* Ensure deliveryurl is an actual url
* Update README.md
* Fix nextup
* Fix dynamic widgets
* Detect coreelect, etc
* Fix progress report
Silent RefreshProgress in websocket
* Follow emby settings for subtitles
* Version bump 3.1.33
* Add Italian translation
* Fix playback for server 3.6.0.61
* Version bump 3.1.34a
* Add silent catch for errors
* Adjust playback progress monitor
Only track progress report if the item is an emby item
* Fix subtitles not following server settings
* Add remove libraries, fix mixed libraries
* Fix live tv
For now, use transcode since direct play returns a 127.0.0.1 unusable address as the path.
* Allow live tv to direct stream
* Fix LiveTV
* Add setting to sync during playback
* Fix updates
* Fix encoding error
* Add optional rotten tomatoes option
* Version bump 3.1.35
* Fix emby connect auth string
Was preventing proper device detection when using emby connect, play to, etc.
* Add setup RT
* Fix audio/sub change
Only for addon playback
* Add developer mode
* Update patch
Check for updates + dev = forced grab from github
* Fix RT string
* Fix patch
Allow dev mode to redownload zip
* Fix patch
ugh sleep!!
* Verify patch connection
* Version bump 3.1.36
* Fix libraries being wiped
Catch errors to prevent false positive
* Add dateutil library
* Prep convert to local time
* Fix string
* Prep for multi db version support
* Fix service restart
* Add shortcut restart addon
Add notification
* Add database discovery
* Ensure previous playback terminated
* Update translation
New: Polish, Dutch Updated: German, French, Italian
* Version bump 3.1.37
* Quick fix for new library dateutil
* Catch error for dateutil
In the event the server has some weird date that can't be converted
* Version bump 3.1.38
* Fix dateutil import
* Fix db discovery
Ignore emby.db
* Version bump 3.1.39
* Add a delay if setup not completed
Avoid crash from everything loading at once.
* Fix database discovery
Add table verification + date modified verification
* Container optional playutils
* Version bump 3.1.40
* Adjust database discovery
Compare loaded vs discovered to avoid loading old databases by accident.
* Version bump 3.1.41
* Fix discovery toggle
* Version bump 3.1.42
* Add webservice for playback prep
* Fix service restart
* Version bump 3.1.43
* Update default sync indicator
Based on overall feedback
* Fix check update
* Fix if server is selected but unavailable
* Support songs without albums
* Fix encode and params
* Increase retry timeout
* Fix update generating duplicates
* Add manage libraries
Too many entries
* Fix database discovery
* Fixed transcode via context menu
* Fix context transcode
* Quiet webservice
* Update Krypton objects
* Fix database discovery prompt
* fixed video listitem issues for krypton
* load all item details for playlists
* Fix playlist
* Version bump 3.1.44
* Fix force hi10p transcoding behavior
Fixes the "Force Hi10p transcoding" option to only apply to h264 video codecs
* Clear playlist on player.onstop
* Don't clear playlist if busy spinner is active
* Fix case sensitive issue at calling the log function
* fix db stuff (#164)
* Reload objects upon initial setup
* Fix database discovery
ignore db-journal
* Update translation
German, Italian
* Use LastConnectionMode for server test
* Fix compare sync
* Version bump 3.1.45
* Ensure widgets get updated
Container.Refresh alone doesn't seem to work
* Update database discovery
* Re-add texture to database discovery
* Add option to enable/disable service
* Remove unused strings
* Fix object reload upon restart service
* Update Krypton objects
* Update translation
Dutch, Polish
* Version bump 3.1.46
* Adjust client api
* Adjust subtitles behavior
* Fix string typo
* Only run one full sync instance
Prevent user from launching multiple syncs and freezing the add-on.
* added "playlists" to wnodes
* Disable Audiobooks
Server doesn't have a set structure yet. This feature is broken atm.
* Version bump 4.0.0
* License GPL v3
* Update readme
550 lines
21 KiB
Python
550 lines
21 KiB
Python
|
|
''' Queries for the Kodi database. obj reflect key/value to retrieve from emby items.
|
|
Some functions require additional information, therefore obj do not always reflect
|
|
the Kodi database query values.
|
|
'''
|
|
create_path = """ SELECT coalesce(max(idPath), 0)
|
|
FROM path
|
|
"""
|
|
create_file = """ SELECT coalesce(max(idFile), 0)
|
|
FROM files
|
|
"""
|
|
create_person = """ SELECT coalesce(max(actor_id), 0)
|
|
FROM actor
|
|
"""
|
|
create_genre = """ SELECT coalesce(max(genre_id), 0)
|
|
FROM genre
|
|
"""
|
|
create_studio = """ SELECT coalesce(max(studio_id), 0)
|
|
FROM studio
|
|
"""
|
|
create_bookmark = """ SELECT coalesce(max(idBookmark), 0)
|
|
FROM bookmark
|
|
"""
|
|
create_tag = """ SELECT coalesce(max(tag_id), 0)
|
|
FROM tag
|
|
"""
|
|
create_unique_id = """ SELECT coalesce(max(uniqueid_id), 0)
|
|
FROM uniqueid
|
|
"""
|
|
create_rating = """ SELECT coalesce(max(rating_id), 0)
|
|
FROM rating
|
|
"""
|
|
create_movie = """ SELECT coalesce(max(idMovie), 0)
|
|
FROM movie
|
|
"""
|
|
create_set = """ SELECT coalesce(max(idSet), 0)
|
|
FROM sets
|
|
"""
|
|
create_country = """ SELECT coalesce(max(country_id), 0)
|
|
FROM country
|
|
"""
|
|
create_musicvideo = """ SELECT coalesce(max(idMVideo), 0)
|
|
FROM musicvideo
|
|
"""
|
|
create_tvshow = """ SELECT coalesce(max(idShow), 0)
|
|
FROM tvshow
|
|
"""
|
|
create_season = """ SELECT coalesce(max(idSeason), 0)
|
|
FROM seasons
|
|
"""
|
|
create_episode = """ SELECT coalesce(max(idEpisode), 0)
|
|
FROM episode
|
|
"""
|
|
|
|
|
|
get_path = """ SELECT idPath
|
|
FROM path
|
|
WHERE strPath = ?
|
|
"""
|
|
get_path_obj = [ "{Path}"
|
|
]
|
|
get_file = """ SELECT idFile
|
|
FROM files
|
|
WHERE idPath = ?
|
|
AND strFilename = ?
|
|
"""
|
|
get_file_obj = [ "{FileId}"
|
|
]
|
|
get_filename = """ SELECT strFilename
|
|
FROM files
|
|
WHERE idFile = ?
|
|
"""
|
|
get_person = """ SELECT actor_id
|
|
FROM actor
|
|
WHERE name = ?
|
|
COLLATE NOCASE
|
|
"""
|
|
get_genre = """ SELECT genre_id
|
|
FROM genre
|
|
WHERE name = ?
|
|
COLLATE NOCASE
|
|
"""
|
|
get_studio = """ SELECT studio_id
|
|
FROM studio
|
|
WHERE name = ?
|
|
COLLATE NOCASE
|
|
"""
|
|
get_tag = """ SELECT tag_id
|
|
FROM tag
|
|
WHERE name = ?
|
|
COLLATE NOCASE
|
|
"""
|
|
get_tag_movie_obj = [ "Favorite movies","{MovieId}","movie"
|
|
]
|
|
get_tag_mvideo_obj = [ "Favorite musicvideos","{MvideoId}","musicvideo"
|
|
]
|
|
get_tag_episode_obj = [ "Favorite tvshows","{KodiId}","tvshow"
|
|
]
|
|
get_art = """ SELECT url
|
|
FROM art
|
|
WHERE media_id = ?
|
|
AND media_type = ?
|
|
AND type = ?
|
|
"""
|
|
get_movie = """ SELECT *
|
|
FROM movie
|
|
WHERE idMovie = ?
|
|
"""
|
|
get_movie_obj = [ "{MovieId}"
|
|
]
|
|
get_rating = """ SELECT rating_id
|
|
FROM rating
|
|
WHERE media_type = ?
|
|
AND media_id = ?
|
|
"""
|
|
get_rating_movie_obj = [ "movie","{MovieId}"
|
|
]
|
|
get_rating_episode_obj = [ "episode","{EpisodeId}"
|
|
]
|
|
get_unique_id = """ SELECT uniqueid_id
|
|
FROM uniqueid
|
|
WHERE media_type = ?
|
|
AND media_id = ?
|
|
"""
|
|
get_unique_id_movie_obj = [ "movie","{MovieId}"
|
|
]
|
|
get_unique_id_tvshow_obj = [ "tvshow","{ShowId}"
|
|
]
|
|
get_unique_id_episode_obj = [ "episode","{EpisodeId}"
|
|
]
|
|
get_country = """ SELECT country_id
|
|
FROM country
|
|
WHERE name = ?
|
|
COLLATE NOCASE
|
|
"""
|
|
get_set = """ SELECT idSet
|
|
FROM sets
|
|
WHERE strSet = ?
|
|
COLLATE NOCASE
|
|
"""
|
|
get_musicvideo = """ SELECT *
|
|
FROM musicvideo
|
|
WHERE idMVideo = ?
|
|
"""
|
|
get_musicvideo_obj = [ "{MvideoId}"
|
|
]
|
|
get_tvshow = """ SELECT *
|
|
FROM tvshow
|
|
WHERE idShow = ?
|
|
"""
|
|
get_tvshow_obj = [ "{ShowId}"
|
|
]
|
|
get_episode = """ SELECT *
|
|
FROM episode
|
|
WHERE idEpisode = ?
|
|
"""
|
|
get_episode_obj = [ "{EpisodeId}"
|
|
]
|
|
get_season = """ SELECT idSeason
|
|
FROM seasons
|
|
WHERE idShow = ?
|
|
AND season = ?
|
|
"""
|
|
get_season_obj = [ "{Title}","{ShowId}","{Index}"
|
|
]
|
|
get_season_special_obj = [ None,"{ShowId}",-1
|
|
]
|
|
get_season_episode_obj = [ None,"{ShowId}","{Season}"
|
|
]
|
|
get_backdrops = """ SELECT url
|
|
FROM art
|
|
WHERE media_id = ?
|
|
AND media_type = ?
|
|
AND type LIKE ?
|
|
"""
|
|
get_art = """ SELECT url
|
|
FROM art
|
|
WHERE media_id = ?
|
|
AND media_type = ?
|
|
AND type = ?
|
|
"""
|
|
get_art_url = """ SELECT url, type
|
|
FROM art
|
|
WHERE media_id = ?
|
|
AND media_type = ?
|
|
"""
|
|
get_show_by_unique_id = """ SELECT idShow
|
|
FROM tvshow_view
|
|
WHERE uniqueid_value = ?
|
|
"""
|
|
|
|
get_total_episodes = """ SELECT totalCount
|
|
FROM tvshowcounts
|
|
WHERE idShow = ?
|
|
"""
|
|
get_total_episodes_obj = [ "{ParentId}"
|
|
]
|
|
|
|
|
|
|
|
add_path = """ INSERT INTO path(idPath, strPath)
|
|
VALUES (?, ?)
|
|
"""
|
|
add_path_obj = [ "{Path}"
|
|
]
|
|
add_file = """ INSERT INTO files(idFile, idPath, strFilename)
|
|
VALUES (?, ?, ?)
|
|
"""
|
|
add_file_obj = [ "{PathId}","{Filename}"
|
|
]
|
|
add_person = """ INSERT INTO actor(actor_id, name)
|
|
VALUES (?, ?)
|
|
"""
|
|
add_people_movie_obj = [ "{People}","{MovieId}","movie"
|
|
]
|
|
add_people_mvideo_obj = [ "{People}","{MvideoId}","musicvideo"
|
|
]
|
|
add_people_tvshow_obj = [ "{People}","{ShowId}","tvshow"
|
|
]
|
|
add_people_episode_obj = [ "{People}","{EpisodeId}","episode"
|
|
]
|
|
add_actor_link = """ INSERT INTO actor_link(actor_id, media_id, media_type, role, cast_order)
|
|
VALUES (?, ?, ?, ?, ?)
|
|
"""
|
|
add_link = """ INSERT INTO {LinkType}(actor_id, media_id, media_type)
|
|
VALUES (?, ?, ?)
|
|
"""
|
|
add_genre = """ INSERT INTO genre(genre_id, name)
|
|
VALUES (?, ?)
|
|
"""
|
|
add_genres_movie_obj = [ "{Genres}","{MovieId}","movie"
|
|
]
|
|
add_genres_mvideo_obj = [ "{Genres}","{MvideoId}","musicvideo"
|
|
]
|
|
add_genres_tvshow_obj = [ "{Genres}","{ShowId}","tvshow"
|
|
]
|
|
add_studio = """ INSERT INTO studio(studio_id, name)
|
|
VALUES (?, ?)
|
|
"""
|
|
add_studios_movie_obj = [ "{Studios}","{MovieId}","movie"
|
|
]
|
|
add_studios_mvideo_obj = [ "{Studios}","{MvideoId}","musicvideo"
|
|
]
|
|
add_studios_tvshow_obj = [ "{Studios}","{ShowId}","tvshow"
|
|
]
|
|
add_bookmark = """ INSERT INTO bookmark(idBookmark, idFile, timeInSeconds, totalTimeInSeconds, player, type)
|
|
VALUES (?, ?, ?, ?, ?, ?)
|
|
"""
|
|
add_bookmark_obj = [ "{FileId}","{PlayCount}","{DatePlayed}","{Resume}","{Runtime}","DVDPlayer",1
|
|
]
|
|
add_streams_obj = [ "{FileId}","{Streams}","{Runtime}"
|
|
]
|
|
add_stream_video = """ INSERT INTO streamdetails(idFile, iStreamType, strVideoCodec, fVideoAspect, iVideoWidth,
|
|
iVideoHeight, iVideoDuration, strStereoMode)
|
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
"""
|
|
add_stream_video_obj = [ "{FileId}",0,"{codec}","{aspect}","{width}","{height}","{Runtime}","{3d}"
|
|
]
|
|
add_stream_audio = """ INSERT INTO streamdetails(idFile, iStreamType, strAudioCodec, iAudioChannels, strAudioLanguage)
|
|
VALUES (?, ?, ?, ?, ?)
|
|
"""
|
|
add_stream_audio_obj = [ "{FileId}",1,"{codec}","{channels}","{language}"
|
|
]
|
|
add_stream_sub = """ INSERT INTO streamdetails(idFile, iStreamType, strSubtitleLanguage)
|
|
VALUES (?, ?, ?)
|
|
"""
|
|
add_stream_sub_obj = [ "{FileId}",2,"{language}"
|
|
]
|
|
add_tag = """ INSERT INTO tag(tag_id, name)
|
|
VALUES (?, ?)
|
|
"""
|
|
add_tags_movie_obj = [ "{Tags}","{MovieId}","movie"
|
|
]
|
|
add_tags_mvideo_obj = [ "{Tags}","{MvideoId}","musicvideo"
|
|
]
|
|
add_tags_tvshow_obj = [ "{Tags}","{ShowId}","tvshow"
|
|
]
|
|
add_art = """ INSERT INTO art(media_id, media_type, type, url)
|
|
VALUES (?, ?, ?, ?)
|
|
"""
|
|
add_movie = """ INSERT INTO movie(idMovie, idFile, c00, c01, c02, c03, c04, c05, c06, c07,
|
|
c09, c10, c11, c12, c14, c15, c16, c18, c19, c21, userrating, premiered)
|
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
"""
|
|
add_movie_obj = [ "{MovieId}","{FileId}","{Title}","{Plot}","{ShortPlot}","{Tagline}",
|
|
"{Votes}","{RatingId}","{Writers}","{Year}","{Unique}","{SortTitle}",
|
|
"{Runtime}","{Mpaa}","{Genre}","{Directors}","{Title}","{Studio}",
|
|
"{Trailer}","{Country}","{CriticRating}","{Year}"
|
|
]
|
|
add_rating = """ INSERT INTO rating(rating_id, media_id, media_type, rating_type, rating, votes)
|
|
VALUES (?, ?, ?, ?, ?, ?)
|
|
"""
|
|
add_rating_movie_obj = [ "{RatingId}","{MovieId}","movie","default","{Rating}","{Votes}"
|
|
]
|
|
add_rating_tvshow_obj = [ "{RatingId}","{ShowId}","tvshow","default","{Rating}","{Votes}"
|
|
]
|
|
add_rating_episode_obj = [ "{RatingId}","{EpisodeId}","episode","default","{Rating}","{Votes}"
|
|
]
|
|
add_unique_id = """ INSERT INTO uniqueid(uniqueid_id, media_id, media_type, value, type)
|
|
VALUES (?, ?, ?, ?, ?)
|
|
"""
|
|
add_unique_id_movie_obj = [ "{Unique}","{MovieId}","movie","{UniqueId}","{ProviderName}"
|
|
]
|
|
add_unique_id_tvshow_obj = [ "{Unique}","{ShowId}","tvshow","{UniqueId}","{ProviderName}"
|
|
]
|
|
add_unique_id_episode_obj = [ "{Unique}","{EpisodeId}","episode","{UniqueId}","{ProviderName}"
|
|
]
|
|
add_country = """ INSERT INTO country(country_id, name)
|
|
VALUES (?, ?)
|
|
"""
|
|
add_set = """ INSERT INTO sets(idSet, strSet, strOverview)
|
|
VALUES (?, ?, ?)
|
|
"""
|
|
add_set_obj = [ "{Title}","{Overview}"
|
|
]
|
|
add_musicvideo = """ INSERT INTO musicvideo(idMVideo,idFile, c00, c04, c05, c06, c07, c08, c09, c10,
|
|
c11, c12, premiered)
|
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
"""
|
|
add_musicvideo_obj = [ "{MvideoId}","{FileId}","{Title}","{Runtime}","{Directors}","{Studio}","{Year}",
|
|
"{Plot}","{Album}","{Artists}","{Genre}","{Index}","{Premiere}"
|
|
]
|
|
add_tvshow = """ INSERT INTO tvshow(idShow, c00, c01, c02, c04, c05, c08, c09, c12, c13, c14, c15)
|
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
"""
|
|
add_tvshow_obj = [ "{ShowId}","{Title}","{Plot}","{Status}","{RatingId}","{Premiere}","{Genre}","{Title}",
|
|
"{Unique}","{Mpaa}","{Studio}","{SortTitle}"
|
|
]
|
|
add_season = """ INSERT INTO seasons(idSeason, idShow, season)
|
|
VALUES (?, ?, ?)
|
|
"""
|
|
add_episode = """ INSERT INTO episode(idEpisode, idFile, c00, c01, c03, c04, c05, c09, c10, c12, c13, c14,
|
|
idShow, c15, c16, idSeason)
|
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
"""
|
|
add_episode_obj = [ "{EpisodeId}","{FileId}","{Title}","{Plot}","{RatingId}","{Writers}","{Premiere}","{Runtime}",
|
|
"{Directors}","{Season}","{Index}","{Title}","{ShowId}","{AirsBeforeSeason}",
|
|
"{AirsBeforeEpisode}","{SeasonId}"
|
|
]
|
|
add_art = """ INSERT INTO art(media_id, media_type, type, url)
|
|
VALUES (?, ?, ?, ?)
|
|
"""
|
|
|
|
|
|
|
|
update_path = """ UPDATE path
|
|
SET strPath = ?, strContent = ?, strScraper = ?, noUpdate = ?
|
|
WHERE idPath = ?
|
|
"""
|
|
update_path_movie_obj = [ "{Path}","movies","metadata.local",1,"{PathId}"
|
|
]
|
|
update_path_toptvshow_obj = [ "{TopLevel}","tvshows","metadata.local",1,"{TopPathId}"
|
|
]
|
|
update_path_tvshow_obj = [ "{Path}",None,None,1,"{PathId}"
|
|
]
|
|
update_path_episode_obj = [ "{Path}",None,None,1,"{PathId}"
|
|
]
|
|
update_path_mvideo_obj = [ "{Path}","musicvideos","metadata.local",1,"{PathId}"
|
|
]
|
|
update_file = """ UPDATE files
|
|
SET idPath = ?, strFilename = ?, dateAdded = ?
|
|
WHERE idFile = ?
|
|
"""
|
|
update_file_obj = [ "{PathId}","{Filename}","{DateAdded}","{FileId}"
|
|
]
|
|
update_genres = """ INSERT OR REPLACE INTO genre_link(genre_id, media_id, media_type)
|
|
VALUES (?, ?, ?)
|
|
"""
|
|
update_studios = """ INSERT OR REPLACE INTO studio_link(studio_id, media_id, media_type)
|
|
VALUES (?, ?, ?)
|
|
"""
|
|
update_playcount = """ UPDATE files
|
|
SET playCount = ?, lastPlayed = ?
|
|
WHERE idFile = ?
|
|
"""
|
|
update_tag = """ INSERT OR REPLACE INTO tag_link(tag_id, media_id, media_type)
|
|
VALUES (?, ?, ?)
|
|
"""
|
|
update_art = """ UPDATE art
|
|
SET url = ?
|
|
WHERE media_id = ?
|
|
AND media_type = ?
|
|
AND type = ?
|
|
"""
|
|
update_actor = """ INSERT OR REPLACE INTO actor_link(actor_id, media_id, media_type, role, cast_order)
|
|
VALUES (?, ?, ?, ?, ?)
|
|
"""
|
|
|
|
update_link = """ INSERT OR REPLACE INTO {LinkType}(actor_id, media_id, media_type)
|
|
VALUES (?, ?, ?)
|
|
"""
|
|
update_movie = """ UPDATE movie
|
|
SET c00 = ?, c01 = ?, c02 = ?, c03 = ?, c04 = ?, c05 = ?, c06 = ?,
|
|
c07 = ?, c09 = ?, c10 = ?, c11 = ?, c12 = ?, c14 = ?, c15 = ?,
|
|
c16 = ?, c18 = ?, c19 = ?, c21 = ?, userrating = ?, premiered = ?
|
|
WHERE idMovie = ?
|
|
"""
|
|
update_movie_obj = [ "{Title}","{Plot}","{ShortPlot}","{Tagline}","{Votes}","{RatingId}",
|
|
"{Writers}","{Year}","{Unique}","{SortTitle}","{Runtime}",
|
|
"{Mpaa}","{Genre}","{Directors}","{Title}","{Studio}","{Trailer}",
|
|
"{Country}","{CriticRating}","{Year}","{MovieId}"
|
|
]
|
|
update_rating = """ UPDATE rating
|
|
SET media_id = ?, media_type = ?, rating_type = ?, rating = ?, votes = ?
|
|
WHERE rating_id = ?
|
|
"""
|
|
update_rating_movie_obj = [ "{MovieId}","movie","default","{Rating}","{Votes}","{RatingId}"
|
|
]
|
|
update_rating_tvshow_obj = [ "{ShowId}","tvshow","default","{Rating}","{Votes}","{RatingId}"
|
|
]
|
|
update_rating_episode_obj = [ "{EpisodeId}","episode","default","{Rating}","{Votes}","{RatingId}"
|
|
]
|
|
update_unique_id = """ UPDATE uniqueid
|
|
SET media_id = ?, media_type = ?, value = ?, type = ?
|
|
WHERE uniqueid_id = ?
|
|
"""
|
|
update_unique_id_movie_obj = [ "{MovieId}","movie","{UniqueId}","{ProviderName}","{Unique}"
|
|
]
|
|
update_unique_id_tvshow_obj = [ "{ShowId}","tvshow","{UniqueId}","{ProviderName}","{Unique}"
|
|
]
|
|
update_unique_id_episode_obj = [ "{EpisodeId}","episode","{UniqueId}","{ProviderName}","{Unique}"
|
|
]
|
|
update_country = """ INSERT OR REPLACE INTO country_link(country_id, media_id, media_type)
|
|
VALUES (?, ?, ?)
|
|
"""
|
|
update_country_obj = [ "{Countries}","{MovieId}","movie"
|
|
]
|
|
update_set = """ UPDATE sets
|
|
SET strSet = ?, strOverview = ?
|
|
WHERE idSet = ?
|
|
"""
|
|
update_set_obj = [ "{Title}", "{Overview}", "{SetId}"
|
|
]
|
|
update_movie_set = """ UPDATE movie
|
|
SET idSet = ?
|
|
WHERE idMovie = ?
|
|
"""
|
|
update_movie_set_obj = [ "{SetId}","{MovieId}"
|
|
]
|
|
update_musicvideo = """ UPDATE musicvideo
|
|
SET c00 = ?, c04 = ?, c05 = ?, c06 = ?, c07 = ?, c08 = ?, c09 = ?, c10 = ?,
|
|
c11 = ?, c12 = ?, premiered = ?
|
|
WHERE idMVideo = ?
|
|
"""
|
|
update_musicvideo_obj = [ "{Title}","{Runtime}","{Directors}","{Studio}","{Year}","{Plot}","{Album}",
|
|
"{Artists}","{Genre}","{Index}","{Premiere}","{MvideoId}"
|
|
]
|
|
update_tvshow = """ UPDATE tvshow
|
|
SET c00 = ?, c01 = ?, c02 = ?, c04 = ?, c05 = ?, c08 = ?, c09 = ?,
|
|
c12 = ?, c13 = ?, c14 = ?, c15 = ?
|
|
WHERE idShow = ?
|
|
"""
|
|
update_tvshow_obj = [ "{Title}","{Plot}","{Status}","{RatingId}","{Premiere}","{Genre}","{Title}",
|
|
"{Unique}","{Mpaa}","{Studio}","{SortTitle}","{ShowId}"
|
|
]
|
|
update_tvshow_link = """ INSERT OR REPLACE INTO tvshowlinkpath(idShow, idPath)
|
|
VALUES (?, ?)
|
|
"""
|
|
update_tvshow_link_obj = [ "{ShowId}","{PathId}"
|
|
]
|
|
update_season = """ UPDATE seasons
|
|
SET name = ?
|
|
WHERE idSeason = ?
|
|
"""
|
|
update_episode = """ UPDATE episode
|
|
SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?,
|
|
c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, idSeason = ?, idShow = ?
|
|
WHERE idEpisode = ?
|
|
"""
|
|
update_episode_obj = [ "{Title}","{Plot}","{RatingId}","{Writers}","{Premiere}","{Runtime}","{Directors}",
|
|
"{Season}","{Index}","{Title}","{AirsBeforeSeason}","{AirsBeforeEpisode}","{SeasonId}",
|
|
"{ShowId}","{EpisodeId}"
|
|
]
|
|
|
|
|
|
|
|
delete_path = """ DELETE FROM path
|
|
WHERE idPath = ?
|
|
"""
|
|
delete_path_obj = [ "{PathId}"
|
|
]
|
|
delete_file = """ DELETE FROM files
|
|
WHERE idFile = ?
|
|
"""
|
|
delete_file_obj = [ "{Path}","{Filename}"
|
|
]
|
|
delete_file_by_path = """ DELETE FROM files
|
|
WHERE idPath = ?
|
|
AND strFileName = ?
|
|
"""
|
|
delete_genres = """ DELETE FROM genre_link
|
|
WHERE media_id = ?
|
|
AND media_type = ?
|
|
"""
|
|
delete_bookmark = """ DELETE FROM bookmark
|
|
WHERE idFile = ?
|
|
"""
|
|
delete_streams = """ DELETE FROM streamdetails
|
|
WHERE idFile = ?
|
|
"""
|
|
delete_tags = """ DELETE FROM tag_link
|
|
WHERE media_id = ?
|
|
AND media_type = ?
|
|
"""
|
|
delete_tag = """ DELETE FROM tag_link
|
|
WHERE tag_id = ?
|
|
AND media_id = ?
|
|
AND media_type = ?
|
|
"""
|
|
delete_tag_movie_obj = [ "Favorite movies","{MovieId}","movie"
|
|
]
|
|
delete_tag_mvideo_obj = [ "Favorite musicvideos","{MvideoId}","musicvideo"
|
|
]
|
|
delete_tag_episode_obj = [ "Favorite tvshows","{KodiId}","tvshow"
|
|
]
|
|
delete_movie = """ DELETE FROM movie
|
|
WHERE idMovie = ?
|
|
"""
|
|
delete_movie_obj = [ "{KodiId}","{FileId}"
|
|
]
|
|
delete_set = """ DELETE FROM sets
|
|
WHERE idSet = ?
|
|
"""
|
|
delete_set_obj = [ "{KodiId}"
|
|
]
|
|
delete_movie_set = """ UPDATE movie
|
|
SET idSet = null
|
|
WHERE idMovie = ?
|
|
"""
|
|
delete_movie_set_obj = [ "{MovieId}"
|
|
]
|
|
delete_musicvideo = """ DELETE FROM musicvideo
|
|
WHERE idMVideo = ?
|
|
"""
|
|
delete_musicvideo_obj = [ "{MvideoId}", "{FileId}"
|
|
]
|
|
delete_tvshow = """ DELETE FROM tvshow
|
|
WHERE idShow = ?
|
|
"""
|
|
delete_season = """ DELETE FROM seasons
|
|
WHERE idSeason = ?
|
|
"""
|
|
delete_episode = """ DELETE FROM episode
|
|
WHERE idEpisode = ?
|
|
"""
|
|
delete_backdrops = """ DELETE FROM art
|
|
WHERE media_id = ?
|
|
AND media_type = ?
|
|
AND type LIKE ?
|
|
"""
|