Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - NighTeagle

Pages: 12
1
Portable Devices / Re: Wifi android device synching
« on: August 21, 2022, 09:05:21 PM »
I don't know either but I'm assuming it was unlocked on that device?

Yes, I've always synced with the unlocked Poweramp version, never with the trial version.

2
Portable Devices / Re: Wifi android device synching
« on: August 21, 2022, 08:32:06 AM »
Looking into the differences between trial and full for poweramp does say the trial is a full featured version.

The trial app and the full app are exactly the same app actually. You first install the trial version and additionally install the 'full version' unlocker app. This changes the temporary license of the base (trial) app to an undefinite license. You can even uninstall this unlocker app after this action (which I did) leaving only the base app, i.e. the original trial app.

edit: Gave it another shot and I can't get reverse sync to work with PowerAmp trial version. Maybe I'm missing a setting or something. No errors pop up. It just says no changes detected. If I look at the song info in PowerAmp, it lists the play counts for the songs I played as a test.

No idea why it doesn't work for you then... I just did a reverse sync today with my Android 12 smartphone. The MB wifi sync app said sync completed succesfully and I verified that the playcounts were indeed incremented correctly in Musicbee.

I've had this phone for about 6 months and believe it had Android 12 from the start, but I'm not 100% sure.

3
Portable Devices / Re: Wifi android device synching
« on: August 19, 2022, 09:14:16 AM »
I assume you have the paid version? Pretty sure I tested the trial version and reverse syncing didn't work.

I might have to edit a few posts I've made on here implying it might not work.

Yes I have the paid version. It would surprise me that the trial version wouldn't work, since it is basically the same app, with the same functionality, just with a license of 14(?) days.

Just to be sure: how exactly did you notice reverse syncing didn't work? Did you receive some kind of error message or did you check your MB library after syncing where you noticed playcounts weren't incrementally increased?

I remember I manually checked some playcounts after my first wifi sync a few months ago, which indeed confirmed that the playcounts were succesfully incremented. Ratings however did not reverse sync.
I'll verify this once more this weekend, to be sure I'm not spreading false information :)

Edit: A new test this weekend indeed confirms that the playcounts from the paid Poweramp version were reverse synced to MusicBee on android 12.

4
Portable Devices / Re: Wifi android device synching
« on: August 18, 2022, 03:10:13 PM »
It looks like the S22 launched with android 12. I could be wrong but I don't think the MB wifi app will be able to reverse sync with PowerAmp in android 12 in it's current state. 2 things need to happen before that can work.
1. PowerAmp needs to change it's code so that the playcount data is not stored in it's own data folder. These folders are completely off limits to other apps in android 12 no matter what file permissions are granted. A rooted device might be able to bypass it.
2. If point 1 happens, the MB wifi app will need to be modified to look in whatever folder poweramp chooses to store its playcount data

Currently the MB wifi app you download from the play store will not work on android 12 for reverse syncing.

I have a Samsung Galaxy A52s 5G with Android 12, MusicBee Wifi Sync App v2.0.0 and the latest Poweramp version (build-939-bundle-play).
Up till now I've always been able to reverse sync my playcounts with MusicBee.

I've had some occasional troubles during the sync, which I believe were related to a bad wifi connection and not related to Android 12.

In short, reverse sync does work for me with Poweramp on Android 12.

after doing a wired sync, "Server not found. Ensure MusicBee is running and Windows firewall..." message.

i have MusicBee set in Windows Defender to allow MusicBee for private and public access.

help???!!! thanks!!!

I had to set my laptop's IP address to static for the wifi sync to work. Don't remember exactly how I did this a few months ago. I believe I found some comments on this forum which helped me to get it working.

I sometimes still struggle to get a connection even with static IP, but then I try restarting Musicbee and the wifi sync app or even the laptop & smarthphone itself. That has always fixed any remaining connection issues.

5
You should really post your (former) issues to the plugin's thread so that should the developer still be around, it can be looked at. And if for no other reason, to let others who may be interested in the plugin know of the issues you experienced.

I did so, immediately after my post here :)

6
FYI for other users of this plugin:

I encountered an issue where this plugin prevented a correct shutdown and restart of Musicbee 3.5:
https://getmusicbee.com/forum/index.php?topic=36499.0

I have not tested whether the plugin functionality still works on MusicBee 3.5, but I doubt it given this experience.
The plugin did still work with MusicBee 3.4.

Perhaps it's related to the upgrade to .NET 4.8 of MusicBee 3.5.

7
according to the log its either freezing on shutting down one of the dsps you might have enabled or a plugin

Thanks a lot for taking a look! You're right, it was indeed one of my plugins causing this issue, the MusicbeeIPC plugin: https://getmusicbee.com/forum/index.php?topic=11492.0

Actually, when I tried to simply disable the plugin, MB shut down with the plugin panel frozen and I had to close the remaining MB process in task manager.
The disable action was succesful though and the error log showed the exact same numbers as when I had the issue with the skin change (latest nr = 11, instead of 14).
I can now change skins again and MB will restart without issue with the new skin loaded.

The MusicbeeIPC plugin hasn't been updated since 2013, so it's fair to say the issue lies with that plugin and not with MB 3.5  :)
It's not even an issue for me, since I no longer require the functionality of MusicbeeIPC.

8
Gif to showcase the behavior:  https://giphy.com/gifs/hrkynv8UCQ8hKJyJnY/fullscreen

Seems like some parts are not very clear in the gif and the part in which I close the MB process was cut somehow...

In any case, this gif just illustrates exactly what I have described in my previous posts.

9
If you have the option to export the library to a itunes xml file or a lot of auto-playlists have export to static playlist enabled, the old MB process might take a long time to close so the new instance of MB with the new skin cant open
I unchecked the option for Itunes XML. Then closed MB manually and deleted the xml file in windows explorer. I restart MB, then switch skins. Same issue, MB no longer restarts. I waited at least 5 min before closing the MB background process in task manager, which allowed a manual restart.

When I manually close and reopen MB as fast as I can, I encounter no issues.

I have 3 auto-playlists, none of which are set to export a static copy.

I also verified that I have dot.NET 4.8 on my laptop in the registry.

10
I do believe I have the export to itunes xml still enabled. I'll check what happens if deselect that option when I'm home later today. I'll also try waiting up to 5 min to see if that has an effect.

I have very few auto-playlists, so I don't expect that to be the cause.

Also, for clarification. I did not have this issue with MB 3.4. (I don't remember the exact version)

11
I assume it will occur for all skins.
Does it?
If not there's probably an issue with the skin and you should post the problem on that skin's thread.

Yeah it does, I just tried it with the 'Windows" theme, which I believe is a standard skin?

Anyway, since the problem seemed related to closing and starting up MB, I did not see a correlation with the specific skins I use.

12
When switching skins, MB closes (= expected behavior), but does not restart. Manually trying to start MB does not work.

I've checked windows task manager and there is a MB background process. When I close this proces, I'm able to start MB again. The new skin is succesfully loaded.

This occurs when switching the skin from the standard Musicbee3 to the Dark fine-tuned Prussian Blue. I assume it will occur for all skins. (I frequently switch depending on day/night usage).

Musicbee version 3.5.8150

13
Developers' Area / Re: Script to mass edit play counters
« on: August 17, 2019, 07:10:24 PM »
Turns out there was an easy way to do this after all with a python script and the MusicBeeIPC plugin. For more info, check this topic: https://getmusicbee.com/forum/index.php?topic=29389.0

It should be fairly straightforward to change this according to your needs.

14
Tips and Tricks / Script to edit playcounts based on CSV file
« on: August 17, 2019, 07:05:30 PM »
I mostly use Musicbee as music manager (instead of player) and play my music from my phone (which scrobbles to Last.fm). I couldn't just sync my Last.fm play counts to Musicbee without loosing a bunch play counts from before I started scrobbling and until recently there was no play count sync possible between my phone and Musicbee (Luckily there is now!). The outdated play counts kept bothering me and I finally found a way to fix this.

This specific case won't occur often, but I figured some people might have use for part of the code I wrote, so I wanted to share it here. The idea is simple: download a CSV file with last.fm scrobbles; convert those scrobbles into a list of artist, title and play count since *timestamp*; add the play count in this list to the current play count in the music library.

Workflow:
- Download CSV file from https://mainstream.ghan.nl/export.html. There are other sites out there, but this one allows you to add a timestamp, which shortens the download time. Find your unix timestamp from a converter site like https://www.unixtimestamp.com/.

- Convert this file into a CSV file in the correct format by using excel and VBA:
1) Folder setup


2) Excel overview


3) VBA code
Code
Option Explicit

Public Sub CreateCSV()

Dim DataWS As Worksheet
Dim TempWS As Worksheet
Dim CountWS As Worksheet
Dim CSV_WS As Worksheet
Dim OverviewWS As Worksheet
Dim Full_Path As String
Dim LastRow As Long
Dim CountLastRow As Long
Dim Idx As Long

Application.ScreenUpdating = False
Application.DisplayAlerts = False

Set OverviewWS = ThisWorkbook.Worksheets("Overview")
Set DataWS = ThisWorkbook.Worksheets("Data")
Set CountWS = ThisWorkbook.Worksheets("Count")
Set CSV_WS = ThisWorkbook.Worksheets("CSV")

DataWS.UsedRange.ClearContents
CountWS.UsedRange.ClearContents
CSV_WS.UsedRange.ClearContents

With ThisWorkbook
    .Worksheets.Add After:=.Worksheets(.Worksheets.Count)
End With

Set TempWS = ThisWorkbook.ActiveSheet

Full_Path = Application.ThisWorkbook.Path & "\" & OverviewWS.Range("B2").Value

TempWS.Activate
TempWS.Cells.ClearContents

With TempWS.QueryTables.Add(Connection:="TEXT;" & Full_Path, Destination:=TempWS.Range("$A$1"))
   .TextFilePlatform = 1252
   .TextFileStartRow = 1
   .TextFileParseType = xlDelimited
   .TextFileTextQualifier = xlTextQualifierDoubleQuote
   .TextFileConsecutiveDelimiter = False
   .TextFileTabDelimiter = False
   .TextFileSemicolonDelimiter = False
   .TextFileCommaDelimiter = True
   .TextFileSpaceDelimiter = False
   .TextFileDecimalSeparator = "."
   .TextFileThousandsSeparator = ","
   .TextFileColumnDataTypes = Array(xlTextFormat, xlSkipColumn, xlTextFormat, xlSkipColumn, xlSkipColumn, xlSkipColumn, xlTextFormat, xlSkipColumn)
   .TextFileTrailingMinusNumbers = True
   .Refresh BackgroundQuery:=False
End With

LastRow = TempWS.Cells(TempWS.Rows.Count, 1).End(xlUp).Row

TempWS.Rows(1).Delete

Idx = LastRow
Do While CLng(TempWS.Cells(Idx, 1).Value) < CLng(OverviewWS.Range("B1").Value)
    Idx = Idx - 1
Loop

TempWS.Range("A" & Idx + 1 & ":" & "C" & LastRow).ClearContents

TempWS.UsedRange.Copy 'Range("A1:D" & Idx-1)
DataWS.Cells(1, 1).PasteSpecial xlValue

TempWS.Delete
With DataWS
    .Columns("D:D").NumberFormat = "General"
    .Range("D1").FormulaR1C1 = "=RC[-2] & ""##"" & RC[-1]"
    .Range("D1").AutoFill Destination:=.Range("D1:D" & Idx - 1)
    .Columns("D:D").Copy
End With

With CountWS
    .Columns("A:A").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Application.CutCopyMode = False
    
    .Columns("A:A").RemoveDuplicates Columns:=1, Header:=xlNo
    CountLastRow = .Cells(.Rows.Count, 1).End(xlUp).Row
    
    .Columns("A:A").Copy
    .Columns("B:B").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
    .Columns("B:B").TextToColumns Destination:=Range("B1"), DataType:=xlDelimited, _
    TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
    Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
    :="#", FieldInfo:=Array(Array(1, 2), Array(2, 9), Array(3, 2)), _
    TrailingMinusNumbers:=True
    
    .Range("D1").FormulaR1C1 = "=COUNTIF(Data!C,Count!RC[-3])"
    .Range("D1").AutoFill Destination:=.Range("D1:D" & CountLastRow)
    
    .Columns("B:D").Copy
End With

With CSV_WS
    .Columns("A:C").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    .Sort.SortFields.Clear
    .Sort.SortFields.Add Key:=.Columns("A:A"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    .Sort.SortFields.Add Key:=.Columns("B:B"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With .Sort
        .SetRange CSV_WS.Range("A1:C" & CountLastRow)
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
End With

OverviewWS.Range("B1").Value = DataWS.Range("A1").Value + 5 '1540080000
ThisWorkbook.Save

CSV_WS.Copy
ActiveWorkbook.SaveAs FileName:=Application.ThisWorkbook.Path & "\" & OverviewWS.Range("B3").Value, FileFormat:=xlCSV, CreateBackup:=False, Local:=True
ActiveWorkbook.Close False

Application.ScreenUpdating = True
Application.DisplayAlerts = True

End Sub

- Run python script (Add MusicBeeIPC plugin to plugin folder first and install the python SDK - https://getmusicbee.com/forum/index.php?topic=11492)
Code
import csv
import logging
import win32api
from datetime import datetime
from musicbeeipc import *

mbIPC = MusicBeeIPC()
pathCSV = r"C:\Users\Michiel\Documents\MB_Development_Area\Source_file_PlayCountUpdateCSV.csv"
now = datetime.now()

failureFileName = "failureLogFile.log"
logging.basicConfig(filename=failureFileName, level=logging.INFO)
logging.info('start new logging session @ ' + str(now))

result = win32api.MessageBox(None, "You are about to change play counts in your MusicBee library.", "Script Warning", 1)

if result == 1:
    with open(pathCSV,  encoding="utf8") as csv_file:
        csv_reader = csv.reader(csv_file, delimiter=';')
        for row in csv_reader:
            songCounter = 0
            foundURL = ""
            artistComparator = str(row[0])
            titleToSearch = str(row[1])
            playCountToAdd = int(row[2])

            results = mbIPC.library_search(titleToSearch)
            for res in results:
                artist = mbIPC.library_get_file_tag(res, MBMD_Artist)
                title = mbIPC.library_get_file_tag(res, MBMD_TrackTitle)
                if artist.lower() == artistComparator.lower():
                    if titleToSearch.lower() == title.lower():
                        songCounter += 1
                        foundURL = res

            if songCounter == 1:
                currentPlayCount = mbIPC.library_get_file_property(foundURL, MBFP_PlayCount)
                newPlayCount = int(currentPlayCount) + playCountToAdd
                # Update
                # noinspection PyUnboundLocalVariable
                mbIPC.library_set_file_tag(foundURL, MBFP_PlayCount, str(newPlayCount))
                mbIPC.library_commit_tags_to_file(foundURL)
            else:
                logging.info(artistComparator + ';' + titleToSearch + ';' + str(playCountToAdd))

**Disclaimer**
I did some minor testing for error cases and tried to code it in a cautious way. However I can not guarantee this will work as intended for everyone. Use at your own risk.

15
Bug Reports / Re: Displayed album play count
« on: August 17, 2019, 04:36:30 PM »
Ok, thanks for the clarification. Definitely makes sense.
Now that I think about it, I do have different genres for tracks in one album, which brings up the same issue as for play counts and artists.

Pages: 12