Commit Graph

37 Commits

Author SHA1 Message Date
Thomas Adamcik
1985b4af76 Switch all tests over to from tests import unittest, which will be unittest2 on < 2.7 and plain unittest otherwise 2011-07-31 22:21:34 +02:00
Martins Grunskis
159831c6e7 mopidy-scan fails if track has no artist name
stack trace:

    Traceback (most recent call last):
      File ./scan, line 27, in <module>
        for a in tracks_to_tag_cache_format(tracks):
      File /home/martins/source/mopidy/mopidy/frontends/mpd/translator.py, line 138, in tracks_to_tag_cache_format
        _add_to_tag_cache(result, *tracks_to_directory_tree(tracks))
      File /home/martins/source/mopidy/mopidy/frontends/mpd/translator.py, line 151, in _add_to_tag_cache
        _add_to_tag_cache(result, *entry)
      File /home/martins/source/mopidy/mopidy/frontends/mpd/translator.py, line 156, in _add_to_tag_cache
        track_result = dict(track_to_mpd_format(track))
      File /home/martins/source/mopidy/mopidy/frontends/mpd/translator.py, line 28, in track_to_mpd_format
        ('Artist', artists_to_mpd_format(track.artists)),
      File /home/martins/source/mopidy/mopidy/frontends/mpd/translator.py, line 88, in artists_to_mpd_format
        return u', '.join([a.name for a in artists if a])
    TypeError: sequence item 0: expected string or Unicode, NoneType found
2011-02-09 18:48:15 +02:00
Stein Magnus Jodal
c097af1a83 Fix a bunch of pylint errors/warnings in test suite 2011-01-23 18:39:05 +01:00
Thomas Adamcik
37222d66f5 Add albumartistid to frontent 2010-11-02 01:00:11 +01:00
Thomas Adamcik
31933c2c2f Fix musicbrainz support in mpd format track 2010-11-02 00:43:03 +01:00
Thomas Adamcik
e7a7d342b8 Add tests for musicbrainz in mpd formated tracks 2010-11-02 00:36:01 +01:00
Thomas Adamcik
5974d696f1 Refactor mpd formater test 2010-11-02 00:36:01 +01:00
Thomas Adamcik
dd25fadd8b Track result should contain key 2010-11-01 23:23:59 +01:00
Thomas Adamcik
8bfa7d2937 Update tag cache code so it adds mtime and file that is relative 2010-11-01 23:16:49 +01:00
Thomas Adamcik
4ac1d8d217 Remove mtime and key from track_to_mpd_format 2010-11-01 23:09:21 +01:00
Thomas Adamcik
c513d0f6e7 Rename settings that have dirs or file to _PATH and _FILE 2010-11-01 00:37:55 +01:00
Thomas Adamcik
357591e97e Introduce concept of mpd ordered track info for simpler diffing of tag caches 2010-10-30 21:53:59 +02:00
Thomas Adamcik
b9976c4cda Remove uri_to_mpd_relative_path 2010-10-30 21:26:08 +02:00
Thomas Adamcik
d67bfb9aee Use new mtime helper 2010-10-30 20:58:41 +02:00
Thomas Adamcik
9a99bc46bf Add album artist to track to mpd format 2010-10-30 20:46:47 +02:00
Thomas Adamcik
6049c7a094 Turn track_artists_to_mpd_format into artists_to_mpd_format 2010-10-30 20:41:45 +02:00
Thomas Adamcik
ea74f539ba Fix mistakes in tag cache generation 2010-10-30 01:06:26 +02:00
Thomas Adamcik
96d4633306 Ensure that key does not have uri encoded strings 2010-10-30 00:40:01 +02:00
Thomas Adamcik
ca95a510c9 Ensure that mtime is included 2010-10-30 00:37:42 +02:00
Thomas Adamcik
7559426c50 Add test for files in multiple directories 2010-10-29 23:56:01 +02:00
Thomas Adamcik
93eda1c81e Extra test for multiple top level files 2010-10-29 23:46:40 +02:00
Thomas Adamcik
6b99416830 Add test for sub sub dirs in tag cache generator 2010-10-29 23:43:49 +02:00
Thomas Adamcik
94db967672 Tag cache seems to support directories now 2010-10-29 23:26:05 +02:00
Thomas Adamcik
1a6831ab68 Add tracks_to_directory_tree helper 2010-10-29 23:06:58 +02:00
Thomas Adamcik
8d1339ef7f Add option to get mtime set in translator 2010-10-29 22:18:35 +02:00
Thomas Adamcik
21eadf3dc7 Refactor tag_cache generation tests 2010-10-29 21:56:20 +02:00
Thomas Adamcik
a8a447c47f Use key=True for track_to_mpd_format generation 2010-10-29 21:36:11 +02:00
Thomas Adamcik
b2cb3136b2 Rename tests 2010-10-29 21:27:40 +02:00
Thomas Adamcik
488ac28431 Add key parameter to track_to_mpd_format 2010-10-29 21:25:02 +02:00
Thomas Adamcik
151b1c3b4e Add explicit tests for position and cpid in track_to_mpd_format 2010-10-29 21:23:15 +02:00
Thomas Adamcik
cf516c5ef0 Ensure that mpd_format_track handles file: properly 2010-10-29 21:17:08 +02:00
Thomas Adamcik
014e29ffa2 Fix uri_to_mpd_relative_path so that it handles None 2010-10-29 21:15:32 +02:00
Thomas Adamcik
44012b30b0 Add uri_to_mpd_relative_path 2010-10-29 20:33:13 +02:00
Thomas Adamcik
02df8ca033 Start writting tracks_to_tag_cache_format 2010-10-29 20:04:53 +02:00
Thomas Adamcik
3e595213ac Ensure that result has exact right number of elements 2010-10-29 19:34:33 +02:00
Johannes Knutsen
e1f8a0bf72 Rename mopidy.frontends.mpd.{serializer => translator} to match naming in backends. 2010-08-13 20:48:38 +02:00
Stein Magnus Jodal
b4c91af7d7 Relocate MPD frontend to 'mopidy.frontends.mpd' 2010-08-09 21:17:36 +02:00