def example_1(self): file = File("ticket_to_ride.mp3") file.state = File.NORMAL file.metadata['album'] = 'Help!' file.metadata['title'] = 'Ticket to Ride' file.metadata['artist'] = 'The Beatles' file.metadata['artistsort'] = 'Beatles, The' file.metadata['albumartist'] = 'The Beatles' file.metadata['albumartistsort'] = 'Beatles, The' file.metadata['tracknumber'] = '7' file.metadata['totaltracks'] = '14' file.metadata['discnumber'] = '1' file.metadata['totaldiscs'] = '1' file.metadata['date'] = '1965-08-06' file.metadata['releasetype'] = ['album', 'soundtrack'] file.metadata['~primaryreleasetype'] = ['album'] file.metadata['~secondaryreleasetype'] = ['soundtrack'] file.metadata['releasestatus'] = 'official' file.metadata['releasecountry'] = 'US' file.metadata['~extension'] = 'mp3' file.metadata[ 'musicbrainz_albumid'] = '2c053984-4645-4699-9474-d2c35c227028' file.metadata[ 'musicbrainz_albumartistid'] = 'b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d' file.metadata[ 'musicbrainz_artistid'] = 'b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d' file.metadata[ 'musicbrainz_recordingid'] = 'ed052ae1-c950-47f2-8d2b-46e1b58ab76c' file.metadata[ 'musicbrainz_releasetrackid'] = '7668a62a-2fac-3151-a744-5707ac8c883c' return file
def example_1(self): file = File("ticket_to_ride.mp3") file.state = File.NORMAL file.metadata['album'] = 'Help!' file.metadata['title'] = 'Ticket to Ride' file.metadata['artist'] = 'The Beatles' file.metadata['artistsort'] = 'Beatles, The' file.metadata['albumartist'] = 'The Beatles' file.metadata['albumartistsort'] = 'Beatles, The' file.metadata['tracknumber'] = '7' file.metadata['totaltracks'] = '14' file.metadata['discnumber'] = '1' file.metadata['totaldiscs'] = '1' file.metadata['date'] = '1965-08-06' file.metadata['releasetype'] = ['album', 'soundtrack'] file.metadata['~primaryreleasetype'] = ['album'] file.metadata['~secondaryreleasetype'] = ['soundtrack'] file.metadata['releasestatus'] = 'official' file.metadata['releasecountry'] = 'US' file.metadata['~extension'] = 'mp3' file.metadata['musicbrainz_albumid'] = '2c053984-4645-4699-9474-d2c35c227028' file.metadata['musicbrainz_albumartistid'] = 'b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d' file.metadata['musicbrainz_artistid'] = 'b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d' file.metadata['musicbrainz_recordingid'] = 'ed052ae1-c950-47f2-8d2b-46e1b58ab76c' file.metadata['musicbrainz_releasetrackid'] = '7668a62a-2fac-3151-a744-5707ac8c883c' return file
def example_2(self): file = File("track05.mp3") file.state = File.NORMAL file.metadata['album'] = "Coup d'État, Volume 1: Ku De Ta / Prologue" file.metadata['title'] = "I've Got to Learn the Mambo" file.metadata['artist'] = "Snowboy feat. James Hunter" file.metadata['artistsort'] = "Snowboy feat. Hunter, James" file.metadata['albumartist'] = config.setting['va_name'] file.metadata['albumartistsort'] = config.setting['va_name'] file.metadata['tracknumber'] = '5' file.metadata['totaltracks'] = '13' file.metadata['discnumber'] = '2' file.metadata['totaldiscs'] = '2' file.metadata['discsubtitle'] = "Beat Up" file.metadata['date'] = '2005-07-04' file.metadata['releasetype'] = ['album', 'compilation'] file.metadata['~primaryreleasetype'] = 'album' file.metadata['~secondaryreleasetype'] = 'compilation' file.metadata['releasestatus'] = 'official' file.metadata['releasecountry'] = 'AU' file.metadata['compilation'] = '1' file.metadata['~multiartist'] = '1' file.metadata['~extension'] = 'mp3' file.metadata['musicbrainz_albumid'] = '4b50c71e-0a07-46ac-82e4-cb85dc0c9bdd' file.metadata['musicbrainz_recordingid'] = 'b3c487cb-0e55-477d-8df3-01ec6590f099' file.metadata['musicbrainz_releasetrackid'] = 'f8649a05-da39-39ba-957c-7abf8f9012be' file.metadata['musicbrainz_albumartistid'] = '89ad4ac3-39f7-470e-963a-56509c546377' file.metadata['musicbrainz_artistid'] = ['7b593455-d207-482c-8c6f-19ce22c94679', '9e082466-2390-40d1-891e-4803531f43fd'] return file
def example_2(self): file = File("track05.mp3") file.state = File.NORMAL # The data for this example does not match the release on MusicBrainz, # but still works well enough as an example. file.metadata['album'] = 'Explosive Doowops, Volume 4' file.metadata['title'] = 'Why? Oh Why?' file.metadata['artist'] = 'The Fantasys' file.metadata['artistsort'] = 'Fantasys, The' file.metadata['albumartist'] = config.setting['va_name'] file.metadata['albumartistsort'] = config.setting['va_name'] file.metadata['tracknumber'] = '5' file.metadata['totaltracks'] = '26' file.metadata['discnumber'] = '2' file.metadata['totaldiscs'] = '2' file.metadata['date'] = '1999-02-03' file.metadata['releasetype'] = ['album', 'compilation'] file.metadata['~primaryreleasetype'] = ['album'] file.metadata['~secondaryreleasetype'] = ['compilation'] file.metadata['releasestatus'] = 'official' file.metadata['releasecountry'] = 'US' file.metadata['compilation'] = '1' file.metadata['~extension'] = 'mp3' file.metadata['musicbrainz_albumid'] = 'bcc97e8a-2055-400b-a6ed-83288285c6fc' file.metadata['musicbrainz_albumartistid'] = '89ad4ac3-39f7-470e-963a-56509c546377' file.metadata['musicbrainz_artistid'] = '06704773-aafe-4aca-8833-b449e0a6467f' file.metadata['musicbrainz_recordingid'] = 'd92837ee-b1e4-4649-935f-e433c3e5e429' file.metadata['musicbrainz_releasetrackid'] = 'eac99807-93d4-3668-9714-fa0c1b487ccf' return file
def example_2(self): file = File("track05.mp3") file.state = File.NORMAL file.metadata['album'] = 'Explosive Doowops, Volume 4' file.metadata['title'] = 'Why? Oh Why?' file.metadata['artist'] = 'The Fantasys' file.metadata['artistsort'] = 'Fantasys, The' file.metadata['albumartist'] = self.config.setting['va_name'] file.metadata['albumartistsort'] = self.config.setting['va_name'] file.metadata['tracknumber'] = '5' file.metadata['totaltracks'] = '26' file.metadata['discnumber'] = '2' file.metadata['totaldiscs'] = '2' file.metadata['date'] = '1999-02-03' file.metadata['releasetype'] = 'compilation' file.metadata['releasestatus'] = 'official' file.metadata['releasecountry'] = 'US' file.metadata['compilation'] = '1' file.metadata['~extension'] = 'mp3' file.metadata[ 'musicbrainz_albumid'] = 'bcc97e8a-2055-400b-a6ed-83288285c6fc' file.metadata[ 'musicbrainz_albumartistid'] = '89ad4ac3-39f7-470e-963a-56509c546377' file.metadata[ 'musicbrainz_artistid'] = '06704773-aafe-4aca-8833-b449e0a6467f' file.metadata[ 'musicbrainz_trackid'] = 'd92837ee-b1e4-4649-935f-e433c3e5e429' return file
def example_1(self): file = File("ticket_to_ride.mp3") file.state = File.NORMAL file.metadata['album'] = 'Help!' file.metadata['title'] = 'Ticket to Ride' file.metadata['artist'] = 'The Beatles' file.metadata['artistsort'] = 'Beatles, The' file.metadata['albumartist'] = 'The Beatles' file.metadata['albumartistsort'] = 'Beatles, The' file.metadata['tracknumber'] = '7' file.metadata['totaltracks'] = '14' file.metadata['discnumber'] = '1' file.metadata['totaldiscs'] = '1' file.metadata['date'] = '1965-08-06' file.metadata['releasetype'] = 'album' file.metadata['releasestatus'] = 'official' file.metadata['releasecountry'] = 'US' file.metadata['~extension'] = 'mp3' file.metadata[ 'musicbrainz_albumid'] = '2c053984-4645-4699-9474-d2c35c227028' file.metadata[ 'musicbrainz_albumartistid'] = 'b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d' file.metadata[ 'musicbrainz_artistid'] = 'b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d' file.metadata[ 'musicbrainz_trackid'] = '898a2916-f64d-48d3-ab1a-3446fb450448' return file
def example_2(self): file = File("track05.mp3") file.state = File.NORMAL # The data for this example does not match the release on MusicBrainz, # but still works well enough as an example. file.metadata['album'] = 'Explosive Doowops, Volume 4' file.metadata['title'] = 'Why? Oh Why?' file.metadata['artist'] = 'The Fantasys' file.metadata['artistsort'] = 'Fantasys, The' file.metadata['albumartist'] = config.setting['va_name'] file.metadata['albumartistsort'] = config.setting['va_name'] file.metadata['tracknumber'] = '5' file.metadata['totaltracks'] = '26' file.metadata['discnumber'] = '2' file.metadata['totaldiscs'] = '2' file.metadata['date'] = '1999-02-03' file.metadata['releasetype'] = ['album', 'compilation'] file.metadata['~primaryreleasetype'] = ['album'] file.metadata['~secondaryreleasetype'] = ['compilation'] file.metadata['releasestatus'] = 'official' file.metadata['releasecountry'] = 'US' file.metadata['compilation'] = '1' file.metadata['~extension'] = 'mp3' file.metadata[ 'musicbrainz_albumid'] = 'bcc97e8a-2055-400b-a6ed-83288285c6fc' file.metadata[ 'musicbrainz_albumartistid'] = '89ad4ac3-39f7-470e-963a-56509c546377' file.metadata[ 'musicbrainz_artistid'] = '06704773-aafe-4aca-8833-b449e0a6467f' file.metadata[ 'musicbrainz_recordingid'] = 'd92837ee-b1e4-4649-935f-e433c3e5e429' file.metadata[ 'musicbrainz_releasetrackid'] = 'eac99807-93d4-3668-9714-fa0c1b487ccf' return file
def example_1(self): file = File("ticket_to_ride.mp3") file.state = File.NORMAL file.metadata['album'] = 'Help!' file.metadata['title'] = 'Ticket to Ride' file.metadata['~releasecomment'] = '2014 mono remaster' file.metadata['artist'] = 'The Beatles' file.metadata['artistsort'] = 'Beatles, The' file.metadata['albumartist'] = 'The Beatles' file.metadata['albumartistsort'] = 'Beatles, The' file.metadata['tracknumber'] = '7' file.metadata['totaltracks'] = '14' file.metadata['discnumber'] = '1' file.metadata['totaldiscs'] = '1' file.metadata['originaldate'] = '1965-08-06' file.metadata['originalyear'] = '1965' file.metadata['date'] = '2014-09-08' file.metadata['releasetype'] = ['album', 'soundtrack'] file.metadata['~primaryreleasetype'] = ['album'] file.metadata['~secondaryreleasetype'] = ['soundtrack'] file.metadata['releasestatus'] = 'official' file.metadata['releasecountry'] = 'US' file.metadata['~extension'] = 'mp3' file.metadata[ 'musicbrainz_albumid'] = 'd7fbbb0a-1348-40ad-8eef-cd438d4cd203' file.metadata[ 'musicbrainz_albumartistid'] = 'b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d' file.metadata[ 'musicbrainz_artistid'] = 'b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d' file.metadata[ 'musicbrainz_recordingid'] = 'ed052ae1-c950-47f2-8d2b-46e1b58ab76c' file.metadata[ 'musicbrainz_releasetrackid'] = '392639f5-5629-477e-b04b-93bffa703405' return file
def example_2(self): file = File("track05.mp3") file.state = File.NORMAL # The data for this example does not match the release on MusicBrainz, # but still works well enough as an example. file.metadata["album"] = "Explosive Doowops, Volume 4" file.metadata["title"] = "Why? Oh Why?" file.metadata["artist"] = "The Fantasys" file.metadata["artistsort"] = "Fantasys, The" file.metadata["albumartist"] = config.setting["va_name"] file.metadata["albumartistsort"] = config.setting["va_name"] file.metadata["tracknumber"] = "5" file.metadata["totaltracks"] = "26" file.metadata["discnumber"] = "2" file.metadata["totaldiscs"] = "2" file.metadata["date"] = "1999-02-03" file.metadata["releasetype"] = ["album", "compilation"] file.metadata["~primaryreleasetype"] = ["album"] file.metadata["~secondaryreleasetype"] = ["compilation"] file.metadata["releasestatus"] = "official" file.metadata["releasecountry"] = "US" file.metadata["compilation"] = "1" file.metadata["~extension"] = "mp3" file.metadata["musicbrainz_albumid"] = "bcc97e8a-2055-400b-a6ed-83288285c6fc" file.metadata["musicbrainz_albumartistid"] = "89ad4ac3-39f7-470e-963a-56509c546377" file.metadata["musicbrainz_artistid"] = "06704773-aafe-4aca-8833-b449e0a6467f" file.metadata["musicbrainz_recordingid"] = "d92837ee-b1e4-4649-935f-e433c3e5e429" file.metadata["musicbrainz_releasetrackid"] = "eac99807-93d4-3668-9714-fa0c1b487ccf" return file
def example_1(self): file = File("ticket_to_ride.mp3") file.state = File.NORMAL file.metadata["album"] = "Help!" file.metadata["title"] = "Ticket to Ride" file.metadata["artist"] = "The Beatles" file.metadata["artistsort"] = "Beatles, The" file.metadata["albumartist"] = "The Beatles" file.metadata["albumartistsort"] = "Beatles, The" file.metadata["tracknumber"] = "7" file.metadata["totaltracks"] = "14" file.metadata["discnumber"] = "1" file.metadata["totaldiscs"] = "1" file.metadata["date"] = "1965-08-06" file.metadata["releasetype"] = ["album", "soundtrack"] file.metadata["~primaryreleasetype"] = ["album"] file.metadata["~secondaryreleasetype"] = ["soundtrack"] file.metadata["releasestatus"] = "official" file.metadata["releasecountry"] = "US" file.metadata["~extension"] = "mp3" file.metadata["musicbrainz_albumid"] = "2c053984-4645-4699-9474-d2c35c227028" file.metadata["musicbrainz_albumartistid"] = "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d" file.metadata["musicbrainz_artistid"] = "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d" file.metadata["musicbrainz_recordingid"] = "ed052ae1-c950-47f2-8d2b-46e1b58ab76c" file.metadata["musicbrainz_releasetrackid"] = "7668a62a-2fac-3151-a744-5707ac8c883c" return file
def example_1(self): file = File("ticket_to_ride.mp3") file.state = File.NORMAL file.metadata['album'] = 'Help!' file.metadata['title'] = 'Ticket to Ride' file.metadata['artist'] = 'The Beatles' file.metadata['artistsort'] = 'Beatles, The' file.metadata['albumartist'] = 'The Beatles' file.metadata['albumartistsort'] = 'Beatles, The' file.metadata['tracknumber'] = '7' file.metadata['totaltracks'] = '14' file.metadata['discnumber'] = '1' file.metadata['totaldiscs'] = '1' file.metadata['date'] = '1965-08-06' file.metadata['releasetype'] = 'album' file.metadata['releasestatus'] = 'official' file.metadata['releasecountry'] = 'US' file.metadata['~extension'] = 'mp3' file.metadata['musicbrainz_albumid'] = '2c053984-4645-4699-9474-d2c35c227028' file.metadata['musicbrainz_albumartistid'] = 'b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d' file.metadata['musicbrainz_artistid'] = 'b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d' file.metadata['musicbrainz_trackid'] = '898a2916-f64d-48d3-ab1a-3446fb450448' return file
def example_2(self): file = File("track05.mp3") file.state = File.NORMAL file.metadata['album'] = 'Explosive Doowops, Volume 4' file.metadata['title'] = 'Why? Oh Why?' file.metadata['artist'] = 'The Fantasys' file.metadata['artistsort'] = 'Fantasys, The' file.metadata['albumartist'] = self.config.setting['va_name'] file.metadata['albumartistsort'] = self.config.setting['va_name'] file.metadata['tracknumber'] = '5' file.metadata['totaltracks'] = '26' file.metadata['discnumber'] = '2' file.metadata['totaldiscs'] = '2' file.metadata['date'] = '1999-02-03' file.metadata['releasetype'] = 'compilation' file.metadata['releasestatus'] = 'official' file.metadata['releasecountry'] = 'US' file.metadata['compilation'] = '1' file.metadata['~extension'] = 'mp3' file.metadata['musicbrainz_albumid'] = 'bcc97e8a-2055-400b-a6ed-83288285c6fc' file.metadata['musicbrainz_albumartistid'] = '89ad4ac3-39f7-470e-963a-56509c546377' file.metadata['musicbrainz_artistid'] = '06704773-aafe-4aca-8833-b449e0a6467f' file.metadata['musicbrainz_trackid'] = 'd92837ee-b1e4-4649-935f-e433c3e5e429' return file
def default_examples(): """Generator for default example files. Yields: File: the next example File object """ # example 1 efile = File("ticket_to_ride.mp3") efile.state = File.NORMAL efile.metadata.update({ 'album': 'Help!', 'title': 'Ticket to Ride', '~releasecomment': '2014 mono remaster', 'artist': 'The Beatles', 'artistsort': 'Beatles, The', 'albumartist': 'The Beatles', 'albumartistsort': 'Beatles, The', 'tracknumber': '7', 'totaltracks': '14', 'discnumber': '1', 'totaldiscs': '1', 'originaldate': '1965-08-06', 'originalyear': '1965', 'date': '2014-09-08', 'releasetype': ['album', 'soundtrack'], '~primaryreleasetype': ['album'], '~secondaryreleasetype': ['soundtrack'], 'releasestatus': 'official', 'releasecountry': 'US', '~extension': 'mp3', 'musicbrainz_albumid': 'd7fbbb0a-1348-40ad-8eef-cd438d4cd203', 'musicbrainz_albumartistid': 'b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d', 'musicbrainz_artistid': 'b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d', 'musicbrainz_recordingid': 'ed052ae1-c950-47f2-8d2b-46e1b58ab76c', 'musicbrainz_releasetrackid': '392639f5-5629-477e-b04b-93bffa703405', }) yield efile # example 2 config = get_config() efile = File("track05.mp3") efile.state = File.NORMAL efile.metadata.update({ 'album': "Coup d'État, Volume 1: Ku De Ta / Prologue", 'title': "I've Got to Learn the Mambo", 'artist': "Snowboy feat. James Hunter", 'artistsort': "Snowboy feat. Hunter, James", 'albumartist': config.setting['va_name'], 'albumartistsort': config.setting['va_name'], 'tracknumber': '5', 'totaltracks': '13', 'discnumber': '2', 'totaldiscs': '2', 'discsubtitle': "Beat Up", 'originaldate': '2005-07-04', 'originalyear': '2005', 'date': '2005-07-04', 'releasetype': ['album', 'compilation'], '~primaryreleasetype': 'album', '~secondaryreleasetype': 'compilation', 'releasestatus': 'official', 'releasecountry': 'AU', 'compilation': '1', '~multiartist': '1', '~extension': 'mp3', 'musicbrainz_albumid': '4b50c71e-0a07-46ac-82e4-cb85dc0c9bdd', 'musicbrainz_recordingid': 'b3c487cb-0e55-477d-8df3-01ec6590f099', 'musicbrainz_releasetrackid': 'f8649a05-da39-39ba-957c-7abf8f9012be', 'musicbrainz_albumartistid': '89ad4ac3-39f7-470e-963a-56509c546377', 'musicbrainz_artistid': [ '7b593455-d207-482c-8c6f-19ce22c94679', '9e082466-2390-40d1-891e-4803531f43fd' ], }) yield efile