Jump to content

KMP - Knight Media Player (Latest: beta .6)


Achilles
 Share

Recommended Posts

KMP focuses on what I view as the essentials of a media player. It has hotkeys and it is streamlined for efficiency in every way (or will be once I make a few more changes). It starts in less than a second and gives you instant access to all media files on your computer through an innovative design that removes the necessity of adding music to your library.

Some instructions:

  • To add music use the Add window... This will add music to you list window. Both these can be hidden/shown using the buttons the main GUI.
  • The list window is where you play/delete songs
  • Your "Now Playing" list is meant to be versatile, if you get bored of an artist or album simply clear the playlist and load what you want.
  • You can customize many features, view the options!
I know of a few bugs, but if you don't find them then I won't fix them. No, jk, I'm working on them but most of them are small and you probably won't run into them (I think...)

Without further rambling, download here and let me know what you think: DOWNLOAD HERE

I will only resource the main loop of this code as of now.

I'm really quite proud of it, it's very efficient and I think more people should make there main loops like it:

While 1
    Sleep(200)
WEnd
EVERYTHING is run off of events... 99% this program is it just sitting there... If you're playing a song it has a timer to update your seek status...

I'll be working on video support in the very near future, which is why there's a button that doesn't do anything on the GUI.

Edited by Achilles
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

  • Replies 41
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Most things about this is really good, like the small cpu-usage, all the options etc.... If it only worked ;)

1. I tried selecting a couple of mp3's and pressed on "add music" and it looked like something happened but nothing were in the "now playing"-list.

2. It also locks up when I try to add 1 song. "Error: Array variable subscript badly formatted."

3. Also it doesn't show any songs in the right listview when started, I must back one folder and then go back to "min musik" (my music) for anything to show.

4. It flickers when the "transparent when not active" is on and it loses focus.

There is probably more things but frankly, I got bored really quick when it wasn't possible to actually play something.

Link to comment
Share on other sites

Most things about this is really good, like the small cpu-usage, all the options etc.... If it only worked ;)

1. I tried selecting a couple of mp3's and pressed on "add music" and it looked like something happened but nothing were in the "now playing"-list.

2. It also locks up when I try to add 1 song. "Error: Array variable subscript badly formatted."

3. Also it doesn't show any songs in the right listview when started, I must back one folder and then go back to "min musik" (my music) for anything to show.

4. It flickers when the "transparent when not active" is on and it loses focus.

There is probably more things but frankly, I got bored really quick when it wasn't possible to actually play something.

Yeah, I try to play a song and get: "Error: Array variable subscript badly formatted.". That's all I have tried so far...
Link to comment
Share on other sites

Most things about this is really good, like the small cpu-usage, all the options etc.... If it only worked ;)

1. I tried selecting a couple of mp3's and pressed on "add music" and it looked like something happened but nothing were in the "now playing"-list.

2. It also locks up when I try to add 1 song. "Error: Array variable subscript badly formatted."

3. Also it doesn't show any songs in the right listview when started, I must back one folder and then go back to "min musik" (my music) for anything to show.

4. It flickers when the "transparent when not active" is on and it loses focus.

There is probably more things but frankly, I got bored really quick when it wasn't possible to actually play something.

same here.

couldn't get it to play anything at all.

Additionally to the problems posted before, on Win2K clicking the options button caused a fatal error.

After that, the second thing I noticed is #3 from the quoted post.

Finally the mp3s list up in the second list but no way to add them to the now playing list or play it without adding to that list.

Either it crashes or simply doesn't add anything, and when clicking on play it crashes all the times. - Unfortuantely!

You can fool some of the people all of the time, and all of the people some of the time, but you can not fool all of the people all of the time. Abraham Lincoln - http://www.ae911truth.org/ - http://www.freedocumentaries.org/
Link to comment
Share on other sites

Hmm, I don't have time to look at this now (which is why I released it without testing it much) but could you guys tell me what OS you're using?

EDIT: I just tried deleting all settings and adding music and it worked fine for me... I have Vista though..

Edited by Achilles
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Hmm, I don't have time to look at this now (which is why I released it without testing it much) but could you guys tell me what OS you're using?

EDIT: I just tried deleting all settings and adding music and it worked fine for me... I have Vista though..

Vista Ultimate SP1 32-BIT
Link to comment
Share on other sites

Hmm, I don't have time to look at this now (which is why I released it without testing it much) but could you guys tell me what OS you're using?

EDIT: I just tried deleting all settings and adding music and it worked fine for me... I have Vista though..

Windows XP Home SP3 (Swedish), btw where are the settings saved? I didn't see any ini or something
Link to comment
Share on other sites

Are you using this as a "portable" media player? If not then isn't @TempDir is a little strange place for storing settings? AFAIK that folder get cleaned automatically by windows (and other "cleaners") so you could easely lose your settings.

Most "normal" applications save their settings either in their own folder (@ScriptDir) or in "Application Data", so I think it would be more logical to use @AppDataCommonDir or @AppDataDir.

Edited by AdmiralAlkex
Link to comment
Share on other sites

Link to comment
Share on other sites

Are you using this as a "portable" media player? If not then isn't @TempDir is a little strange place for storing settings? AFAIK that folder get cleaned automatically by windows (and other "cleaners") so you could easely lose your settings.

Most "normal" applications save their settings either in their own folder (@ScriptDir) or in "Application Data", so I think it would be more logical to use @AppDataCommonDir or @AppDataDir.

Yeah, it's meant to be portable... No installation or extra files other than the .exe which creates a two settings files. But you can change that in settings... Just choose whatever directory you want and your data is stored there. The only value stored in the registry is the location where the rest of the data is stored. I might change it to @AppDataDir though...

And this "It's not working" thing like some sort of joke??? I just tried this on a 32 vista system and it work fine... Ugh, it's weird. Can you guys describe what exactly you do? Is just when you double click an item to play it?

Edit: Sorry, I didn't have time earlier to read all your first post AdmiralAlex, I'll see if your description can help me find the problem.

Edit2: Yeah, that helped, I'm actually getting that error too... This program has undergone two major change sessions from what it originally started out as so I don't think I got everything coordinated from the last bunch of changes I made. I'll fix that post haste.

Edit3: Wow, I really should of checked this more. I found lots more bugs but there all small and easy to fix. I used to have everything stored on the list and would hide the columns but I changed to an array which is way easier. However, I didn't think of all the ramifications so now I'm replacing a bunch of _GUICtrlListView_FindInText functions...

Edited by Achilles
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Updated! Lots of those little bugs should be fixed and running fine... I hope. Let me know if they aren't. Try going to options and clicking the "Startup" item in the list and updating from there.. It worked for me but I don't know if it will work for everyone... I'll definitely be making that look better sometime soon.
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

You seems to have fixed one bug only to have a few else come forward. The listviews are still buggy and nothing is added to the lower listview and it's still impossible to play anything! ;)

Do this actually work for you? :D

Link to comment
Share on other sites

You seems to have fixed one bug only to have a few else come forward. The listviews are still buggy and nothing is added to the lower listview and it's still impossible to play anything! ;)

Do this actually work for you? :D

;) Yes! Everything works fine for me... I'm guessing this has something to do with the problem:

Windows XP Home SP3 (Swedish)

But unfortunately I'm packing up to leave now and won't have time for much programming for awhile...
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

It can't be that easy, Alienware said in post 4 he had the same problem and he has Vista Ultimate.... ;)

I also tested it on another computer running WindowsXP Pro SP3 and it didn't work either.

Link to comment
Share on other sites

It can't be that easy, Alienware said in post 4 he had the same problem and he has Vista Ultimate.... ;)

I also tested it on another computer running WindowsXP Pro SP3 and it didn't work either.

I just deleted all settings on my computer and the problem you mentioned in your first post is fixed. What exactly happens when you try to add music now?

@Alienware (or anyone with Vista): Can you see if this is working for Vista?

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

When I select a bunch/one song and press add it disappears from the listview in upper-right but nothing happens on the lower one. And when I then press play the famous "Error: Array variable subscript badly formatted." come

Link to comment
Share on other sites

When I select a bunch/one song and press add it disappears from the listview in upper-right but nothing happens on the lower one. And when I then press play the famous "Error: Array variable subscript badly formatted." come

If you go under options and Import, if you turn on the option of displaying songs that couldn't be added, are your songs on that list? If they're not on that list then let me know if this function is working for your mp3 files:

Func _GetExtProperty($sPath)
    Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty

    $sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1))
    $sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1)))
    $oShellApp = ObjCreate("shell.application")
    $oDir = $oShellApp.NameSpace ($sDir)
    $oFile = $oDir.Parsename ($sFile)

    Local $aProperty[10]
    $aProperty[0] = $oDir.GetDetailsOf ($oFile, 0); File Name
    $aProperty[1] = $oDir.GetDetailsOf ($oFile, 1); File Size
    $aProperty[2] = $oDir.GetDetailsOf ($oFile, 2); File Type
    $aProperty[3] = $oDir.GetDetailsOf ($oFile, 13); Artist
    $aProperty[4] = $oDir.GetDetailsOf ($oFile, 14); Album
    $aProperty[5] = $oDir.GetDetailsOf ($oFile, 15); Year
    $aProperty[6] = $oDir.GetDetailsOf ($oFile, 16); Genre
    $aProperty[7] = $oDir.GetDetailsOf ($oFile, 21); Title
    $aProperty[8] = $oDir.GetDetailsOf ($oFile, 26); Track Number
    $aProperty[9] = $oDir.GetDetailsOf ($oFile, 27);Duration
    
    Return $aProperty
EndFunc  ;==>_GetExtProperty

I programmed this so that the play button should be disabled if the Now Playing list is empty...

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

If you go under options and Import, if you turn on the option of displaying songs that couldn't be added, are your songs on that list?

I turned that on but I saw no difference, it didn't seem to do anything.

If they're not on that list then let me know if this function is working for your mp3 files:

Func _GetExtProperty($sPath)
    Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty

    $sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1))
    $sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1)))
    $oShellApp = ObjCreate("shell.application")
    $oDir = $oShellApp.NameSpace ($sDir)
    $oFile = $oDir.Parsename ($sFile)

    Local $aProperty[10]
    $aProperty[0] = $oDir.GetDetailsOf ($oFile, 0); File Name
    $aProperty[1] = $oDir.GetDetailsOf ($oFile, 1); File Size
    $aProperty[2] = $oDir.GetDetailsOf ($oFile, 2); File Type
    $aProperty[3] = $oDir.GetDetailsOf ($oFile, 13); Artist
    $aProperty[4] = $oDir.GetDetailsOf ($oFile, 14); Album
    $aProperty[5] = $oDir.GetDetailsOf ($oFile, 15); Year
    $aProperty[6] = $oDir.GetDetailsOf ($oFile, 16); Genre
    $aProperty[7] = $oDir.GetDetailsOf ($oFile, 21); Title
    $aProperty[8] = $oDir.GetDetailsOf ($oFile, 26); Track Number
    $aProperty[9] = $oDir.GetDetailsOf ($oFile, 27);Duration
    
    Return $aProperty
EndFunc ;==>_GetExtProperty

I programmed this so that the play button should be disabled if the Now Playing list is empty...

Those values are way off, the artist name was at $aProperty[6] and etc, it looks like those are for Vista which has moved things around quite a bit. See THIS and THAT for values for 2000/xp
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...