Commit Graph

432 Commits

Author SHA1 Message Date
Brian Pepple e7e6fbdd31 Move assignment closer to its usage 2021-10-10 16:40:58 +02:00
Brian Pepple b110f1cf13 Simplify boolean 2021-10-10 16:40:52 +02:00
Odd Stråbø ba164d1358
Merge pull request #576 from mcarlton00/context-browse
Allow browsing to a show from the info menu
2021-10-10 14:48:01 +02:00
mcarlton00 133e408eb1
Merge pull request #574 from mcarlton00/cast-resume
Resume media when possible during casting
2021-10-06 19:06:23 -04:00
mcarlton00 0b3888aa32
Update jellyfin_kodi/entrypoint/default.py
Co-authored-by: Odd Stråbø <oddstr13@openshell.no>
2021-10-06 19:05:27 -04:00
Matt 942ed0c407 Cleaner comparison for resume variable 2021-10-06 19:04:45 -04:00
Matt 85410639df Allow browsing to a show from the info menu 2021-10-03 00:45:18 -04:00
Matt 5e7901be27 Migrate to new translatePath library 2021-10-02 13:26:37 -04:00
Matt 4b40c75c91 Resume media when possible during casting 2021-10-01 17:34:18 -04:00
Odd Stråbø 03d13e3f77 Fix direct play when direct stream isn't allowed. 2021-09-29 22:05:42 +02:00
mcarlton00 0fb103852a
Merge pull request #563 from jessbo/fix-557
Fixes #557 - Add missing "PlaySessionId"
2021-09-04 21:08:03 -04:00
jessbo 9b2d499a9c jellyfin_kodi/{jellyfin/api,player}.py: Add missing "PlaySessionId" argument to close_transcode().
Without this argument, server always returns 400.
2021-08-29 15:45:40 -04:00
jessbo ea97b42a52 Add transcode dialog skip option: "Media default" 2021-08-13 10:47:19 -04:00
Odd Stråbø fe8bbba7b6
Merge pull request #547 from mcarlton00/external-subs
Fix external sub conflict
2021-07-18 11:20:22 +02:00
Matt 6c9d6e8593 Fix external sub conflict 2021-07-08 19:19:18 -04:00
Matt d5a9a52a7d Add option to transcode vp9 and av1 2021-07-04 11:45:44 -04:00
mcarlton00 0bf51ad9ae
Merge pull request #529 from mcarlton00/baseurl-transcoding
Remove double slash when transcoding with a baseurl
2021-05-30 17:49:32 -04:00
Odd Stråbø 2371dfd1fa
Merge pull request #521 from mcarlton00/websockets-are-awful
Fix playback crashes
2021-05-28 15:19:51 +02:00
Odd Stråbø 65c7a5c59c
Merge pull request #528 from mcarlton00/database-version
Store a version parameter in the database for migrations
2021-05-28 15:15:07 +02:00
Odd Stråbø 51c14b3fb9
Merge pull request #525 from mcarlton00/status-code-error
Don't fail if status_code doesn't exist on startup
2021-05-28 15:12:12 +02:00
venomousZealot e907e35773
Fix impossibility of choosing the first subtitle
The usual combination of a zero-based index and a lazy if...

Also, there is no reason to use the default subtitles after asking users which subtitles they want.
2021-05-17 16:39:46 +02:00
Matt 53aa27444b Arguments with a linter 2021-05-16 21:48:37 -04:00
Matt a4e024634f Make linter ignore these imports 2021-05-16 21:43:35 -04:00
Matt dd81d1a3d7 Remove double slash when transcoding with a baseurl 2021-05-16 21:26:30 -04:00
Matt 1effd2fa6e Remove new line at end of file 2021-05-16 19:04:11 -04:00
Matt 24167b5c29 Store a version parameter in the database for migrations 2021-05-16 18:45:34 -04:00
Matt 6deaddee6d Don't fail if status_code doesn't exist on startup 2021-05-16 11:01:30 -04:00
Matt 405a0038a3 Stop throwing errors during playback reporting 2021-05-11 19:55:08 -04:00
Matt 293dc7a768 Make sure numpy doesn't cause issues 2021-05-11 19:51:34 -04:00
venomousZealot 8870d772a8
Remove unused import 2021-05-05 14:23:26 +02:00
venomousZealot c79980c477
Make sonarcloud happy 2021-05-05 14:08:48 +02:00
venomousZealot 1ae54a3e20
Additional cleanup 2021-05-05 14:05:27 +02:00
venomousZealot 46d16293d2
Replacing ordered dictionaries with lists
Allows multiple subtitles with identical names. Should fix https://github.com/jellyfin/jellyfin-kodi/issues/435
2021-05-05 13:53:30 +02:00
Abby 3804447c48
Merge pull request #328 from mcarlton00/websocket-dependency
Remove websocket library
2021-05-03 02:16:55 +01:00
Abby 7c833767cd
Merge pull request #513 from mcarlton00/followup-sync
Fix subsequent syncs from the addon menu better
2021-05-03 01:55:11 +01:00
Matt 21c4a8539f Change websocket import location 2021-05-02 16:52:48 -04:00
Matt 979c077231 Move websocket to a dependency 2021-05-02 16:52:41 -04:00
Matt be518f845b Make sure sync libraries are formatted properly 2021-05-02 12:56:32 -04:00
Matt 8b89ff3deb Make sure we only sync boxsets once 2021-05-02 12:46:47 -04:00
Matt 37a72759cb Fix removing music libraries 2021-04-30 20:55:07 -04:00
Matt a1f3d8eb10 Fix followup sync again 2021-04-30 20:54:52 -04:00
venomousZealot 97a44985e6
Use jellyfin's DisplayTitle for audio and subtitle streams 2021-04-28 14:43:48 +02:00
mcarlton00 0a02ae69b1
Merge pull request #504 from venomousZealot/patch-1
Fix transcoding of wrong audio channel
2021-04-27 19:48:27 -04:00
Matt 5ec70bacbf Fix max bitrate profile, default to 1000Mbps 2021-04-27 18:27:25 -04:00
venomousZealot 45b4cb428a
Fix transcoding of wrong audio channel
It's a zero based index, so if the first entry is not the default language, you can't ever select it.
Probably related to https://github.com/jellyfin/jellyfin-kodi/issues/265

PS: It's my first time messing with code on github. Sorry, if I didn't follow protocol correctly.
2021-04-26 11:30:24 +02:00
Odd Stråbø f9f1cccb97
Merge pull request #494 from mcarlton00/subsequent-syncs
Fix syncing libraries after initial sync is complete
2021-04-25 00:42:20 +02:00
mcarlton00 77dbe45a4a
Merge pull request #484 from mcarlton00/context-menu
Fix playback from context and info menus
2021-04-19 19:40:26 -04:00
mammo0 0359e0f80a fixed 'args' beiing provided as list for dict.get() method
before the people cache was never used, because the 'args' parameter in
the 'self._people_cache.get(args)' call was a list/tuple object; but the
people cache dictionary has only strings as keys
-> so there were always database queries for the persons which slowed
down the sync process


also renamed 'args' to 'name', because basically a person gets searched
only by its name (see queries.py)
2021-04-19 18:07:03 +02:00
mammo0 ce5a74c3a8 avoid creating of a Kodi database object for every item in the workers 2021-04-19 17:33:16 +02:00
Matt bc47e93d1c Remove unneeded function 2021-04-16 17:47:32 -04:00
Matt 2fcef85029 Fix playback from context and info menus 2021-04-16 17:47:32 -04:00
Matt a1a135d0ea Fix syncing libraries after initial sync is complete 2021-04-16 17:42:26 -04:00
Matt 33dfd0ee82 Fix capitalization of variable 2021-03-15 23:42:11 -04:00
Matt 94b3a3e0a0 Fix recently added albums in Kodi 19 2021-03-15 23:32:37 -04:00
mcarlton00 b3e88bbeb2
Merge pull request #488 from mcarlton00/pls-mr-linter
Fix formatting on multiline if statement
2021-03-14 21:40:28 -04:00
Matt d3d4996d0d Split if statement evenly 2021-03-14 19:09:10 -04:00
Matt f12b58406b Fix formatting on multiline if statement 2021-03-14 09:50:19 -04:00
Matt 77f06b0817 Fix full syncs with new actors 2021-03-14 09:44:36 -04:00
Abby 96bdbefb8c
Merge pull request #485 from mcarlton00/people-sync
Fix integrity error in actor table during sync
2021-03-14 04:06:05 +00:00
Abby cbe8860aad
Merge pull request #486 from mcarlton00/highest-db
Always use highest version database available
2021-03-14 02:25:31 +00:00
Matt 54a425fde4 Always use highest version database available 2021-03-13 21:13:44 -05:00
Matt abf5b8b8df Remove unused import 2021-03-13 20:22:42 -05:00
Matt 2d60480df3 Rework people sync to avoid exception program flow 2021-03-13 20:13:40 -05:00
Matt 778dd43b3f Stop editing sources.xml 2021-03-08 20:12:52 -05:00
Matt 2ffe61de67 Disable the cleanonupdate tag in advancedsettings.xml 2021-02-25 22:13:30 -05:00
mcarlton00 01b114c19e
Merge pull request #475 from oddstr13/plural(s)
Fix: Get specific library vs list of libraries
2021-02-24 21:12:37 -05:00
Odd Stråbø 9b30c883ea Fix import order 2021-02-23 02:53:10 +01:00
Odd Stråbø 164fc50d98 Named tuples and type hints? What is this magic? 2021-02-23 02:42:26 +01:00
Odd Stråbø 61fcfe3b5e Fix tuple prepend 2021-02-23 00:18:02 +01:00
Odd Stråbø 2bade17e7f Why ever would I want the sync_id back when I query with it? 2021-02-22 05:31:25 +01:00
Odd Stråbø 8517597262 Get specific library vs list of libraries 2021-02-22 04:42:51 +01:00
Odd Stråbø 153396acbb array.array.tostring is removed in Python 3.9 2021-02-22 04:10:32 +01:00
Matt 0aa2e71320 Fix music artist syncing for Kodi 19 2021-01-23 22:20:34 -05:00
Matt 75590d3a1d Missing import 2021-01-23 22:20:34 -05:00
Matt 9d059a94d7 Fix casting 2021-01-23 22:20:34 -05:00
Matt 54270b2ebd Remove 'User' label from manual login forms 2021-01-23 22:19:57 -05:00
Matt b094b7ba30 Fix boxset sync on startup, simplify code 2020-12-31 11:37:38 -05:00
mcarlton00 515f0a2978 Fix boxsets typo 2020-12-28 10:29:21 -05:00
mcarlton00 f536d68846 Remove commented line 2020-12-27 11:39:14 -05:00
mcarlton00 c8b524b2a9 Fix refresh boxsets function 2020-12-27 11:36:03 -05:00
mcarlton00 38ea9ba77c Remove extra slash from URLs in get_subtitles 2020-12-26 13:17:11 -05:00
Odd Stråbø 084cf6f45d Encoding parameter to json.load was removed in Python 3.9 2020-12-21 19:27:42 +01:00
mcarlton00 a51fd6b932
Merge pull request #431 from oddstr13/pr-10.7-1
Fix some minor issues highlighted by 10.7
2020-12-20 18:57:49 -05:00
Odd Stråbø 505a6dbe6d
Merge pull request #444 from mcarlton00/stop-overriding-my-server
Stop autodiscovered servers overriding manual input
2020-12-17 04:24:48 +01:00
Odd Stråbø 64b0ed29e8
Merge pull request #446 from mcarlton00/no-crashy-on-skip
Fix crash on addon load
2020-12-17 04:22:49 +01:00
Matt d1a66e00c3 Make sure status code gets returned in payload 2020-12-16 21:32:25 -05:00
Matt 49ce9e4359 Don't crash when a user skips server setup 2020-12-14 22:34:23 -05:00
Matt ec59fb8cbe Stop overwriting manual input for reals this time 2020-12-12 23:21:46 -05:00
Matt 07313a38b8 Accept manual server input instead of looping 2020-12-12 13:17:06 -05:00
Odd Stråbø 84fcecb2b3 Pass hexlify bytes in helper.utils.event
Fixes #441
2020-12-09 23:29:52 +01:00
Abby f943316d25
Merge pull request #438 from mcarlton00/context-is-important
Move api_client details to context.py
2020-11-29 21:22:07 +00:00
Matt 203fb81f58 Move api_client details to context.py 2020-11-29 15:19:10 -05:00
Odd Stråbø 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
Odd Stråbø 146bd401bf HTTP 400: Log response body when it can't be decoded as json 2020-11-26 16:58:14 +01:00
Odd Stråbø 8a9b69f2f5 Remove extra leading slash from the KodiSyncQueue ping endpoint 2020-11-26 16:58:14 +01:00
Odd Stråbø 6c3b682ef0 Log HTTP 400 json payloads 2020-11-26 16:58:14 +01:00
Odd Stråbø 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
Odd Stråbø 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
Odd Stråbø 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
Odd Stråbø 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
Odd Stråbø 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
Odd Stråbø 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
Odd Stråbø ee7672a0a1 Handle empty files in profile video XMLs 2020-09-03 22:36:34 +02:00
Odd Stråbø 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
Odd Stråbø ed96dc8ad5 Clean json returned from server for keys with None values
Add testing
2020-08-21 15:09:34 +02:00
Odd Stråbø 8a3ca73d52 flake8 2020-08-21 14:56:15 +02:00
Odd Stråbø 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