Commit Graph

7535 Commits

Author SHA1 Message Date
Laurent Monin
304853ad80 ArtistSearchDialog: use SearchDialog.set_table_item() 2018-01-27 20:33:01 +01:00
Laurent Monin
13095caf61 TrackSearchDialog: use SearchDialog.set_table_item() 2018-01-27 20:33:01 +01:00
Laurent Monin
f32b3eb055 AlbumSearchDialog: use an helper method and shorten lines 2018-01-27 20:33:01 +01:00
Laurent Monin
e912db441a ArtistSearchDialog: use SearchDialog.colpos() and get rid of hardcoded positions 2018-01-27 20:33:01 +01:00
Laurent Monin
f978752d31 AlbumSearchDialog: use SearchDialog.colpos() and get rid of hardcoded positions 2018-01-27 20:33:01 +01:00
Laurent Monin
51177e14fb TrackSearchDialog: use SearchDialog.colpos instead of hardcoded position 2018-01-27 20:33:01 +01:00
Laurent Monin
81f8595b69 SearchDialog: add method colpos to get position of a column by name
Use private property __colkeys to cache the list of column names
2018-01-27 20:33:01 +01:00
Laurent Monin
f5bc1aa091 Name table columns, using OrderedDict and setters/getters 2018-01-27 20:33:01 +01:00
Laurent Monin
e502ca4780 CoverWidget: do not hardcode pixmap width and height 2018-01-27 20:33:00 +01:00
Laurent Monin
1ee35b6e90 Rename CoverArt class to CoverWidget
We already have a CoverArt class in Picard tree.
2018-01-27 20:33:00 +01:00
Laurent Monin
c5fc27b462 CoverArt class: rename update() to set_pixmap()
It does a different thing than QWidget.update()
2018-01-27 20:33:00 +01:00
Laurent Monin
c44fca4e6e Use QtWidgets.QWidget parent() and set it properly 2018-01-27 20:33:00 +01:00
Laurent Monin
1a371333bf Use Python3 super() 2018-01-27 20:33:00 +01:00
Laurent Monin
39a40b6678 PEP8 fixes: fix incorrect indentation and few missing whitelines 2018-01-27 20:33:00 +01:00
Laurent Monin
274b5bd34d show_table(): remove unused column_headers parameter 2018-01-27 20:33:00 +01:00
Laurent Monin
41f17c8ba1 Merge pull request #813 from zas/slowdown_fix
PICARD-1181: slow down only on certain errors (429, 5xx)
2018-01-27 16:22:37 +01:00
Laurent Monin
9a8e1960ec PICARD-1181: slow down only on certain errors (429, 5xx) 2018-01-26 16:56:26 +01:00
Laurent Monin
b0c690da2c Merge pull request #812 from zas/python3_super
Use Python3 super()
2018-01-26 09:34:34 +01:00
Laurent Monin
90ce834eab Use Python3 super()
https://www.python.org/dev/peps/pep-3135/
https://docs.python.org/3.5/library/functions.html#super
https://rhettinger.wordpress.com/2011/05/26/super-considered-super/
2018-01-26 09:18:59 +01:00
Laurent Monin
1774ae141a Merge pull request #811 from zas/duplicated_keys_test_codacy
Duplicated keys test codacy
2018-01-25 20:07:38 +01:00
Laurent Monin
7a36f8c5f4 Sort dicts by key so it is easier to find something 2018-01-25 18:40:45 +01:00
Laurent Monin
136e3a9e7a Remove duplicate key 'artist' in tags dicts
This is there since 10 years, appeared with cfe5299a76
2018-01-25 18:34:04 +01:00
Laurent Monin
2f1e58c56e Remove duplicate key 'album' in tags dicts
This is there since 10 years, appeared with cfe5299a76
2018-01-25 18:31:39 +01:00
Laurent Monin
d5beab75fa Do not redefine builtin map 2018-01-25 17:44:06 +01:00
Laurent Monin
fc45530ded Merge pull request #806 from samj1912/picard1179
PICARD-1179 Fix release builder logic
2018-01-22 12:56:38 +01:00
Laurent Monin
b4129329e0 Merge branch 'master' into picard1179 2018-01-22 12:31:59 +01:00
Laurent Monin
594c189e67 Merge pull request #807 from mineo/metadata-arg-naming
run{album,track}_metadata_processors: Correct the first arguments name
2018-01-22 12:30:47 +01:00
Wieland Hoffmann
bce3bb8fbe run{album,track}_metadata_processors: Correct the first arguments name
According to the history, those passed the Album or Track object as the first
argument already in Picard 0.15.1.
2018-01-21 14:25:30 +01:00
Sambhav Kothari
cded37bdd5 Merge branch 'master' into picard1179 2018-01-21 18:15:43 +05:30
Laurent Monin
abad70215e Merge pull request #805 from zas/search_edit_optional
SearchDialog: make search edit box at top optional
2018-01-21 13:41:33 +01:00
Sambhav Kothari
51ce25fb60 PICARD-1179 Fix release builder logic
When releases are built from node, fields are assigned values None at
times which doesn't play well with the string join in a couple of lines
below. This fixes that and reduces code by using default values.
2018-01-21 17:12:32 +05:30
Laurent Monin
b792da9799 SearchDialog: make search edit box at top optional
It will ease reusing this album selector for disambiguation
2018-01-21 11:31:07 +01:00
Laurent Monin
1403e13e54 Merge pull request #803 from zas/search_dialog_states
Simplify search dialog save/restore states code
2018-01-20 15:31:56 +01:00
Laurent Monin
2af8c683b4 Do not save table header state on resize
It causes a call for each column, better to only save when exiting the dialog (already done)
2018-01-20 11:33:56 +01:00
Laurent Monin
c4e1c2584d Move save/restore state methods to parent class SearchDialog
Reduce code redundancy
Log save/restore actions to debug log
2018-01-20 11:32:27 +01:00
Laurent Monin
f006a5bd76 Merge pull request #801 from zas/cd_lookup
Only output CD read failure traceback in debug mode
2018-01-19 11:10:27 +01:00
Laurent Monin
ad6bcb49d0 Merge branch 'master' into cd_lookup 2018-01-19 10:46:50 +01:00
Sambhav Kothari
790a1d619a Merge pull request #802 from mineo/length-score-tests
Fix length_score and add tests
2018-01-19 02:03:11 +05:30
Wieland Hoffmann
c18ae092ba Fix length_score and add tests
In 2f8496e, 1.0 - ... turned into 0.0. Fix that.
2018-01-18 20:58:32 +01:00
Laurent Monin
b4d9d32dee Only output CD read failure traceback in debug mode
It makes the log cleaner, as most of times CD read error is due to CD not inserted.

Without debug mode, output looks like:

```
E: 16:58:00 Error while reading b'/dev/sr1': cannot open device `/dev/sr1'
```

With debug mode:

```
D: 16:58:17 Reading CD using device: b'/dev/sr1'
E: 16:58:17 Error while reading b'/dev/sr1': cannot open device `/dev/sr1'
E: 16:58:17 Traceback (most recent call last):
  File "./picard/util/thread.py", line 47, in run
    result = self.func()
  File "./picard/disc.py", line 55, in read
    raise e
  File "./picard/disc.py", line 50, in read
    disc = discid.read(device)
  File "/home/zas/.virtualenvs/picard2/lib/python3.5/site-packages/discid/disc.py", line 55, in read
    disc.read(device, features)
  File "/home/zas/.virtualenvs/picard2/lib/python3.5/site-packages/discid/disc.py", line 152, in read
    raise DiscError(self._get_error_msg())
discid.disc.DiscError: cannot open device `/dev/sr1'
```
2018-01-18 17:11:02 +01:00
Laurent Monin
cf538b5102 Merge pull request #800 from zas/fix_tab_stops
Re-define or set tabstops to improve keyboard navigation through options
2018-01-18 17:05:37 +01:00
Laurent Monin
382dff8bc9 Merge branch 'master' into fix_tab_stops 2018-01-18 16:29:29 +01:00
Laurent Monin
cbb8685b3e Merge pull request #799 from zas/PICARD-1174
[PICARD-1174] Add an option to control the tolerance of track times difference
2018-01-18 14:30:55 +01:00
Laurent Monin
d37555d3ed [PICARD-1174] Add an option to tolerate differences in track times
The option `ignore_track_duration_difference_under` can be set through Advanced options panel.
If old and new Length tag have a difference under this value, they are considered equal, and this isn't accounted as a track difference.
2018-01-18 13:28:31 +01:00
Laurent Monin
9bdd48f7b3 Re-define or set tabstops to improve keyboard navigation through options 2018-01-18 13:24:50 +01:00
Laurent Monin
1457fb850b Merge pull request #797 from zas/cmp_duration
Minor code cleanup, related to track durations/lengths
2018-01-17 21:34:42 +01:00
Sambhav Kothari
ea5f969427 Merge branch 'master' into cmp_duration 2018-01-18 01:35:48 +05:30
Laurent Monin
e1709215fe Merge pull request #798 from zas/fix_length_edit
Fix removal of ~length from sets, incorrect single-element tuple syntax
2018-01-17 20:16:42 +01:00
Laurent Monin
4e40e7fa07 _update_items(): remove useless intermediate variable 2018-01-17 20:14:38 +01:00
Laurent Monin
2f8496e0c5 Introduce length_score() and document it a bit, reducing code redundancy 2018-01-17 20:14:38 +01:00