Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
9and3r committed Aug 4, 2014
1 parent 3244b65 commit 9ade6eb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'Mopidy-Touchscreen.tex',
u'Mopidy-Touchscreen Documentation',
u'9and3r', 'manual'),
('index', 'Mopidy-Touchscreen.tex',
u'Mopidy-Touchscreen Documentation',
u'9and3r', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down
1 change: 0 additions & 1 deletion mopidy_touchscreen/library_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,3 @@ def play_uri(self, uri, track):
else:
# TODO: add folder to tracks to play
pass

7 changes: 3 additions & 4 deletions mopidy_touchscreen/list_view.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import logging
from .screen_objects import ScreenObjectsManager, TouchAndTextItem, ScrollBar
from .touch_manager import TouchManager

from .screen_objects import ScreenObjectsManager, TouchAndTextItem, ScrollBar

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -50,8 +49,8 @@ def load_new_item_position(self, item_pos):
width = self.size[0]
while i < self.list_size and z < self.max_rows:
item = TouchAndTextItem(self.font, self.list[i], (
self.pos[0], self.pos[1] + self.base_size * z),
(width, -1))
self.pos[0], self.pos[1] + self.base_size * z),
(width, -1))
self.screen_objects.set_touch_object(str(i), item)
i += 1
z += 1
Expand Down
10 changes: 5 additions & 5 deletions mopidy_touchscreen/main_screen.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import hashlib
import time
import os
from threading import Thread
import urllib
import urllib2
import json
import pygame
import hashlib
import logging

import pygame
from .touch_manager import TouchManager
from .screen_objects import ScreenObjectsManager, Progressbar, \
TouchAndTextItem, TextItem
Expand Down Expand Up @@ -90,7 +89,7 @@ def track_started(self, track):
None)
self.touch_text_manager.set_touch_object("next", button)

#Progress
# Progress
progress = Progressbar(self.fonts['base'],
time.strftime('%M:%S', time.gmtime(
0)) + "/" + time.strftime('%M:%S',
Expand Down Expand Up @@ -143,7 +142,8 @@ def download_image(self, artist_index):
MainScreen.get_track_album_name(self.track))
url = "http://ws.audioscrobbler.com/2.0/?"
params = "method=album.getinfo&" + \
"api_key=59a04c6a73fb99d6e8996e01db306829&artist=" \
"api_key=59a04c6a73fb99d6e8996e01db306829&" \
+ "artist=" \
+ safe_artist + "&album=" + safe_album + "&format=json"
response = urllib2.urlopen(url + params)
data = json.load(response)
Expand Down

0 comments on commit 9ade6eb

Please sign in to comment.