mirror of
https://github.com/sphildreth/roadie
synced 2024-11-22 20:23:16 +00:00
Fixes for streaming and better CSV handling.
This commit is contained in:
parent
82f31a7bfb
commit
ab2e8b5787
5 changed files with 18 additions and 5 deletions
|
@ -4,6 +4,7 @@ using Roadie.Library.Enums;
|
||||||
using Roadie.Library.Utility;
|
using Roadie.Library.Utility;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
@ -111,7 +112,16 @@ namespace Roadie.Library.Data
|
||||||
using (var sr = new StringReader(this.ListInCSV))
|
using (var sr = new StringReader(this.ListInCSV))
|
||||||
{
|
{
|
||||||
var index = 0;
|
var index = 0;
|
||||||
var csv = new CsvReader(sr, new CsvHelper.Configuration.Configuration { MissingFieldFound = null, HasHeaderRecord = false });
|
var configuration = new CsvHelper.Configuration.Configuration
|
||||||
|
{
|
||||||
|
MissingFieldFound = null,
|
||||||
|
HasHeaderRecord = false
|
||||||
|
};
|
||||||
|
configuration.BadDataFound = context =>
|
||||||
|
{
|
||||||
|
Trace.WriteLine($"PositionArtistReleases: Bad data found on row '{context.RawRow}'");
|
||||||
|
};
|
||||||
|
var csv = new CsvReader(sr, configuration);
|
||||||
while (csv.Read())
|
while (csv.Read())
|
||||||
{
|
{
|
||||||
index++;
|
index++;
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace Roadie.Library.Models
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"TrackId [{ this.Track }], Begin [{ this.BeginBytes }], End [{ this.EndBytes }]";
|
return $"TrackId [{ this.Track }], ContentRange [{ this.ContentRange }], Begin [{ this.BeginBytes }], End [{ this.EndBytes }]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -685,6 +685,8 @@ namespace Roadie.Api.Services
|
||||||
foreach (var folder in Directory.EnumerateDirectories(d.FullName).ToArray())
|
foreach (var folder in Directory.EnumerateDirectories(d.FullName).ToArray())
|
||||||
{
|
{
|
||||||
result = await folderProcessor.Process(new DirectoryInfo(folder), isReadOnly);
|
result = await folderProcessor.Process(new DirectoryInfo(folder), isReadOnly);
|
||||||
|
// Between folders flush cache, the caching for folder processing was intended for caching artist metadata lookups. Most of the time artists are in the same folder.
|
||||||
|
this.CacheManager.Clear();
|
||||||
processedFolders++;
|
processedFolders++;
|
||||||
}
|
}
|
||||||
if (result.AdditionalData != null)
|
if (result.AdditionalData != null)
|
||||||
|
|
|
@ -119,6 +119,7 @@ namespace Roadie.Api.Controllers
|
||||||
tsw.Restart();
|
tsw.Restart();
|
||||||
Response.Headers.Add("Content-Disposition", info.Data.ContentDisposition);
|
Response.Headers.Add("Content-Disposition", info.Data.ContentDisposition);
|
||||||
Response.Headers.Add("X-Content-Duration", info.Data.ContentDuration);
|
Response.Headers.Add("X-Content-Duration", info.Data.ContentDuration);
|
||||||
|
Response.Headers.Add("Content-Duration", info.Data.ContentDuration);
|
||||||
if (!info.Data.IsFullRequest)
|
if (!info.Data.IsFullRequest)
|
||||||
{
|
{
|
||||||
Response.Headers.Add("Accept-Ranges", info.Data.AcceptRanges);
|
Response.Headers.Add("Accept-Ranges", info.Data.AcceptRanges);
|
||||||
|
|
|
@ -55,8 +55,8 @@
|
||||||
"SiteName": "Roadie",
|
"SiteName": "Roadie",
|
||||||
"DefaultTimeZone": "US/Central",
|
"DefaultTimeZone": "US/Central",
|
||||||
"DiagnosticsPassword": "RoadieDiagPassword",
|
"DiagnosticsPassword": "RoadieDiagPassword",
|
||||||
"InboundFolder": "Z:/incoming/",
|
"InboundFolder": "M:/incoming/",
|
||||||
"LibraryFolder": "Z:/library/",
|
"LibraryFolder": "M:/library/",
|
||||||
"Thumbnails": {
|
"Thumbnails": {
|
||||||
"Height": 80,
|
"Height": 80,
|
||||||
"Width": 80
|
"Width": 80
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
"DontDoMetaDataProvidersSearchArtists": [ "Various Artists", "Sound Tracks" ],
|
"DontDoMetaDataProvidersSearchArtists": [ "Various Artists", "Sound Tracks" ],
|
||||||
"FileExtenionsToDelete": [ ".cue", ".db", ".gif", ".html", ".ini", ".jpg", ".jpeg", ".log", ".mpg", ".m3u", ".png", ".nfo", ".nzb", ".sfv", ".srr", ".txt", ".url" ],
|
"FileExtenionsToDelete": [ ".cue", ".db", ".gif", ".html", ".ini", ".jpg", ".jpeg", ".log", ".mpg", ".m3u", ".png", ".nfo", ".nzb", ".sfv", ".srr", ".txt", ".url" ],
|
||||||
"RecordNoResultSearches": true,
|
"RecordNoResultSearches": true,
|
||||||
"SingleArtistHoldingFolder": "Z:/single_holding/",
|
"SingleArtistHoldingFolder": "M:/single_holding/",
|
||||||
"ArtistNameReplace": {
|
"ArtistNameReplace": {
|
||||||
"AC/DC": [ "AC; DC", "AC;DC", "AC/ DC", "AC DC" ],
|
"AC/DC": [ "AC; DC", "AC;DC", "AC/ DC", "AC DC" ],
|
||||||
"Love/Hate": [ "Love; Hate", "Love;Hate", "Love/ Hate", "Love Hate" ]
|
"Love/Hate": [ "Love; Hate", "Love;Hate", "Love/ Hate", "Love Hate" ]
|
||||||
|
|
Loading…
Reference in a new issue