Dirk Alders 4 vuotta sitten
vanhempi
commit
fb5cafc8cc
5 muutettua tiedostoa jossa 273 lisäystä ja 273 poistoa
  1. 1
    1
      __init__.py
  2. 5
    5
      _testresults_/coverage.xml
  3. 266
    266
      _testresults_/unittest.json
  4. BIN
      _testresults_/unittest.pdf
  5. 1
    1
      metadata.py

+ 1
- 1
__init__.py Näytä tiedosto

24
 __DEPENDENCIES__ = []
24
 __DEPENDENCIES__ = []
25
 
25
 
26
 import logging
26
 import logging
27
+from media import metadata
27
 
28
 
28
 logger_name = 'MEDIA'
29
 logger_name = 'MEDIA'
29
 logger = logging.getLogger(logger_name)
30
 logger = logging.getLogger(logger_name)
37
 
38
 
38
 
39
 
39
 def get_media_data(full_path):
40
 def get_media_data(full_path):
40
-    from media import metadata
41
     ft = metadata.get_filetype(full_path)
41
     ft = metadata.get_filetype(full_path)
42
     #
42
     #
43
     if ft == metadata.FILETYPE_AUDIO:
43
     if ft == metadata.FILETYPE_AUDIO:

+ 5
- 5
_testresults_/coverage.xml Näytä tiedosto

1
 <?xml version="1.0" ?>
1
 <?xml version="1.0" ?>
2
-<coverage branch-rate="0.975" branches-covered="39" branches-valid="40" complexity="0" line-rate="0.9856" lines-covered="206" lines-valid="209" timestamp="1580418394944" version="4.5">
2
+<coverage branch-rate="0.975" branches-covered="39" branches-valid="40" complexity="0" line-rate="0.9856" lines-covered="206" lines-valid="209" timestamp="1580423734911" version="4.5">
3
 	<!-- Generated by coverage.py: https://coverage.readthedocs.io -->
3
 	<!-- Generated by coverage.py: https://coverage.readthedocs.io -->
4
 	<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
4
 	<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
5
 	<sources/>
5
 	<sources/>
12
 						<line hits="1" number="4"/>
12
 						<line hits="1" number="4"/>
13
 						<line hits="1" number="24"/>
13
 						<line hits="1" number="24"/>
14
 						<line hits="1" number="26"/>
14
 						<line hits="1" number="26"/>
15
-						<line hits="1" number="28"/>
15
+						<line hits="1" number="27"/>
16
 						<line hits="1" number="29"/>
16
 						<line hits="1" number="29"/>
17
-						<line hits="1" number="32"/>
18
-						<line hits="1" number="35"/>
19
-						<line hits="1" number="39"/>
17
+						<line hits="1" number="30"/>
18
+						<line hits="1" number="33"/>
19
+						<line hits="1" number="36"/>
20
 						<line hits="1" number="40"/>
20
 						<line hits="1" number="40"/>
21
 						<line hits="1" number="41"/>
21
 						<line hits="1" number="41"/>
22
 						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="43"/>
22
 						<line branch="true" condition-coverage="100% (2/2)" hits="1" number="43"/>

+ 266
- 266
_testresults_/unittest.json
File diff suppressed because it is too large
Näytä tiedosto


BIN
_testresults_/unittest.pdf Näytä tiedosto


+ 1
- 1
metadata.py Näytä tiedosto

45
 
45
 
46
 
46
 
47
 def get_filetype(full_path):
47
 def get_filetype(full_path):
48
-    ext = os.path.splitext(full_path)[1]
48
+    ext = os.path.splitext(full_path.lower())[1]
49
     if ext in EXTENTIONS_AUDIO:
49
     if ext in EXTENTIONS_AUDIO:
50
         return FILETYPE_AUDIO
50
         return FILETYPE_AUDIO
51
     elif ext in EXTENTIONS_IMAGE:
51
     elif ext in EXTENTIONS_IMAGE:

Loading…
Peruuta
Tallenna