Commit graph

128 commits

Author SHA1 Message Date
Brian Pepple
f6eeb49bd1 Hoist repeated code outside conditional statement 2021-10-10 16:40:58 +02:00
Brian Pepple
9d64ca41cb Merge extend into list declaration 2021-10-10 16:40:58 +02:00
Brian Pepple
785d0d4844 Simplify logical expression using De Morgan idents 2021-10-10 16:40:58 +02:00
Brian Pepple
b110f1cf13 Simplify boolean 2021-10-10 16:40:52 +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
Matt
942ed0c407 Cleaner comparison for resume variable 2021-10-06 19:04:45 -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
Matt
37a72759cb Fix removing music libraries 2021-04-30 20:55:07 -04: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
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
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
Matt
77f06b0817 Fix full syncs with new actors 2021-03-14 09:44:36 -04: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
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
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
e487163ca2 Make the linter happy 2020-11-17 19:23:40 -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
a009530434 Byebye TheVoid 2020-11-17 11:00:50 -05:00
6d61a83b54 Flake8 linting 2020-09-27 04:20:24 +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
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
8a3ca73d52 flake8 2020-08-21 14:56:15 +02:00
Matt
ae0dbc0400 Refactor where the ancestor check takes place 2020-08-15 00:02:00 -04:00
16bd0091f7
Merge pull request #348 from TrueTechy/fix/sonarqube-clumsy
Various fixes from sonarqube
2020-08-05 22:45:11 +02:00
Matt
7f012dc8b0 Fix undefined variable in remove function 2020-08-02 19:12:15 -04:00
Matt
eca9630918 Remove library_check wrapper 2020-08-02 17:00:34 -04:00
Abby Gourlay
98c86304fe Removed sonarqube issues tagged clumsy 2020-08-02 15:46:32 +01:00
Matt
2c55f7a27c Remove library_check wrapper from songs 2020-08-02 09:43:02 -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
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
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
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
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
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
3f63e7c213 Fix linting, flake8 and sonarcloud issues 2020-04-19 12:07:55 +02:00
795dfd38df Get the logger from a central place 2020-04-19 03:21:40 +02:00
a9793eb1c9 Update deprecated kodi api functions 2020-04-02 15:49:22 +02:00
Matt
05a375d826 Add ability to delete artwork from database 2020-03-19 19:28:49 -04:00
Abby Gourlay
3bff962cad Removed web server for image caching 2020-03-14 22:37:09 +00: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
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
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
0bd378f9c9 Fix playlist paths 2020-02-14 20:15:14 -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
e96f32308b Remove emby references from music database 2019-12-14 11:42:39 -05:00
Matt
014d2ef3c5 Fix database entry for music videos 2019-12-13 18:19:48 -05: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
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
TrueTechy
84b8093171 Begin restructing, fixed some issues related to movement 2019-11-07 22:58:44 +01:00