Laurent Monin
9bf803c8c2
Use intermediate variable win_compat, improve consistency
2019-03-15 10:35:16 +01:00
Laurent Monin
f7011a7bee
Move part of File._make_filename() to new File._format_filename()
2019-03-15 10:33:00 +01:00
Laurent Monin
08a7ce0d28
Fix _make_filename(): use settings instead of config.setting
...
- use passed settings (which defaults to config.setting) as in the rest of the function
- remove reference to nonexistent option 'windows_compatibility_drive_root'
2019-03-15 10:06:59 +01:00
Laurent Monin
b6dd3dfecd
Merge pull request #1131 from phw/PICARD-1491-fix-plugin-list-version-check
...
PICARD-1491: Fix plugin version check when loading plugin list
2019-03-12 19:16:29 +01:00
Laurent Monin
95f60e5d94
Merge pull request #1129 from phw/PICARD-1490-fix-local-cover-art
...
PICARD-1490: Fix local cover art loading on Windows
2019-03-12 19:14:15 +01:00
Philipp Wolfer
0cdbfdd586
PICARD-1491: Fix plugin version check when loading plugin list
2019-03-12 18:05:53 +01:00
Philipp Wolfer
6ce942f2b1
More NEWS.txt formatting fixes
2019-03-12 16:25:47 +01:00
Philipp Wolfer
bba5cef5fe
PICARD-1490: Run Windows path test on Windows only
2019-03-12 16:18:45 +01:00
Philipp Wolfer
0ce63b9dd6
Format older changelog entries with newer subheading syntax
2019-03-12 15:23:29 +01:00
Philipp Wolfer
e573dccc09
PICARD-1490: Fix local cover art loading on Windows
2019-03-12 09:19:16 +01:00
Laurent Monin
af98bca57d
Merge pull request #1126 from zas/discid_oserror
...
Better handling of missing libdiscid, catching OSError
2019-03-10 18:15:49 +01:00
Laurent Monin
57438669d0
Merge pull request #1127 from zas/fix_move_additionnal_files
...
_move_additional_files(): return asap if same directory
2019-03-10 18:12:38 +01:00
Laurent Monin
5f6ee77b15
Ignore upload failures during osx packaging
...
It causes Travis CI checks to fail far too often
2019-03-10 15:36:32 +00:00
Laurent Monin
7e2369c1f3
_move_additional_files(): return asap if same directory
...
If old file and new file are in the same directory, there's no need to move any additionnal files
Apparently, the code wasn't really taking care of this,
since its introduction in 6d4dc078ae
2019-03-09 16:34:05 +01:00
Laurent Monin
38a048f8dc
Clean up /reformat install doc (especially regarding discid/libdiscid)
2019-03-09 11:40:41 +01:00
Laurent Monin
326f29b268
Better handling of missing libdiscid, catching OSError as per documentation
...
Picard cannot run without this patch and missing libdiscid and python-libdiscid.
It falls back on discid module, but when this one is trying to load libdiscid it fails with:
OSError: libdiscid.so.0: cannot open shared object file: No such file or directory
According to https://python-discid.readthedocs.io/en/latest/install/#dependencies
"The module discid cannot be imported without Libdiscid >= 0.2.2 installed.
If you want to use it as optional dependency, import the module only when
needed or catch the OSError when libdiscid is not found."
So catch OSError and define discid to None.
After that, Picard runs but emits a warning:
W: 10:54:37,425 picard/ui/mainwindow.create_actions:465: CDROM: discid library not found - Lookup CD functionality disabled
2019-03-09 11:07:31 +01:00
Laurent Monin
4ba06e854b
Minor PEP8 fixes
2019-03-08 11:20:26 +01:00
Laurent Monin
f90718a2a2
Merge pull request #1125 from phw/PICARD-1485-format-time-with-hours
...
PICARD-1485: Format track durations with hours
2019-03-08 10:55:04 +01:00
Philipp Wolfer
f0619614a3
PICARD-1485: Format track durations with hours
...
Durations of an hour or more will show the hours as HH:MM:SS
2019-03-08 10:24:12 +01:00
Philipp Wolfer
8608bf16e8
Merge pull request #1123 from zas/const.sys
...
Introduce picard.const.sys: IS_WIN, IS_MACOS, IS_LINUX, IS_FROZEN
2019-03-06 14:10:11 +01:00
Laurent Monin
1a9a86ff99
Move frozen stuff to picard.const.sys as IS_FROZEN and FROZEN_TEMP_PATH
2019-03-05 21:53:38 +01:00
Laurent Monin
6388ef20f5
Use IS_WIN, IS_MACOS, IS_LINUX
2019-03-05 21:53:32 +01:00
Laurent Monin
1f6adb07c2
Add constants IS_WIN, IS_MACOS, IS_LINUX to new picard.const.sys
2019-03-05 21:52:25 +01:00
Philipp Wolfer
6cc6e4d84e
PICARD-1483: Fix submitting AcoustId for non-album tracks
2019-03-05 17:45:29 +01:00
Laurent Monin
9a7b32316d
Merge pull request #1121 from zas/test_filesystem_cleanup
...
Test filesystem cleanup
2019-03-05 12:51:44 +01:00
Laurent Monin
9df54c1610
Introduce _assertFile()/_assertNoFile() and reduce redundancy a bit more
2019-03-05 11:03:23 +01:00
Laurent Monin
549800aa0a
Simplify even more
2019-03-05 10:54:42 +01:00
Laurent Monin
48206692de
Reduce code redundancy, introducing _move_additional_files(files)
2019-03-05 10:23:51 +01:00
Laurent Monin
5fa087dde3
Use a dict to store filepaths
2019-03-05 10:17:58 +01:00
Laurent Monin
6d78ff9ca3
Merge pull request #1115 from zas/file_cleanup
...
File cleanup
2019-03-04 22:53:01 +01:00
Philipp Wolfer
17464ab8dd
Bump API version to 2.2
2019-03-04 21:52:59 +01:00
Philipp Wolfer
fb08346030
PICARD-1400: Remove Amazon cover art provider
...
Will be provided as plugin
2019-03-04 21:52:59 +01:00
Laurent Monin
031172f0af
Test against File.LOOKUP_METADATA, more explicit, only 2 values possible
2019-03-04 21:51:29 +01:00
Laurent Monin
3582462b97
Introduce File.LOOKUP_ACOUSTID and File.LOOKUP_METADATA
2019-03-04 21:51:29 +01:00
Laurent Monin
ee6a16185d
Remove useless tests
2019-03-04 21:49:31 +01:00
Laurent Monin
5bb460dac5
Use heap instead of list+sort, as we only care best result
2019-03-04 21:49:31 +01:00
Laurent Monin
de3dbbbeb4
Rework File._move_additional_files()
...
- use faster os.scandir() (since python 3.5)
- change the logic so we don't build list of all files but only list of files to move
- handle OSError, a file or directory could be removed during the process, or have permissions changed
- log such errors
2019-03-04 21:48:07 +01:00
Laurent Monin
bd7b471416
Test File.move_additional_files() for hidden files cases
...
In case patterns start with a dot we don't ignore hidden files
It was implemented in https://github.com/metabrainz/picard/pull/519
2019-03-04 21:48:07 +01:00
Laurent Monin
8d5efd4c09
Cache self.cluster_dict.get_token(y).lower() calculation
2019-03-04 21:46:17 +01:00
Laurent Monin
fbd5491376
ClusterDict.add(): tokenize only if needed
2019-03-04 21:46:17 +01:00
Laurent Monin
dc035f951f
Lower word once
2019-03-04 21:46:17 +01:00
Laurent Monin
b86a687e15
Use defaultdict for words and ids properties and simplify code
2019-03-04 21:46:17 +01:00
Laurent Monin
702c4b7ca3
Remove unused print/debug method printCluster()
2019-03-04 21:46:17 +01:00
Laurent Monin
197f1e1b24
Use super() instead of parent class name
2019-03-04 21:46:17 +01:00
Laurent Monin
1f14c19a35
getSize -> get_size
2019-03-04 21:46:17 +01:00
Laurent Monin
0f54eab991
getWord -> get_word
2019-03-04 21:46:17 +01:00
Laurent Monin
771a2339a3
getToken -> get_token
2019-03-04 21:46:17 +01:00
Laurent Monin
841c8acbfc
getWordAndCount -> get_word_and_count
2019-03-04 21:46:17 +01:00
Laurent Monin
9a5dcd83dd
getClusterTitle -> get_cluster_title
2019-03-04 21:46:17 +01:00
Laurent Monin
e97cdaef00
getClusterFromId -> get_cluster_from_id
2019-03-04 21:46:17 +01:00