Skip to content

Commit

Permalink
Mejora en la gestión de favoritos y listas de reproducción dinámicas
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeManzano committed Dec 16, 2023
1 parent 1da536b commit 5406b87
Show file tree
Hide file tree
Showing 147 changed files with 116 additions and 739 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .vs/MediaPlayer/v17/.suo
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ Toda la información de la utilización del reproductoror aquí.

Desde este enlace podemos descargar el instalador del reproductor.

:arrow_down: [Descarga Instalador v2.5.2 32 Bits](https://mega.nz/file/NQcmnCpC#tIPPM9OpC2_BZmC1upqW5ueloOQvDPA1Sax5QJ8YTXQ)
:arrow_down: [Descarga Instalador v2.5.3 32 Bits](https://mega.nz/file/5RVzlZAJ#qXCj2Hqt6S9h7CTT59D8jn7qh_5LQHuOnYSAWH-o9qk)

:arrow_down: [Descarga Instalador v2.5.2 64 Bits](https://mega.nz/file/wA9UTIxD#Bzkcs2_649L520f8KJEAHvLXCwhVUf_-EyZ3bCR7Kfw)
:arrow_down: [Descarga Instalador v2.5.3 64 Bits](https://mega.nz/file/VNtSCDyT#dzuM746-4SdvtUAdA7fB8EgpPOfyGMF4NOCqefASkTA)

### Formatos de audio (Esta versión)

Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ReproductorMusicaTagEditables/Controls/Menu/Menu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<TextBlock Text="Media Player"
Style="{StaticResource tituloPrincipalLogo}"/>

<TextBlock Text="Versión 2.5.1"
<TextBlock Text="Versión 2.5.3"
Style="{StaticResource tituloSecundarioLogo}"/>
</StackPanel>
</StackPanel>
Expand Down

This file was deleted.

This file was deleted.

8 changes: 4 additions & 4 deletions ReproductorMusicaTagEditables/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace ReproductorMusicaTagEditables
{
public partial class MainWindow : Window
{
private bool cancionGuardada = false;

private DispatcherTimer timer;

private TimeSpan tiempoTotalPista = new TimeSpan();
Expand All @@ -50,10 +50,10 @@ private void Time_Track(object sender, EventArgs e)
controlTiempo.TiempoTranscurrido = mediaReproductor.Position.TiempoFormato();
tiempoTotalPista = tiempoTotalPista.Subtract(TimeSpan.FromSeconds(1));
controlTiempo.TiempoFaltante = tiempoTotalPista.TiempoFormato();
if(mediaReproductor.Position.TotalSeconds > 5 && !cancionGuardada)
if(mediaReproductor.Position.TotalSeconds > 13 && !EstadosControl.CANCION_GUARDADA)
{
ListasReproduccion.AgregarCancionAFavoritos(reproViewModel.CancionActual());
cancionGuardada = true;
EstadosControl.CANCION_GUARDADA = true;
}
}
}
Expand Down Expand Up @@ -89,7 +89,7 @@ private void Inicio_Track(object sender, RoutedEventArgs e)
{
timer.Stop();
sliderLineTime.Value = 0;
cancionGuardada = false;

}
if (mediaReproductor.TieneTimeSpan())
{
Expand Down
5 changes: 3 additions & 2 deletions ReproductorMusicaTagEditables/Manual/Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@

Para descargar el reproductor lo podemos hacer desde el siguiente enlace:

:arrow_down: [Descarga Instalador v2.5.2 32 Bits](https://mega.nz/file/NQcmnCpC#tIPPM9OpC2_BZmC1upqW5ueloOQvDPA1Sax5QJ8YTXQ)
:arrow_down: [Descarga Instalador v2.5.3 32 Bits](https://mega.nz/file/5RVzlZAJ#qXCj2Hqt6S9h7CTT59D8jn7qh_5LQHuOnYSAWH-o9qk)

:arrow_down: [Descarga Instalador v2.5.3 64 Bits](https://mega.nz/file/VNtSCDyT#dzuM746-4SdvtUAdA7fB8EgpPOfyGMF4NOCqefASkTA)

:arrow_down: [Descarga Instalador v2.5.2 64 Bits](https://mega.nz/file/wA9UTIxD#Bzkcs2_649L520f8KJEAHvLXCwhVUf_-EyZ3bCR7Kfw)

El resultado de la descarga nos va a dejar un archivo llamado `MediaPlayer.zip`.

Expand Down
9 changes: 1 addition & 8 deletions ReproductorMusicaTagEditables/MediaPlayer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>39</ApplicationRevision>
<ApplicationRevision>42</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down Expand Up @@ -413,10 +413,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\TipsInfo\TipsInfoControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -491,9 +487,6 @@
<Compile Include="Controls\TiempoTrack\TiempoTrack.xaml.cs">
<DependentUpon>TiempoTrack.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\TipsInfo\TipsInfoControl.xaml.cs">
<DependentUpon>TipsInfoControl.xaml</DependentUpon>
</Compile>
<Compile Include="Core\RelayCommand.cs" />
<Compile Include="Core\ViewModelBase.cs" />
<Compile Include="MainWindow.xaml.cs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,18 +279,26 @@ public static bool AgregarCancionAFavoritos(Cancion c)
if(c.Artista != "Desconocido" && c.Album != "Desconocido")
{
List<Cancion> listaCanciones = DameListadoCanciones("FAVORITOS");


listaCanciones.ForEach(cl =>
{
if (cl.Equals(c))
{
c.Cantidad = cl.Cantidad;
}
});

c.Cantidad++;
c.UltimaReproduccion = DateTime.Now;
Cancion cc = c.Clone();


listaCanciones = AgregarYBlanquearCanciones(listaCanciones, cc);
listaCanciones = AgregarYBlanquearCanciones(listaCanciones, c);
listaCanciones = listaCanciones.OrdenarPorCantidadDecreciente();

try
{
string listaTxt = JsonConvert.SerializeObject(listaCanciones, Formatting.Indented);
AgregarCancionRegalo(cc);
AgregarCancionRegalo(c);
using (StreamWriter sw = new StreamWriter("FAVORITOS".Ruta()))
{
sw.Write(listaTxt);
Expand Down Expand Up @@ -439,7 +447,6 @@ public static void AgregarCancionRegalo(Cancion c)
}
}


public static string ExtraerNombreArchivo(string path)
{
if (File.Exists(path))
Expand Down Expand Up @@ -495,7 +502,7 @@ public static string FechaCreacionDelRegalo(string nombre)

private static List<Cancion> AgregarYBlanquearCanciones(List<Cancion> listado, Cancion c)
{
if (listado.Exists(cl => cl.Titulo == c.Titulo && cl.Artista == c.Artista))
if (listado.Exists(cl => cl.Equals(c)))
{
listado = listado.Select(cl =>
{
Expand Down
27 changes: 14 additions & 13 deletions ReproductorMusicaTagEditables/Mvvm/ViewModel/Base/EstadosControl.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@


namespace ReproductorMusicaTagEditables.Mvvm.ViewModel.Base
{
public class EstadosControl
{
public static bool PLAY = false;
public static bool SLIDER_MOVE = false;
public static bool RANDOM = false;
public static bool CIRCULOS = false;
public static bool CAMBIO_PAGINA = true;
}
}


namespace ReproductorMusicaTagEditables.Mvvm.ViewModel.Base
{
public class EstadosControl
{
public static bool PLAY = false;
public static bool SLIDER_MOVE = false;
public static bool RANDOM = false;
public static bool CIRCULOS = false;
public static bool CAMBIO_PAGINA = true;
public static bool CANCION_GUARDADA = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public override void Ejecutar(InfoReproductor Irg, Cancion c = null)
Irg.Seleccionar();
ReproducirCancion(Irg);
Historial.AgregarAHistorialAlbumes(GenerarAlbum(Irg.CancionActual.Cancion));
EstadosControl.CANCION_GUARDADA = false;
}
else if (Irg.CancionesFiltradas.Count > 0 && Irg.CancionActual.Index > 0)
{
Expand All @@ -39,6 +40,7 @@ public override void Ejecutar(InfoReproductor Irg, Cancion c = null)
Irg.Seleccionar();
ReproducirCancion(Irg);
Historial.AgregarAHistorialAlbumes(GenerarAlbum(Irg.CancionActual.Cancion));
EstadosControl.CANCION_GUARDADA = false;
}
else
{
Expand All @@ -54,6 +56,7 @@ public override void Ejecutar(InfoReproductor Irg, Cancion c = null)
Irg.Seleccionar();
ReproducirCancion(Irg);
Historial.AgregarAHistorialAlbumes(GenerarAlbum(Irg.CancionActual.Cancion));
EstadosControl.CANCION_GUARDADA = false;
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions ReproductorMusicaTagEditables/Mvvm/ViewModel/Utils/Play.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public override void Ejecutar(InfoReproductor Irg, Cancion c = null)
Irg.Seleccionar();
Irg.IconoPlay = MahApps.Metro.IconPacks.PackIconFontAwesomeKind.PauseSolid;
EstadosControl.PLAY = true;

EstadosControl.CANCION_GUARDADA = false;
}
else
{
Expand Down Expand Up @@ -64,7 +64,7 @@ public override void Ejecutar(InfoReproductor Irg, Cancion c = null)
Irg.Seleccionar();
Irg.IconoPlay = MahApps.Metro.IconPacks.PackIconFontAwesomeKind.PauseSolid;
EstadosControl.PLAY = true;

EstadosControl.CANCION_GUARDADA = false;
}
else
{
Expand All @@ -81,6 +81,7 @@ public override void Ejecutar(InfoReproductor Irg, Cancion c = null)

Irg.IconoPlay = MahApps.Metro.IconPacks.PackIconFontAwesomeKind.PauseSolid;
EstadosControl.PLAY = true;
EstadosControl.CANCION_GUARDADA = false;

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public override void Ejecutar(InfoReproductor Irg, Cancion c = null)
Irg.Seleccionar();
ReproducirCancion(Irg);
Historial.AgregarAHistorialAlbumes(GenerarAlbum(Irg.CancionActual.Cancion));
EstadosControl.CANCION_GUARDADA = false;
}
else if (Irg.CancionesFiltradas.Count > Irg.CancionActual.Index + 1)
{
Expand All @@ -42,6 +43,7 @@ public override void Ejecutar(InfoReproductor Irg, Cancion c = null)
Irg.Seleccionar();
ReproducirCancion(Irg);
Historial.AgregarAHistorialAlbumes(GenerarAlbum(Irg.CancionActual.Cancion));
EstadosControl.CANCION_GUARDADA = false;
} else
{
if (EstadosControl.CIRCULOS)
Expand All @@ -56,6 +58,7 @@ public override void Ejecutar(InfoReproductor Irg, Cancion c = null)
Irg.Seleccionar();
ReproducirCancion(Irg);
Historial.AgregarAHistorialAlbumes(GenerarAlbum(Irg.CancionActual.Cancion));
EstadosControl.CANCION_GUARDADA = false;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<assemblyIdentity name="ReproductorMusicaTagEditables.application" version="1.0.0.38" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<assemblyIdentity name="ReproductorMusicaTagEditables.application" version="1.0.0.41" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="ReproductorMusicaTagEditables" asmv2:product="ReproductorMusicaTagEditables" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" mapFileExtensions="true" />
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
<framework targetVersion="4.8" profile="Full" supportedRuntime="4.0.30319" />
</compatibleFrameworks>
<dependency>
<dependentAssembly dependencyType="install" codebase="ReproductorMusicaTagEditables.exe.manifest" size="14400">
<assemblyIdentity name="ReproductorMusicaTagEditables.exe" version="1.0.0.38" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<assemblyIdentity name="ReproductorMusicaTagEditables.exe" version="1.0.0.41" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>y4y+hY/4VdkcF8or5ivILkRexDFtB55oF6l/d5kROI0=</dsig:DigestValue>
<dsig:DigestValue>EUH4NMKD62OQdyXDl+vuhy4MTClNfVdzo4G4WeLsGe0=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<asmv1:assemblyIdentity name="ReproductorMusicaTagEditables.exe" version="1.0.0.38" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<asmv1:assemblyIdentity name="ReproductorMusicaTagEditables.exe" version="1.0.0.41" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<description asmv2:iconFile="nota-musical.ico" xmlns="urn:schemas-microsoft-com:asm.v1" />
<application />
<entryPoint>
Expand Down Expand Up @@ -199,14 +199,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ReproductorMusicaTagEditables.exe" size="1425848">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ReproductorMusicaTagEditables.exe" size="1424312">
<assemblyIdentity name="ReproductorMusicaTagEditables" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>tnKdOEFBanTlHkARX+7b86Lr2MnPt/b8PImD3WgaBGo=</dsig:DigestValue>
<dsig:DigestValue>VtbaoW7zaAGQEuDOyhOloXVIkbGyttczX3NzHfil45U=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 5406b87

Please sign in to comment.