Commit graph

440 commits

Author SHA1 Message Date
9971940cac [websocket] Remove deprecated base64.encodestring
Clean up _validate_header a little bit
2020-11-29 19:25:49 +01:00
Abby Gourlay
8de6c30417 Fixing pipeline complaint about import order 2020-11-28 22:12:06 +00:00
Abby Gourlay
f0b0f551b6 Fixed dialog for deleting items + setup JellyfinClient for non-default entrypoints 2020-11-28 22:06:17 +00:00
146bd401bf HTTP 400: Log response body when it can't be decoded as json 2020-11-26 16:58:14 +01:00
8a9b69f2f5 Remove extra leading slash from the KodiSyncQueue ping endpoint 2020-11-26 16:58:14 +01:00
6c3b682ef0 Log HTTP 400 json payloads 2020-11-26 16:58:14 +01:00
a7e4fa8a5c
Merge pull request #425 from mcarlton00/BEGONE-SATAN
Remove TheVoid
2020-11-26 16:55:27 +01:00
Matt
bceeff4754 Fix missing apiclient on other PlayUtils actions 2020-11-23 20:41:32 -05:00
Matt
a3ce3ae4fa Fix voidless intros 2020-11-23 20:38:24 -05:00
Matt
22340e4e30 Create mysterious missing directory 2020-11-23 20:30:02 -05:00
Matt
144f71e71f Remove verify_kodi_defaults function 2020-11-18 19:36:41 -05:00
Matt
e487163ca2 Make the linter happy 2020-11-17 19:23:40 -05:00
Matt
bf4c385283 Fix fanart 2020-11-17 19:06:24 -05:00
Matt
feea23e9da Voidless playback. Slightly important 2020-11-17 12:10:04 -05:00
Matt
4a437f7a2b Make addon menu work without TheVoid 2020-11-17 11:01:55 -05:00
cvium
b6e2d0bbf3 Remove unused import 2020-11-17 11:01:00 -05:00
cvium
21cf8bcb68 Fix some linting issues 2020-11-17 11:01:00 -05:00
cvium
096680bc57 Remove unneeded import 2020-11-17 11:01:00 -05:00
cvium
a009530434 Byebye TheVoid 2020-11-17 11:00:50 -05:00
020bd59766 Fixes jellyfin/jellyfin-kodi#421
Jellyfin autodiscovery is IPv4 broadcast only.
We're not binding to a specific port, no need for SO_REUSEADDR.

IP_MULTICAST_LOOP belongs to IPPROTO_IP
https://tldp.org/HOWTO/Multicast-HOWTO-6.html
and SO_REUSEADDR belongs to SOL_SOCKET
https://docs.microsoft.com/en-us/windows/win32/winsock/sol-socket-socket-options
2020-11-15 18:50:54 +01:00
mcarlton00
711f2e1fcf
Merge pull request #417 from Electry/subs-extraction-fix
Don't force-extract subs for transcoded content
2020-11-04 22:45:31 -05:00
mammo0
dd7bca756a Merge branch 'master' into fix_for_#350 2020-11-02 09:55:46 +01:00
mammo0
5522c93458
set DTHREADS as semaphore size 2020-11-02 09:40:13 +01:00
Michal Chvíla
65b1704365 playutils: Show embedded subs in sub track selection dialog
* show embedded subtitles in subtitle track selection dialog when transcoding
  if server subtitle extraction is enabled
2020-10-29 16:11:56 +01:00
Michal Chvíla
fd93723968 playutils: Honor EnableSubtitleExtraction server option
* fix bug where subtitle streams that don't support external streaming
  would show up in video player OSD selection as external when transcoding
  (e.g. embedded PGSSUB)
* fix bug where EnableSubtitleExtraction server setting wasn't taken
  into consideration when transcoding
2020-10-28 11:45:43 +01:00
ccdcf27ec4
Merge pull request #412 from mcarlton00/quit-yelling-at-me
Fix db error messages on startup
2020-10-20 22:50:43 +02:00
macearl
5ce1b7d3e6 move LIMIT/DTHREADS into function _get_items to allow for on the fly changes without a restart or reboot 2020-10-19 19:52:06 +02:00
Matt
70160d2bb8 Fix db error messages on startup 2020-10-17 20:15:53 -04:00
mammo0
e510097193 re-added empty line to pass validation checks 2020-10-14 18:06:28 +02:00
mammo0
37281f6ca7 free memory after a thread completes
-> prior all threads that fetched items from the server and their
results stayed in memory until the sync was finished
2020-10-14 18:02:06 +02:00
mammo0
09b0bdbc48 use a semaphore to avoid fetching complete library to memory
-> this happens if the processing of items is slower as the fetching of
new
-> if a big library is synced, the old behavior could lead to extensive
use of memory
-> the semaphore acts like a buffer that only allows fetching of new
items from the library if old ones are processed
-> the current size of the 'buffer' is hard coded to 2 * [max. item
fetch limit] * [number of download threads]
2020-10-14 08:24:37 +02:00
mcarlton00
144c056641
Merge pull request #395 from Electry/master
Add more transcoding options
2020-10-04 11:25:07 -04:00
mcarlton00
00ba67772d
Merge pull request #403 from oddstr13/pr-flake8-2
Fix flake8 lints
2020-10-03 22:33:36 -04:00
b5404f992e
Merge pull request #401 from Electry/low-res-artwork-option
Add an option to reduce max artwork resolution
2020-09-29 02:48:00 +02:00
6d61a83b54 Flake8 linting 2020-09-27 04:20:24 +02:00
Michal Chvíla
204f50fa2e settings: Add an option to reduce max artwork resolution 2020-09-24 17:49:31 +02:00
Michal Chvíla
0fc908ec85 settings: Add an option to transcode VC-1 2020-09-24 17:41:09 +02:00
mcarlton00
3200c42432
Merge pull request #399 from bsdf/master
Fix extracted subtitle delivery for transcodes
2020-09-20 15:16:51 -04:00
BEN ENGLISCH
60ea47630b Fix extracted subtitle delivery for transcodes 2020-09-17 09:09:21 -05:00
David Francos
ad941ae483 fix: #396 Using kodi_version to determine loglevel 2020-09-17 10:38:22 +02:00
David Francos
cf1ee30e18 fix: #396 Brough back kodi 18 lognotice compat.
Kodi 18 seems to not log LOGINFO messages, this approach uses LOGNOTICE if its
available and LOGINFO otherwise, ensuring compatibility without needing to
check for kodi versions
2020-09-17 10:29:53 +02:00
David Francos
8ebee6e6de fix: #396 Kodi's LOGNOTICE loglevel is deprecated
KODI recenly deprecated LOGNOTICE (as per
https://github.com/xbmc/xbmc/pull/18346) and announced that LOGINFO should be
used instead.

LOGINFO has been available since kodi matrix's migration to spdlog in april
2020.
2020-09-17 00:51:46 +02:00
Michal Chvíla
fea6fc4cf1 playutils: Always honor manual transcoding bitrates
* Override VideoBitrate option in transcoding url (previously calced in backend)
* Use manual AudioBitrate when user has track selection dialog disabled
* Fix bad loop-and-remove
2020-09-15 01:33:44 +02:00
Michal Chvíla
e651b66ddc Add more transcoding options
* Redo max. bitrate options, add more bitrates in the lower end
* Remove SD/HD from the bitrate strings as the quality doesn't match up to what the backend selects (e.g. 1.3 Mbps definitely wasn't HD)
* Add option to force transcode mpeg2
* Add option to choose between h264 & h265 as a preferred codec for transcoding
* Add option to select preferred audio codec for transcoding/directstream
* Add option to select audio bitrate when transcoding (previously hardcoded to 384kbps for >2.0ch & 192kbps for <=2.0ch)
* Add option to select max audio channels (e.g. for server-side downmix)
* Add option to hide embedded/internal & picture-based subtitles in the track selection dialog
2020-09-15 00:30:23 +02:00
Michal Chvíla
4312135524 playutils: Prettify audio/subs track selection dialog
* Capitalize language in the track title
* Capitalize channel layout in the track title (e.g. 'Stereo')
* Remove track index from the title - users generally don't care what
the # is
* Use commercial names for the audio codecs (e.g. 'Dolby Digital'
instead of 'ac3')
* Always show codec name for subtitle tracks
2020-09-15 00:26:16 +02:00
Matt
813ec68e38 Review suggestions 2020-09-09 18:33:47 -04:00
Matt
c44a079572 remove commented variable 2020-09-07 22:47:10 -04:00
Matt
983c208415 Remove unused functions 2020-09-07 22:33:21 -04:00
Matt
db6cad8e15 Optimize music library lookups for larger libraries 2020-09-07 22:26:36 -04:00
6c5956d9bc Normalize path for os.mkdir
It's not happy with `foo/.`
2020-09-04 23:02:26 +02:00
holow29
b6ca78031c
Add BDMV and DVD Rip support in TV Shows
Porting @YK-Samgo's work from Movies.py to TVShows.py
2020-09-04 09:58:24 -04:00
ee7672a0a1 Handle empty files in profile video XMLs 2020-09-03 22:36:34 +02:00
7884ac4d88 Temporary workaround for #370 2020-08-25 01:53:46 +02:00
mcarlton00
4e2c8a0af3
Merge pull request #366 from oddstr13/pr-json-filter-1
Filter keys containing None values from dictionaries returned from the server
2020-08-21 17:43:52 -04:00
ed96dc8ad5 Clean json returned from server for keys with None values
Add testing
2020-08-21 15:09:34 +02:00
8a3ca73d52 flake8 2020-08-21 14:56:15 +02:00
8b1b648dfa
Merge pull request #362 from mcarlton00/might've-used-too-much
Refactor metadata ancestor gathering
2020-08-18 20:02:41 +02:00
mcarlton00
a4f9db249d
Update jellyfin_kodi/library.py
Co-authored-by: Odd Stråbø <oddstr13@openshell.no>
2020-08-18 14:01:23 -04:00
Matt
bbcc194018 Add libraryid to albums and songs in database 2020-08-15 00:03:45 -04:00
Matt
d3d5c46c60 pass exception through to calling function 2020-08-15 00:03:34 -04:00
Matt
ae0dbc0400 Refactor where the ancestor check takes place 2020-08-15 00:02:00 -04:00
Abby Gourlay
ebcbd1893f Removed webservice 2020-08-15 01:04:57 +01:00
Matt
75ac8ef1b8 Don't find ancestors on userdata updates 2020-08-12 21:04:05 -04:00
mcarlton00
2dff3a96ef
Merge pull request #359 from TrueTechy/because-why-not
SSL Verification Fix
2020-08-10 09:10:44 -04:00
Abby Gourlay
a1a318d636 SSL Verification Fix 2020-08-10 12:38:24 +01:00
“Tyler
ebf8a1a903 Remove whitespace in setup xbmcgui dialogs 2020-08-08 21:46:51 -07:00
a4d2dad11e Use libraries rather than home-screen views 2020-08-06 23:18:44 +02:00
a2d0c3cb49 Remove Ancestor found debug (info) log 2020-08-06 03:44:55 +02:00
70ef07276a Fix UserDataWorker 2020-08-06 02:31:38 +02:00
16bd0091f7
Merge pull request #348 from TrueTechy/fix/sonarqube-clumsy
Various fixes from sonarqube
2020-08-05 22:45:11 +02:00
Matt
d10ca845f4 empty default if there are no boxsets in the server 2020-08-03 15:07:26 -04:00
Matt
ce21b37501 Remove unneeded message variable 2020-08-03 14:37:49 -04:00
Matt
dc6c9e7dc2 Fix code smells for unused variables 2020-08-02 19:15:59 -04:00
Matt
7f012dc8b0 Fix undefined variable in remove function 2020-08-02 19:12:15 -04:00
Matt
4178f0a362 Fix boxset syncing 2020-08-02 18:50:57 -04:00
Matt
eca9630918 Remove library_check wrapper 2020-08-02 17:00:34 -04:00
Abby
12dee0b61c
Added space 2020-08-02 17:50:56 +01:00
Abby Gourlay
da6c754d90 Remove unused dict 2020-08-02 16:06:04 +01:00
Abby Gourlay
cc899931ed Removed else statements from loops without breaks 2020-08-02 15:53:58 +01:00
Abby Gourlay
98c86304fe Removed sonarqube issues tagged clumsy 2020-08-02 15:46:32 +01:00
Matt
0ee5b616a5 stupid getitems 2020-08-02 09:43:12 -04:00
Matt
2c55f7a27c Remove library_check wrapper from songs 2020-08-02 09:43:02 -04:00
Matt
5f34222712 Optimize network calls for music syncing 2020-08-02 09:42:16 -04:00
mcarlton00
da21f49928
Merge pull request #345 from oddstr13/pr-cleanup-1
A tiny bit of code cleanup
2020-08-02 09:31:32 -04:00
50e514459c Replace commented code with docstring 2020-08-02 15:07:11 +02:00
f8c277a2c3 Remove some excessively verbose debug logging 2020-08-02 14:59:46 +02:00
mcarlton00
96d5b61c7c
Merge pull request #346 from TrueTechy/fix/start-over
Get resume from Kodi arguments
2020-07-31 23:08:47 -04:00
Abby Gourlay
d8a7e43070 Fixed playback time selection for forced transcodes 2020-08-01 00:14:31 +01:00
Abby Gourlay
6f00779d73 Get resume from Kodi arguments 2020-07-31 23:53:12 +01:00
8b1c0bd1e4 Nuke catch and silent_catch decorators from orbit 2020-08-01 00:09:22 +02:00
3ec71e89d6 Refractor some decorators 2020-08-01 00:09:22 +02:00
803081f65a Remove some generic exceptions 2020-08-01 00:08:03 +02:00
e543762483 Fix music sync 2020-07-31 22:22:23 +02:00
768efccda2
== None -> is None 2020-07-23 23:48:54 +02:00
o010b
92b4fe80cc Handle empty list of updates from server 2020-07-23 19:54:12 +02:00
c9d3e7470b
Merge pull request #325 from z3ntu/kodi-19-music
Add support for music database format v74
2020-07-23 00:38:46 +02:00
yk
eb265d7a13 add dvd directry support 2020-07-07 22:52:23 +02:00
44d4080daf
Merge pull request #330 from YK-Samgo/master
Add support for BDMV movie directories in native playback mode
2020-07-07 22:45:02 +02:00
Matt
24bd05903d Don't process songs from unsynced libraries 2020-06-27 14:06:32 -04:00
yk
1e7b875dbe remove useless code and change one logging debug text 2020-06-27 22:45:39 +08:00
yk
70d7522570 add support for BDMV movies in the bluray directry by pointing the file to ./BDMV/index.bdmv 2020-06-27 21:28:27 +08:00
Luca Weiss
8ed3be521b Add support for music database format v74
See the following commit for reference:
  8fb8a640e0

Fixes #281
2020-06-17 22:19:00 +02:00
mcarlton00
15056cb146 Force filter parameter during incremental sync 2020-06-14 15:32:02 -04:00
Abby
f0bb8dfc3a
Merge pull request #310 from Lumenol/fix_change_audio_subtitle_stream_remotely
Fix choose the audio stream and the subtitle stream remotely
2020-06-11 01:47:43 +01:00
Matt
0ee8a1bd70 Add delay to playback reporting 2020-06-09 20:12:37 -04:00
Matt
eb34578488 Sanitize the server URL in log messages 2020-06-09 19:53:32 -04:00
Matt
f5460a79fe Fix incremental sync for mixed content libraries 2020-06-06 14:37:34 -04:00
db51abd786 Add Kodi 17 backwards compat to #308 2020-05-31 01:07:16 +02:00
Lumenol
84f111843c
Convert parameters to int if they are not None 2020-05-30 21:16:03 +02:00
mcarlton00
4e34537c5f
Merge pull request #308 from oddstr13/pr-kodi19-2
Update deprecated isPassword and line1 function parameters
2020-05-30 14:22:14 -04:00
981e05e2b9 Fix server selection list to show multiple servers 2020-05-29 01:22:10 +02:00
a6241d25db Update deprecated isPassword functionality
and dialog line1 to message parameter rename.

The isPassword change likely bumps minimum version up to Kodi 18.
This can be worked around if desirable.
2020-05-29 01:11:25 +02:00
Abby
60e80254ec
Merge pull request #305 from mcarlton00/incremental-sync
Only request updates for synced libraries
2020-05-26 13:21:48 +01:00
Matt
d6b68f44ea Only request updates for synced libraries 2020-05-25 22:14:50 -04:00
Abby
f1eec7a90a
Merge pull request #301 from mcarlton00/password-reset
Add reset password dialog to addon menu
2020-05-25 16:38:43 +01:00
Matt
9c11dbc113 Validate token returns dict no matter what 2020-05-24 16:26:39 -04:00
Matt
0f1f8be5ce Use utf-8 for header encoding 2020-05-23 10:11:37 -04:00
Matt
5cbc798cad Allow the device name to have unicode characters 2020-05-22 20:46:35 -04:00
Matt
de95d23e5a Catch bad passwords on addon startup 2020-05-22 18:55:21 -04:00
Matt
22b5d413fd Add reset password dialog to addon menu 2020-05-19 21:47:19 -04:00
mcarlton00
0f84d148b9 Don't sort playlist contents 2020-05-18 23:39:48 -04:00
Abby
4b679eab74
Merge pull request #297 from mcarlton00/addon-menu
Improve addon menu
2020-05-16 17:45:15 +01:00
Matt
14257f2a30 Only show playlists once 2020-05-15 19:15:01 -04:00
Matt
21dd8d95e8 Add music to addon menu 2020-05-15 19:07:45 -04:00
Matt
7911d957dc Fix errors before login occurs 2020-05-14 21:07:36 -04:00
Matt
19c69921c9 Report all items in a playlist 2020-04-25 16:05:57 -04:00
b67f7a8c51 Handle sys.getfilesystemencoding() returning None 2020-04-21 12:48:30 +02:00
5bd08635f2 Make sure file paths is text, not binary
Work around https://bugs.python.org/issue6543 for Python 2
2020-04-20 20:20:17 +02:00
0d4962ad83 sys.argv[1:] is not available in all addon threads 2020-04-19 13:08:00 +02:00
3f63e7c213 Fix linting, flake8 and sonarcloud issues 2020-04-19 12:07:55 +02:00
mcarlton00
87af711c94
Merge pull request #277 from oddstr13/pr-logging-2
Attempt to improve logging
2020-04-19 00:32:38 -04:00
0ba319e700 Use __name__ for all logger names 2020-04-19 06:13:25 +02:00
6c5ac6292d Overwriting logging.Formatter._fmt seems to
no longer work in Python 3
2020-04-19 04:37:58 +02:00
swedge
9ddab3fc9f Fixes #278 2020-04-18 21:39:26 -04:00
795dfd38df Get the logger from a central place 2020-04-19 03:21:40 +02:00
21643cd95e Disable TLSv1.0 and TLSv1.1 in websocket lib
These protocols are disabled by default in modern browsers
as of March/April 2020.
2020-04-16 03:37:34 +02:00
0dfea09769 Disable SSLv2 and SSLv3 support in websocket lib
Requires Python2 >= 2.7.9, Python3 >= 3.6
2020-04-16 01:57:13 +02:00
a9793eb1c9 Update deprecated kodi api functions 2020-04-02 15:49:22 +02:00
mcarlton00
38e151dc9a
Merge pull request #260 from TrueTechy/public_info_check
Added better error handling to public info check
2020-04-01 18:42:57 -04:00
Abby Gourlay
694c3ae3dd Added better error handling to public info check 2020-04-01 01:18:27 +01:00
mcarlton00
f4dc20cdf7
Merge pull request #256 from TrueTechy/remove_cachingQ_reset
Moved setting addon mode to utils
2020-03-30 23:26:46 -04:00
mcarlton00
1a83263095
Merge pull request #257 from TrueTechy/server_change_warning
Disabled changing server details & Removed corresponding function
2020-03-30 22:31:59 -04:00
Abby Gourlay
b4a2ee9d90 Added check to see if addon has already been setup 2020-03-30 17:43:41 +01:00
Abby Gourlay
ab6e51af58 Disabled changing server settings in settings menu & Removed corresponding update info function 2020-03-30 03:08:57 +01:00
Abby Gourlay
2cef5b727f Moved setting addon mode to utils
It was the only useful function left in setup.py since we've removed the rest of them over time
2020-03-30 02:48:09 +01:00
Abby
b37b903cca
Merge pull request #253 from mcarlton00/cleanup-remove-libraries
Remove MEDIA lookup dict
2020-03-29 22:45:11 +01:00
Matt
e414e28157 Simplify remove function calls 2020-03-28 23:37:07 -04:00
Matt
a96877f34d Fix typo 2020-03-28 23:27:08 -04:00
Matt
aeca1a0049 Cleanup code around removing libraries 2020-03-28 23:25:13 -04:00
Matt
dd57dff79f Don't encode strings that don't need it 2020-03-28 12:21:52 -04:00
mcarlton00
7d9b7dec7d
Merge pull request #249 from TrueTechy/fix-typo
Fixed typo introduced in #215
2020-03-26 14:54:46 -04:00
Abby Gourlay
936f1c6bc6 Fixed typo introduced in #215 2020-03-26 17:59:39 +00:00
Matt
43ee6991cb Remove duplicate strings in translations 2020-03-25 19:16:00 -04:00
Abby
57582d234f
Merge pull request #240 from mcarlton00/follow-redirects
Follow redirects when connecting to server
2020-03-23 00:29:39 +00:00
Matt
3e1884176d Give xml files correct attributes 2020-03-21 19:44:08 -04:00
3788a0b79c
Merge pull request #236 from mcarlton00/ascii-round-two
Fix ascii error on context menu
2020-03-21 18:20:58 +01:00
Matt
0647447c3c Follow redirects when connecting to server 2020-03-21 12:42:25 -04:00
Abby
69bb8bca04
Merge pull request #238 from mcarlton00/delete-artwork
Add ability to delete artwork from database
2020-03-20 23:41:08 +00:00
Matt
05a375d826 Add ability to delete artwork from database 2020-03-19 19:28:49 -04:00
Matt
4de1230cf5 Fix capitalization in boxsets 2020-03-19 18:04:23 -04:00
Matt
6e786a1e6b Use six to get correct string format 2020-03-19 12:37:50 -04:00
Matt
44808f5dd4 Fix ascii error on context menu 2020-03-19 09:37:47 -04:00
mcarlton00
d7364afbf5
Merge pull request #231 from TrueTechy/remove-webservice
Removed web server for image caching
2020-03-18 12:56:31 -04:00
mcarlton00
881c0e947a
Merge pull request #232 from TrueTechy/year-error-handling
Mitigation for #216 for invalid year
2020-03-17 21:33:45 -04:00
Abby Gourlay
9cb0f63749 Left an import in the clipboard 2020-03-18 01:20:22 +00:00
Abby Gourlay
1df9f15859 Resolved suggestions 2020-03-18 01:18:19 +00:00
mcarlton00
a7ef2f6243
Merge pull request #221 from TrueTechy/cleanup-connection-manager
Cleanup connection manager
2020-03-16 09:05:26 -04:00
Abby Gourlay
37a836dd57 Changed function return type 2020-03-16 12:36:06 +00:00
Abby Gourlay
5c93a06e9b Added mitigation for #216 for when the year data from the server is invalid 2020-03-15 01:27:07 +00:00
Abby Gourlay
3bff962cad Removed web server for image caching 2020-03-14 22:37:09 +00:00
Abby Gourlay
a044c1fd29 Fixed API parameter bad optimisation 2020-03-14 21:53:15 +00:00
Abby Gourlay
48ed8ad74c Implemented Suggestions 2020-03-12 22:20:18 +00:00
Abby Gourlay
068a842184 Removed profilling code accidentally commited 2020-03-08 18:08:30 +00:00
Abby Gourlay
36cd765c21 Updated debug logging for sanitising user data 2020-03-08 16:29:15 +00:00
Matt
0cff79e3c8 Fix logic around checking existing video directory 2020-03-07 10:12:49 -05:00
Matt
fcc6e942ab Use correct xml library for kodi 2020-03-07 08:36:30 -05:00
Matt
bb0a539074 Rework xml unicode handling 2020-03-06 23:38:43 -05:00
Abby Gourlay
298c8b6f25 Renamed function for better clarity 2020-03-06 22:57:13 +00:00
Abby
4806379a25
Merge pull request #209 from druscoe/reduce_execute_and_fetch_one_calls
Reduce execute and fetch one calls
2020-02-27 23:30:10 +00:00
Abby
e4a364e3bf
Merge pull request #215 from itsthejoker/library-clarifications
Remove duplicated code and rename UpdatedWorker class
2020-02-27 23:23:59 +00:00
Joe Kaufeld
12a373d030 remove duplicated code and rename UpdatedWorker class
Signed-off-by: Joe Kaufeld <joe@grafeas.org>
2020-02-26 22:49:42 -05:00
Matt
e6101b404a Fix music video scanning 2020-02-26 21:05:38 -05:00
Matt
de95807323 Run library updates properly with current items 2020-02-26 20:59:02 -05:00
Abby
43f0c57ffd
Merge pull request #211 from mcarlton00/once-more-with-feeling
More getitem cleanup in library
2020-02-26 23:07:12 +00:00
Matt
7efc6f9b6a Fix variable names 2020-02-25 20:25:47 -05:00
Matt
1d02fccce6 Prevent harmless errors about bad dates from the server 2020-02-25 20:19:59 -05:00
Matt
4e37aa9bbf Finish getitem cleanup in library 2020-02-25 18:39:50 -05:00
Chuddah
e23d2e1f7b Forgot to remove unexecuted code. 2020-02-23 19:31:41 +00:00
Chuddah
6fe450da4d Attempt number 2 on a larger dataset; the people table.
Note: This has a previously applied optimization of using a local cache.

Before:
```
458570   66.934    0.000   66.934    0.000 {method 'execute' of 'sqlite3.Cursor' objects}
246771   58.075    0.000   58.075    0.000 {method 'fetchone' of 'sqlite3.Cursor' objects}
```

After:
```
368883   66.220    0.000   66.220    0.000 {method 'execute' of 'sqlite3.Cursor' objects}
157084   58.160    0.000   58.160    0.000 {method 'fetchone' of 'sqlite3.Cursor' objects}
```

Once again, the number of calls to execute and fetchone are reduced but
the total time spent executing each is relatively stable.
2020-02-23 18:27:12 +00:00
Chuddah
0a69894320 Attempt to reduce the number of calls to execute and fetchone.
Profiling has shown that there are many calls to sqlite3.execute and
fetchone which takes a signicant amount of time. A simple way of
reducing these is to swap the 2-stage init of table row data into a
unified add.

Applying this to add_set and add_country yielded these results:

Before changes
```
281784    7.054    0.000    7.054    0.000 {method 'execute' of 'sqlite3.Cursor' objects}
127443    1.114    0.000    1.114    0.000 {method 'fetchone' of 'sqlite3.Cursor' objects}
```

After changes
```
281714    7.492    0.000    7.492    0.000 {method 'execute' of 'sqlite3.Cursor' objects}
127373    1.217    0.000    1.217    0.000 {method 'fetchone' of 'sqlite3.Cursor' objects}
```

Note: The total time of fetchone has actually increased. I am hoping
this was an abnormality on my machine and the actual reduction in the
number of calls will permantly reduce this total time.
2020-02-23 18:00:38 +00:00
Matt
19ec48cd5b Use six library instead of checking sys version 2020-02-23 00:07:44 -05:00
Matt
5479ba2775 Make commands python 2/3 compatible 2020-02-22 23:23:14 -05:00
mcarlton00
0e4458fa75
Merge pull request #193 from druscoe/inefficeint_usage_of_json_dumps_in_debug_output
Replaced debug output of json.dumps with an indirection to lazy __str__.
2020-02-22 14:50:49 -05:00
Chuddah
de493d13dd Moved JsonDebugPrinter to existing utils module 2020-02-22 15:04:28 +00:00
mcarlton00
4d4f45cd42
Merge pull request #202 from druscoe/threaded_http_gets
Parallelize multiple http GETs
2020-02-20 20:12:29 -05:00
Abby Gourlay
e5cde15ad2 Added a missing file 2020-02-21 00:50:32 +00:00
Abby Gourlay
417b9fb938 Recreated Branch 2020-02-21 00:42:50 +00:00
mcarlton00
2fbdd191d5
Merge pull request #201 from druscoe/in_progress_ui_updates
Allow for UI updates as the library is being sync'ed
2020-02-20 19:20:07 -05:00
Damien Ruscoe
756991e9ec
Resort to the expensive database lookup only if the person exists in the (#200)
* Added profiling info

* Resort to the expensive database lookup only if the person exists in the
database.

* Prevent any access to the people database unless a person must be added.

* Bulk operations where possible.

* Prepare for a new install and the table not existing.
2020-02-19 19:28:47 -05:00
Chuddah
bf46548365 Removed previous fixup.
The recursive call to get_workers was implemented as it looked like the
original intent of the DTHREADS variable. Otherwise this variable was
redundant. The ThreadPool is a much better use of this setting.
2020-02-19 23:23:21 +00:00
Chuddah
ce10cb88c2 Merge branch 'master' into threaded_http_gets 2020-02-19 23:11:05 +00:00
Chuddah
302880f67a Parallelize multiple http GET requests
Added ThreadPoolExecutor and used to process GET requests in multiple
threads which enables chunks of data to always be available for
processing. Processing of the data can happen as soon as the first chunk
arrives.

Refactored the code to help implement. The idea is the "params" are
built in batch and passed to the thread pool which get the actual
results.
2020-02-19 22:18:54 +00:00
mcarlton00
de70d9ac60
Merge pull request #197 from druscoe/fix_empty_download_thread_list
Move the responsibility of the maximum number of threads to the UI.
2020-02-18 20:03:44 -05:00
Chuddah
af810861c8 Allow for UI updates as the library is being sync'ed
Periodically release the locks on the database as the sync with the
server is being performed. This allows the UI to communicate with its
database and update the UI in real time.

Taken this oppurtunity to refactor some common code improve
maintainance.
2020-02-18 23:23:47 +00:00
Chuddah
2bf2206a1e Move the responsibility of the maximum number of threads to the UI.
Previously the user was able to set any number to limitThreads UI
component but internally that was reduced to be a maximum of 50 which is
deceiving to the user. Set this is set as a boundary in the UI.

This also fixes a bug that the user could set the number of threads to
zero which follows from GIGO; but let the UI assist by placing a min
number of threads to 1.
2020-02-17 11:59:48 +00:00
mcarlton00
5fc60fce6b
Merge pull request #195 from druscoe/fix_empty_download_thread_list
Fix empty download thread list
2020-02-16 19:16:21 -05:00
Chuddah
4649d2371f Keep adding threads until the user limit has been reached 2020-02-16 23:39:27 +00:00
Chuddah
b878a0e433 Added download thread to the download_threads when created. 2020-02-16 22:56:46 +00:00
Chuddah
b9817a5617 Revert "Replaced debug output of json.dumps with an indirection to lazy __str__."
This reverts commit 78fda95853.

Committed on the wrong branch.
2020-02-16 22:22:23 +00:00
Chuddah
7491000a13 Replaced debug output of json.dumps with an indirection to lazy __str__.
json.dumps is a processing intensive operation. This is being called
every time data is received from the server (most noticeably during
library updates) for debug logging. If the user has debug logging
disabled (the default option) then the user is still paying for
processing which is discarded.

The fix is to add a level of indirection where the dumps function is
only called if a string representation of the json is requested; ie.
when the debug string is evaluated.
2020-02-16 22:17:05 +00:00
Chuddah
78fda95853 Replaced debug output of json.dumps with an indirection to lazy __str__.
json.dumps is a processing intensive operation. This is being called
every time data is received from the server (most noticeably during
library updates) for debug logging. If the user has debug logging
disabled (the default option) then the user is still paying for
processing which is discarded.

The fix is to add a level of indirection where the dumps function is
only called if a string representation of the json is requested; ie.
when the debug string is evaluated.
2020-02-16 22:07:56 +00:00
Chuddah
85d4e660ef Dont modify a list as you are traversing it. The result is
implementation dependant although with CPython elements are
unintentionally skipped during iteration.

Basic CPython example:

>>> A = [1,2,3,4,5,6]
>>> for a in A:
...     A.remove(a)
>>> A
[2, 4, 6]
2020-02-16 18:41:14 +00:00
mcarlton00
94456ddcd8
Merge pull request #192 from mcarlton00/fix-remote-crash
Fix playlist paths
2020-02-15 11:22:18 -05:00
mcarlton00
0b3319a01a
Merge pull request #190 from mcarlton00/obj-error
Obj error
2020-02-15 11:21:57 -05:00
mcarlton00
0bd378f9c9 Fix playlist paths 2020-02-14 20:15:14 -05:00
mcarlton00
ba6242dd93 Fixing indentation 2020-02-13 19:43:29 -05:00
mcarlton00
c6a701a4a3 Fix library object types 2020-02-13 19:39:38 -05:00
mcarlton00
e30e6dca8a Add link to magic string 2020-02-12 17:22:49 -05:00
mcarlton00
07c9fffab7 Fix kodi 19 websocket control 2020-02-11 23:09:55 -05:00
Abby
42258c699a Removed unnecessary log messages and changed some to debug (#167) 2020-01-05 18:41:26 -05:00
Odd Stråbø
933a31ac23 Fixes for Kodi 18.5 (and Python2) 2020-01-04 05:17:51 +01:00
a51bf9c2cc Initial work on Kodi 19 (and Python 3) support 2020-01-04 03:32:30 +01:00
mcarlton00
2e8d2e6009 Move the RemoteAddress check 2019-12-16 19:36:04 -05:00
mcarlton00
e96f32308b Remove emby references from music database 2019-12-14 11:42:39 -05:00
mcarlton00
a7c96577cd Remove all emby api endpoints 2019-12-14 08:19:57 -05:00
mcarlton00
58c9db9944
Merge pull request #160 from mcarlton00/metadata-fix
Correct filepath when entering data to database
2019-12-13 19:59:44 -05:00
mcarlton00
14fd9253b2
Remove remote address if it still exists in the config file 2019-12-13 19:53:38 -05:00
mcarlton00
842b0813a3
Add migration for manual configuration servers 2019-12-13 19:38:20 -05:00
Matt
014d2ef3c5 Fix database entry for music videos 2019-12-13 18:19:48 -05:00
Odd Stråbø
039eea0aec Add config migration for pr #145 2019-12-13 23:44:46 +01:00
Matt
146aed33e9 Fix shows in addon mode, not directplay 2019-12-13 07:32:28 -05:00
Matt
60cc67eb15 Correct filepath when entering data to database 2019-12-12 21:32:53 -05:00
Matt
ab1dcca938 Update websocket path 2019-12-10 22:41:35 -05:00
Abby
f7fdcd0cd8
Merge branch 'master' into remove_commented_code 2019-12-09 20:33:40 +00:00
TrueTechy
109c107532 Removed blocks of commented out code 2019-12-09 20:27:11 +00:00
TrueTechy
4e179890ec Change translation function name from _ to translate 2019-11-25 00:58:44 +00:00
TrueTechy
efa5048b95 Removed connection tests and minor cleanup 2019-11-11 23:08:21 +00:00
Odd Stråbø
e91e979f4d Remove the prompt before library selection. 2019-11-09 20:16:19 +01:00
TrueTechy
7e8f34401d Remove Core folder 2019-11-07 22:59:10 +01:00
TrueTechy
84b8093171 Begin restructing, fixed some issues related to movement 2019-11-07 22:58:44 +01:00