瀏覽代碼

Oops, fix the source thing properly

Colin Powell 2 年之前
父節點
當前提交
8d67b672f9
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      vrobbler/apps/scrobbles/tsv.py

+ 1 - 2
vrobbler/apps/scrobbles/tsv.py

@@ -26,7 +26,7 @@ def process_audioscrobbler_tsv_file(file_path, user_tz=None):
         source_id = ""
         source_id = ""
         for row_num, row in enumerate(rows):
         for row_num, row in enumerate(rows):
             if row_num in [0, 1, 2]:
             if row_num in [0, 1, 2]:
-                if "Rockbox" in row[2]:
+                if "Rockbox" in row[0]:
                     source = "Rockbox"
                     source = "Rockbox"
                 source_id += row[0] + "\n"
                 source_id += row[0] + "\n"
                 continue
                 continue
@@ -53,7 +53,6 @@ def process_audioscrobbler_tsv_file(file_path, user_tz=None):
                 .replace(tzinfo=user_tz)
                 .replace(tzinfo=user_tz)
                 .astimezone(pytz.utc)
                 .astimezone(pytz.utc)
             )
             )
-            source = 'Audioscrobbler File'
 
 
             new_scrobble = Scrobble(
             new_scrobble = Scrobble(
                 timestamp=timestamp,
                 timestamp=timestamp,