File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ def get_format(fmt=None):
84
84
85
85
return (command .encode ("utf-8" ), extension .encode ("utf-8" ))
86
86
87
+
87
88
def in_no_convert (item : Item ) -> bool :
88
89
no_convert_query = config ["convert" ]["no_convert" ].as_str ()
89
90
@@ -92,7 +93,8 @@ def in_no_convert(item: Item) -> bool:
92
93
return query .match (item )
93
94
else :
94
95
return False
95
-
96
+
97
+
96
98
def should_transcode (item , fmt ):
97
99
"""Determine whether the item should be transcoded as part of
98
100
conversion (i.e., its bitrate is high or it has the wrong format).
Original file line number Diff line number Diff line change 18
18
import re
19
19
import sys
20
20
import unittest
21
- import pytest
22
21
22
+ import pytest
23
23
from mediafile import MediaFile
24
24
25
25
from beets import util
26
- from beetsplug import convert
27
26
from beets .library import Item
28
27
from beets .test import _common
29
28
from beets .test .helper import (
34
33
control_stdin ,
35
34
)
36
35
from beets .util import bytestring_path , displayable_path
36
+ from beetsplug import convert
37
37
38
38
39
39
def shell_quote (text ):
@@ -352,7 +352,6 @@ class TestNoConvert:
352
352
("bitrate:320 , format:ogg" , True ),
353
353
],
354
354
)
355
-
356
355
def test_no_convert_skip (self , config_value , should_skip ):
357
356
item = Item (format = "ogg" , bitrate = 256 )
358
357
convert .config ["convert" ]["no_convert" ] = config_value
You can’t perform that action at this time.
0 commit comments